sveast 0.9.3 → 0.9.4

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.
Files changed (51) hide show
  1. package/README.md +76 -3
  2. package/core.js +1 -1
  3. package/entities.js +1 -1
  4. package/index.d.ts +437 -0
  5. package/index.js +1 -1
  6. package/is-valid-type.js +1 -1
  7. package/lexer.js +3 -3
  8. package/module.js +1 -1
  9. package/package.json +6 -1
  10. package/parse-imports-exports.js +1 -1
  11. package/parse-module.js +1 -1
  12. package/parse-sections.js +1 -1
  13. package/parse.js +1 -1
  14. package/runes.js +1 -1
  15. package/scope.d.ts +1792 -0
  16. package/scope.js +1 -0
  17. package/shared-2by923ar.js +3 -0
  18. package/shared-3371ehgf.js +2 -0
  19. package/shared-4wqe6a27.js +5 -0
  20. package/shared-4zk9ntab.js +2 -0
  21. package/shared-artd3d80.js +2 -0
  22. package/{shared-7q3geqgt.js → shared-c9gzmr05.js} +2 -2
  23. package/shared-h6c4cer7.js +2 -0
  24. package/shared-hjcsmz9f.js +2 -0
  25. package/shared-jxkrk6hx.js +10 -0
  26. package/{shared-bx03zqyq.js → shared-n0fpkmn8.js} +2 -2
  27. package/shared-n1wnwhk8.js +3 -0
  28. package/{shared-wr6wdcs6.js → shared-nbaaegmc.js} +2 -2
  29. package/shared-rh41v5ez.js +3 -0
  30. package/shared-shxvsq2a.js +2 -0
  31. package/{shared-3ez2yv7r.js → shared-stdj6se1.js} +2 -2
  32. package/{shared-4t495q2a.js → shared-v0nj05q2.js} +2 -2
  33. package/shared-vjpq32kx.js +2 -0
  34. package/shared-xyqvjc3m.js +10 -0
  35. package/shared-znzncsf2.js +2 -0
  36. package/typescript.js +1 -1
  37. package/walk.d.ts +247 -0
  38. package/walk.js +1 -1
  39. package/shared-1z80250f.js +0 -2
  40. package/shared-2m9w933n.js +0 -2
  41. package/shared-3bhr0q10.js +0 -2
  42. package/shared-bbp47cz4.js +0 -10
  43. package/shared-cr4ebmgx.js +0 -5
  44. package/shared-g06vtkxe.js +0 -2
  45. package/shared-g7qbtk93.js +0 -3
  46. package/shared-j1r12f45.js +0 -3
  47. package/shared-njpj8eam.js +0 -2
  48. package/shared-qbw8n9am.js +0 -2
  49. package/shared-saxr459v.js +0 -2
  50. package/shared-wfjkg544.js +0 -10
  51. package/shared-xa3xp3kp.js +0 -3
package/scope.js ADDED
@@ -0,0 +1 @@
1
+ import{o,f}from"./shared-4wqe6a27.js";import{p,I,g}from"./shared-4zk9ntab.js";import{W,P}from"./shared-znzncsf2.js";class c{node;parent;porous;declarations=new Map;constructor(e,n,t){this.node=e,this.parent=n,this.porous=t}get(e){for(let n=this;n;n=n.parent){let t=n.declarations.get(e);if(t!==void 0)return t}return null}}class v{name;kind;node;declaration;initial;scope;references=[];rune=null;prop=null;constructor(e,n,t,i,r,s){this.name=e,this.kind=n,this.node=t,this.declaration=i,this.initial=r,this.scope=s}}class m{node;parent;scope;binding=null;reads;writes;mutates;store=!1;constructor(e,n,t,i,r,s){this.node=e,this.parent=n,this.scope=t,this.reads=i,this.writes=r,this.mutates=s}}var y=Object.assign(Object.create(null),g),b=new Set(["SvelteElement","RegularElement","SvelteFragment","Component","SvelteComponent","SvelteSelf","SlotElement"]),N=new Map;function R(e){return new S(e)}class S{module;instance;instanceProgram=null;component;scopeIn=new Map;made=new Map;declared=new Map;references=new Map;pending=[];declarators=[];implicit=[];stores=new Map;constructor(e){if(e.type==="Program")this.component=!1,this.module=new c(e,null,!1),this.instance=this.module,this.made.set(e,this.module),this.visit(e,null,this.module);else{this.component=!0;let n=e.module?.content??null,t=e.instance?.content??null;this.module=new c(n,null,!1),this.instance=new c(t,this.module,!1),this.instanceProgram=t,this.scopeIn.set(e,this.module);for(let[i,r]of[[e.module,this.module],[e.instance,this.instance]]){if(i===void 0)continue;this.scopeIn.set(i,r),this.made.set(i.content,r);for(let s of i.attributes)this.visit(s,i,r);this.visit(i.content,i,r)}this.visit(e.fragment,e,this.instance)}this.declareImplicit(),this.resolve(),this.findRunesAndProps()}scopeOf(e){return this.scopeIn.get(e)??null}bindingOf(e){return this.declared.get(e)??this.references.get(e)?.binding??null}referenceOf(e){return this.references.get(e)??null}declaredIn(e){return this.made.get(e)?.declarations??N}child(e,n,t){let i=new c(n,e,t);return this.made.set(n,i),i}declare(e,n,t,i,r,s){let l=e;if(i==="var")while(l.porous&&l.parent!==null)l=l.parent;let a=l.declarations.get(t);if(a!==void 0&&a.declaration.type!=="TSDeclareFunction"){if(n!==null)this.declared.set(n,a);return}let u=new v(t,i,n,r,s,l);if(l.declarations.set(t,u),n!==null)this.declared.set(n,u)}reference(e,n,t,i,r,s){this.pending.push(new m(e,n,t,i,r,s))}referenceName(e,n,t,i){let r=e.split(".")[0],s={type:"Identifier",name:r,start:n,end:n+r.length};this.scopeIn.set(s,i),this.reference(s,t,i,!0,!1,!1)}visit(e,n,t){switch(this.scopeIn.set(e,t),e.type){case"Identifier":if(n!==null&&I(e,n))this.reference(e,n,t,!0,!1,!1);this.visitFields(e,t);return;case"ImportDeclaration":for(let i of e.specifiers){if(this.scopeIn.set(i,t),this.scopeIn.set(i.local,t),i.type==="ImportSpecifier")this.scopeIn.set(i.imported,t);this.declare(t,i.local,i.local.name,"import",i,e)}this.visit(e.source,e,t);for(let i of e.attributes??[])this.visit(i,e,t);return;case"ExportNamedDeclaration":if(e.declaration)this.visit(e.declaration,e,t);for(let i of e.specifiers)if(this.scopeIn.set(i,t),this.scopeIn.set(i.local,t),this.scopeIn.set(i.exported,t),!e.source&&i.local.type==="Identifier")this.reference(i.local,i,t,!0,!1,!1);if(e.source)this.visit(e.source,e,t);for(let i of e.attributes??[])this.visit(i,e,t);return;case"VariableDeclaration":this.visitDeclaration(e,n,t);return;case"FunctionDeclaration":if(e.id)this.scopeIn.set(e.id,t),this.declare(t,e.id,e.id.name,"function",e,e);this.visitFunction(e,this.child(t,e,!0));return;case"FunctionExpression":{let i=this.child(t,e,!0);if(e.id)this.scopeIn.set(e.id,i),this.declare(i,e.id,e.id.name,"function",e,e);this.visitFunction(e,i);return}case"ArrowFunctionExpression":this.visitFunction(e,this.child(t,e,!0));return;case"ClassDeclaration":case"ClassExpression":{let i=t;if(e.id){if(e.type==="ClassExpression")i=this.child(t,e,!1);this.scopeIn.set(e.id,i),this.declare(i,e.id,e.id.name,"class",e,e)}for(let r of e.decorators??[])this.visit(r,e,t);if(e.superClass)this.visit(e.superClass,e,i);this.visit(e.body,e,i);return}case"BlockStatement":this.visitFields(e,this.child(t,e,!(n!==null&&T(n)&&n.body===e)));return;case"StaticBlock":this.visitFields(e,this.child(t,e,!1));return;case"ForStatement":case"SwitchStatement":this.visitFields(e,this.child(t,e,!0));return;case"ForInStatement":case"ForOfStatement":{let i=this.child(t,e,!0);if(e.left.type==="VariableDeclaration")this.visit(e.left,e,i);else this.visitTarget(e.left,e,i,!1);this.visit(e.right,e,i),this.visit(e.body,e,i);return}case"CatchClause":{if(!e.param)break;let i=this.child(t,e,!0);this.declarePattern(e.param,e,i,"catch",e,null),this.visit(e.body,e,i);return}case"AssignmentExpression":this.visitTarget(e.left,e,t,e.operator!=="="),this.visit(e.right,e,t);return;case"UpdateExpression":this.visitTarget(e.argument,e,t,!0);return;case"LabeledStatement":if(n===this.instanceProgram&&e.label.name==="$"){this.visitReactive(e,t);return}break;case"TSEnumDeclaration":{this.scopeIn.set(e.id,t),this.declare(t,e.id,e.id.name,"enum",e,e);let i=this.child(t,e,!1);for(let r of e.members)if(this.scopeIn.set(r,i),this.scopeIn.set(r.id,i),r.id.type==="Identifier")this.declare(i,r.id,r.id.name,"enum-member",r,r.initializer??null);for(let r of e.members)if(r.initializer)this.visit(r.initializer,r,i);return}case"TSModuleDeclaration":if(this.scopeIn.set(e.id,t),e.id.type==="Identifier"&&!e.global)this.declare(t,e.id,e.id.name,"namespace",e,e);if(e.body)this.visit(e.body,e,this.child(t,e,!1));return;case"TSImportEqualsDeclaration":{this.scopeIn.set(e.id,t),this.declare(t,e.id,e.id.name,"import",e,e.moduleReference);let i=e.moduleReference;while(i.type==="TSQualifiedName")this.scopeIn.set(i,t),this.scopeIn.set(i.right,t),i=i.left;if(i.type==="Identifier")this.scopeIn.set(i,t),this.reference(i,e,t,!0,!1,!1);else this.visit(i,e,t);return}case"TSDeclareFunction":if(e.id){if(this.scopeIn.set(e.id,t),!t.declarations.has(e.id.name))this.declare(t,e.id,e.id.name,"function",e,e)}return;case"Fragment":this.visitFields(e,this.child(t,e,!1));return;case"RegularElement":case"SvelteElement":case"SlotElement":case"SvelteFragment":this.visitFields(e,this.child(t,e,!1));return;case"Component":case"SvelteComponent":case"SvelteSelf":this.visitComponent(e,t);return;case"LetDirective":this.visitLet(e,t);return;case"EachBlock":this.visitEach(e,t);return;case"AwaitBlock":this.visitAwait(e,t);return;case"SnippetBlock":{this.scopeIn.set(e.expression,t);let{name:i}=e.expression;this.declare(t,e.expression,i,"snippet",e,e);let r=this.child(t,e,!1);for(let s of e.parameters??[])this.declarePattern(s,e,r,"snippet-param",e,null);this.visit(e.body,e,r);return}case"BindDirective":if(e.expression.type==="SequenceExpression")break;this.visitTarget(e.expression,e,t,!0);return;case"TransitionDirective":case"AnimateDirective":case"UseDirective":{this.referenceName(e.name,e.start+x(e),e,t);break}case"StyleDirective":if(e.value===!0)this.referenceName(e.name,e.start+6,e,t);break}this.visitFields(e,t)}visitFields(e,n){let t=y[e.type];if(t===void 0)throw Error(`unknown node type: ${e.type}`);let i=f(e);for(let r=0;r<t.length;r++){let s=i[t[r]];if(Array.isArray(s))for(let l=0;l<s.length;l++){let a=s[l];if(o(a))this.visit(a,e,n)}else if(o(s))this.visit(s,e,n)}}visitDeclaration(e,n,t){let i=e.kind==="await using"?"using":e.kind;if(n?.type==="ConstTag")i="const-tag";for(let r of e.declarations)if(this.scopeIn.set(r,t),this.declarePattern(r.id,r,t,i,r,r.init??null),this.declarators.push([r,t]),r.init)this.visit(r.init,r,t)}visitFunction(e,n){for(let t of e.params){if(t.type==="Identifier"&&t.name==="this"){this.scopeIn.set(t,n);continue}this.declarePattern(t,e,n,"param",e,null)}this.visit(e.body,e,n)}declarePattern(e,n,t,i,r,s){switch(this.scopeIn.set(e,t),e.type){case"Identifier":this.declare(t,e,e.name,i,r,s);break;case"ObjectPattern":for(let l of e.properties){if(this.scopeIn.set(l,t),l.type==="RestElement"){this.declarePattern(l,e,t,i,r,s);continue}if(l.computed)this.visit(l.key,l,t);else this.scopeIn.set(l.key,t);this.declarePattern(l.value,l,t,i,r,s)}break;case"ArrayPattern":for(let l of e.elements)if(l)this.declarePattern(l,e,t,i,r,s);break;case"RestElement":this.declarePattern(e.argument,e,t,i,r,s);break;case"AssignmentPattern":this.declarePattern(e.left,e,t,i,r,s),this.visit(e.right,e,t);break;case"TSParameterProperty":this.declarePattern(e.parameter,e,t,i,r,s);break;default:this.visit(e,n,t);return}if("decorators"in e&&e.decorators)for(let l of e.decorators)this.visit(l,e,t)}visitTarget(e,n,t,i){switch(this.scopeIn.set(e,t),e.type){case"Identifier":this.reference(e,n,t,i,!0,!1);return;case"MemberExpression":{let r=e,s=n;while(r.type==="MemberExpression"){if(this.scopeIn.set(r,t),r.computed)this.visit(r.property,r,t);else this.scopeIn.set(r.property,t);s=r,r=r.object}if(r.type==="Identifier")this.scopeIn.set(r,t),this.reference(r,s,t,!0,!1,!0);else this.visit(r,s,t);return}case"ObjectPattern":for(let r of e.properties){if(this.scopeIn.set(r,t),r.type==="RestElement"){this.visitTarget(r,e,t,!1);continue}if(r.computed)this.visit(r.key,r,t);else this.scopeIn.set(r.key,t);this.visitTarget(r.value,r,t,!1)}return;case"ArrayPattern":for(let r of e.elements)if(r)this.visitTarget(r,e,t,!1);return;case"RestElement":this.visitTarget(e.argument,e,t,!1);return;case"AssignmentPattern":this.visitTarget(e.left,e,t,!1),this.visit(e.right,e,t);return}if(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression"||e.type==="TSNonNullExpression"||e.type==="TSTypeAssertion"){this.visitTarget(e.expression,e,t,i);return}this.visit(e,n,t)}visitReactive(e,n){let t=this.child(n,e,!1);this.scopeIn.set(e.label,n);let{body:i}=e;if(i.type==="ExpressionStatement"&&i.expression.type==="AssignmentExpression"){let{left:r,right:s}=i.expression;for(let l of p(r))if(!l.name.startsWith("$"))this.implicit.push([l,e,s])}this.visit(i,e,t)}visitComponent(e,n){if(e.type==="Component")this.referenceName(e.name,e.start+1,e,n);let t=d(e)!==null,i=new c(e,n,!1),r=t?n:i;if(this.made.set(e,r),e.type==="SvelteComponent")this.visit(e.expression,e,n);for(let s of e.attributes)this.visit(s,e,s.type==="LetDirective"?r:n);this.scopeIn.set(e.fragment,i);for(let s of e.fragment.nodes){let l=d(s);this.visit(s,e.fragment,l===null?i:this.child(n,s,!1))}}visitLet(e,n){if(e.expression===null){this.declare(n,null,e.name,"let-directive",e,null);return}let t=(i)=>{switch(this.scopeIn.set(i,n),i.type){case"Identifier":this.declare(n,i,i.name,"let-directive",e,null);return;case"ObjectExpression":for(let r of i.properties)if(this.scopeIn.set(r,n),r.type==="SpreadElement")t(r.argument);else this.scopeIn.set(r.key,n),t(r.value);return;case"ArrayExpression":for(let r of i.elements){if(r===null)continue;if(r.type==="SpreadElement")this.scopeIn.set(r,n),t(r.argument);else t(r)}}};t(e.expression)}visitEach(e,n){if(this.visit(e.expression,e,n),e.fallback)this.visit(e.fallback,e,n);let t=this.child(n,e,!1);if(e.context)this.declarePattern(e.context,e,t,"each",e,null);if(e.index!==void 0)this.declare(t,null,e.index,"each-index",e,e);if(e.key)this.visit(e.key,e,t);this.scopeIn.set(e.body,t);for(let i of e.body.nodes)this.visit(i,e.body,t)}visitAwait(e,n){if(this.visit(e.expression,e,n),e.pending)this.visit(e.pending,e,n);for(let[t,i,r]of[[e.then,e.value,"await-value"],[e.catch,e.error,"await-error"]]){if(t===null)continue;this.visit(t,e,n);let s=this.made.get(t);if(i!==null&&s!==void 0)this.declarePattern(i,e,s,r,e,null)}}declareImplicit(){for(let[e,n,t]of this.implicit)if(this.instance.get(e.name)===null)this.declare(this.instance,e,e.name,"reactive",n,t)}resolve(){let e=new Set;for(let n of this.pending){let{node:t}=n,i=this.declared.get(t);if(i!==void 0&&i.kind!=="reactive")continue;this.references.set(t,n);let r=n.scope.get(t.name);if(r===null&&this.component){let s=this.storeOf(t.name);if(s!==!1)n.store=!0,n.mutates||=n.writes,n.reads=!0,n.writes=!1,r=s}if(r!==null){n.binding=r;let s=r.references.at(-1);if(s!==void 0&&s.node.start>t.start)e.add(r);r.references.push(n)}}for(let n of e)n.references.sort((t,i)=>t.node.start-i.node.start)}storeOf(e){let n=this.stores.get(e);if(n!==void 0)return n;let t=!1;if(e.length>1&&e.startsWith("$")&&!e.startsWith("$$")){let i=this.instance.get(e.slice(1));if(!P.has(e))t=i;else if(i!==null){let r=i.initial,s=h(r,this.instance,null);if((s===null||e!=="$props"&&s==="$props")&&!(e==="$derived"&&r?.type==="ImportDeclaration"&&r.source.value==="svelte/store"))t=i}}return this.stores.set(e,t),t}findRunesAndProps(){for(let[e,n]of this.declarators){let t=h(e.init??null,n,this.references);if(t===null)continue;for(let i of p(e.id)){let r=this.declared.get(i);if(r?.declaration===e)r.rune=t}if(t!=="$props")continue;if(e.id.type==="Identifier"){let i=this.declared.get(e.id);if(i)i.initial=null;continue}if(e.id.type!=="ObjectPattern")continue;for(let i of e.id.properties){if(i.type==="RestElement"){for(let l of p(i)){let a=this.declared.get(l);if(a)a.initial=null}continue}let r=i.value.type==="AssignmentPattern"?i.value.left:i.value,s=r.type==="Identifier"?this.declared.get(r):void 0;if(s===void 0||i.computed)continue;s.prop=E(i.key),s.initial=i.value.type==="AssignmentPattern"?A(i.value.right):null}}this.findLegacyProps()}findLegacyProps(){if(this.instanceProgram===null)return;for(let e of this.instanceProgram.body){if(e.type!=="ExportNamedDeclaration")continue;let{declaration:n}=e;if(n?.type==="VariableDeclaration"){if(n.kind!=="let"&&n.kind!=="var")continue;for(let t of n.declarations)for(let i of p(t.id)){let r=this.declared.get(i);if(r)r.prop=i.name}continue}if(e.source)continue;for(let t of e.specifiers){if(t.local.type!=="Identifier")continue;let i=this.instance.declarations.get(t.local.name);if(i?.kind!=="let"&&i?.kind!=="var")continue;i.prop=t.exported.type==="Identifier"?t.exported.name:String(t.exported.value)}}}}function T(e){return e.type==="ArrowFunctionExpression"||e.type==="FunctionExpression"||e.type==="FunctionDeclaration"}function d(e){if(!b.has(e.type)||!("attributes"in e))return null;for(let n of e.attributes??[])if(n.type==="Attribute"&&n.name==="slot"&&Array.isArray(n.value)&&n.value.length===1&&n.value[0].type==="Text")return n.value[0].data;return null}function h(e,n,t){if(e?.type!=="CallExpression")return null;let i=e.callee,r="";while(i.type==="MemberExpression"){if(i.computed||i.property.type!=="Identifier")return null;r=`.${i.property.name}${r}`,i=i.object}if(i.type==="CallExpression"&&i.callee.type==="Identifier")r=`()${r}`,i=i.callee;if(i.type!=="Identifier")return null;if(t!==null){let s=t.get(i);if(s?.binding!==null||s.store)return null}else if(n.get(i.name)!==null)return null;return r=i.name+r,W.has(r)?r:null}function A(e){if(e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="$bindable"){let[n]=e.arguments;return n===void 0||n.type==="SpreadElement"?null:n}return e}function x(e){if(e.type==="UseDirective")return 4;if(e.type==="AnimateDirective")return 8;if(e.intro&&e.outro)return 11;return e.intro?3:4}function E(e){if(e.type==="Identifier")return e.name;return e.type==="Literal"?String(e.value):null}export{R as analyzeScopes};
@@ -0,0 +1,3 @@
1
+ import{s,i}from"./shared-nbaaegmc.js";var x=0,d=1,C=2,h=3,M=0,P=1,N=2,y=3,_=4,w=4,Y=5,T=6,ee={await:d,case:d,default:d,delete:d,extends:d,in:d,instanceof:d,new:d,of:d,return:d,throw:d,typeof:d,void:d,yield:d,do:C,else:C,finally:C,try:C,for:w,if:w,while:w,with:w,import:Y,export:T},I=10,K=Array(v(128,0)).fill(null);for(let e of Object.entries(ee)){let r=v(e[0].charCodeAt(0),e[0].length),t=K[r]??[];t.push(e),K[r]=t}function v(e,r){return e*(I+1)+r}function H(e,r,t){let f=e.charCodeAt(r);if(f>=128||t-r>I)return h;let l=v(f,t-r),o=K[l];if(o===null)return h;for(let n=0;n<o.length;n++)if(e.startsWith(o[n][0],r))return o[n][1];return h}var z=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let r=e.charCodeAt(0);r<=e.charCodeAt(1);r++)z[r]=1;function a(e){return e>=128?!i(e):z[e]===1}function G(e,r,t){U(e,te(e,r),r,t,void 0)}function Ne(e,r){U(e,e.length-1,!1,void 0,r)}function U(e,r,t,f,l){let o=[],n=e.startsWith("#!")?oe(e,2):0,c=x,A=!1,E=!1,m=-1,p=()=>{if(c=x,o.length===0)m=-1};while(n<=r){let k=e.charCodeAt(n);if(k===32||k===10||i(k)){n++;continue}if(k===47){let u=S(e,n);if(u!==-1){n=u;continue}}let F=A,Q=E;if(A=!1,E=!1,a(k)||k===35){let u=n;n=J(e,n+1);let g=F?h:H(e,u,n);if(f!==void 0&&o.length===0&&(g===T?t||Z(e,n):g===Y&&X(e,n)))n=Math.max(n,f(m!==-1&&g===T?m:u,u)),p();else if(g===T)c=C;else if(g===w)E=!0,c=h;else c=g===d||g===C?g:h;continue}switch(n++,k){case 34:case 39:{let u=n-1;n=L(e,n,k),l?.(u,n,!1),c=h;break}case 96:{let u=n;n=W(e,n,o),l?.(u,B(e,n),!0),c=e.charCodeAt(n-1)===123?d:h;break}case 47:{let u=c===h?-1:V(e,n);if(u===-1)c=d;else n=O(e,u),c=h;break}case 40:o.push(Q?P:M),c=d;break;case 41:c=o.pop()===P?C:h;break;case 123:o.push(c===d?y:N),c=x;break;case 125:{let u=o.pop();if(u===_){let g=n;n=W(e,n,o),l?.(g,B(e,n),!0),c=e.charCodeAt(n-1)===123?d:h}else if(u===y)c=h;else p();break}case 59:p();break;case 93:c=h;break;case 46:if(s(e.charCodeAt(n)))n=O(e,n),c=h;else if(e.startsWith("..",n))n+=2,c=d;else A=!0,c=d;break;case 63:if(e.charCodeAt(n)===46&&!s(e.charCodeAt(n+1)))n++,A=!0;c=d;break;case 33:c=c===h&&!i(e.charCodeAt(n-2))?h:d;break;case 43:case 45:if(e.charCodeAt(n)===k&&c===h)n++;else c=d;break;case 61:if(c=e.charCodeAt(n)===62?C:d,c===C)n++;break;case 64:if(o.length===0&&m===-1)m=n-1;c=d;break;default:c=d}}}function R(e,r,t){let f=e.length,l=[],o=r,n=d,c=!1;while(o<f){let A=e.charCodeAt(o);if(A===32||A===10||i(A)){o++;continue}if(A===47){let m=S(e,o);if(m!==-1){o=m;continue}}let E=c;if(c=!1,a(A)||A===35){let m=o;if(o=J(e,o+1),!E&&t?.(m,o))return-1;let p=E?h:H(e,m,o);n=p===d||p===C||p===w?d:h;continue}switch(o++,A){case 34:case 39:o=L(e,o,A),n=h;break;case 96:o=W(e,o,l),n=e.charCodeAt(o-1)===123?d:h;break;case 47:{let m=n===h?-1:V(e,o);if(m===-1)n=d;else o=O(e,m),n=h;break}case 40:l.push(M),n=d;break;case 41:if(l.length===0)return o-1;l.pop(),n=h;break;case 123:l.push(n===d?y:N),n=x;break;case 125:{if(l.length===0)return o-1;let m=l.pop();if(m===_)o=W(e,o,l),n=e.charCodeAt(o-1)===123?d:h;else n=m===y?h:x;break}case 93:n=h;break;case 46:if(s(e.charCodeAt(o)))o=O(e,o),n=h;else if(e.startsWith("..",o))o+=2,n=d;else c=!0,n=d;break;case 63:if(e.charCodeAt(o)===46&&!s(e.charCodeAt(o+1)))o++,c=!0;n=d;break;case 33:n=n===h&&!i(e.charCodeAt(o-2))?h:d;break;case 43:case 45:if(e.charCodeAt(o)===A&&n===h)o++;else n=d;break;case 61:if(e.charCodeAt(o)===62)o++;n=d;break;default:n=d}}return f}function j(e){return e===10||e===13||e===8232||e===8233}function oe(e,r){for(let t=r;t<e.length;t++)if(j(e.charCodeAt(t)))return t;return e.length}function S(e,r){let t=e.charCodeAt(r+1);if(t===47)return oe(e,r+2);if(t!==42)return-1;let f=e.indexOf("*/",r+2);return f===-1?e.length:f+2}function J(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(f===92)t+=2;else if(a(f))t++;else break}return t}function O(e,r){let t=r;while(t<e.length&&a(e.charCodeAt(t)))t++;return t}function L(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===t)return f+1;if(l===92)f+=e.startsWith(`\r
2
+ `,f+1)?2:1;else if(l===10||l===13)return f}return e.length}function W(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===96)return f+1;if(l===92)f++;else if(l===36&&e.charCodeAt(f+1)===123)return t.push(_),f+2}return e.length}function B(e,r){let t=e.charCodeAt(r-1);if(t===96)return r-1;if(t===123&&e.charCodeAt(r-2)===36)return r-2;return r}function V(e,r){let t=!1;for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(j(l))return-1;if(l===92)f++;else if(l===91)t=!0;else if(l===93)t=!1;else if(l===47&&!t)return f+1}return-1}function b(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(i(f)){t++;continue}let l=f===47?S(e,t):-1;if(l===-1)return t;t=l}return e.length}function q(e,r,t){return e.charCodeAt(r)===t.charCodeAt(0)&&e.startsWith(t,r)&&!a(e.charCodeAt(r+t.length))}function X(e,r){let t=e.charCodeAt(b(e,r));return t!==40&&t!==46}function Z(e,r){let t=b(e,r);if(q(e,t,"import"))return!0;if(q(e,t,"type"))t=b(e,t+4);let f=e.charCodeAt(t);if(f===42)return!0;if(f!==123)return!1;for(t++;t<e.length;t++){let l=e.charCodeAt(t);if(l===125)break;if(l===34||l===39)t=L(e,t+1,l)-1;else if(l===47)t=Math.max(t,b(e,t)-1)}return q(e,b(e,t+1),"from")}var D=/import|export/g;function te(e,r){let t=-1;D.lastIndex=0;for(let f=D.exec(e);f!==null;f=D.exec(e)){let l=f.index,o=l+6;if(!a(e.charCodeAt(l-1))&&!a(e.charCodeAt(o))&&(e.charCodeAt(l)===105?X(e,o):r||Z(e,o)))t=l}return t}
3
+ export{a,G,Ne,R,oe,O,b,q};
@@ -0,0 +1,2 @@
1
+ import{A}from"./shared-n0fpkmn8.js";import{ne,he,fe,de}from"./shared-rh41v5ez.js";import{we}from"./shared-n1wnwhk8.js";import{v}from"./shared-v0nj05q2.js";import{c}from"./shared-vjpq32kx.js";function u(t,n,a){let p=he(t,n,a);return y(p),fe(p)}function y(t){let{source:n}=t,{tags:a,comments:p}=we(n),i=t.root.fragment.nodes,f=(e,r)=>{if(r<=e)return;let o=n.slice(e,r),d=o.includes("<")||o.includes("{")?o:A(o,!1,t.entityNames);i.push({type:"Text",start:e,end:r,raw:o,data:d})},s=0,m=0;for(let e of a){for(;m<p.length&&p[m]<e;m+=2){let r=p[m];if(r<s)continue;let o=p[m+1];f(s,r),i.push({type:"Comment",start:r,end:o,data:n.slice(r+4,o-3)}),s=o}if(e<s)continue;f(s,e),t.index=e,ne(t);while(t.stack.length>1&&t.index<n.length)de(t);s=t.index}let l=i.filter((e)=>e.type==="SvelteOptions");i.length=0,i.push(...l)}var S={typescript:c,entityNames:v};function ue(t,n){return u(t,n,S)}
2
+ export{ue};
@@ -0,0 +1,5 @@
1
+ var m=Array(2048).fill(void 0);function g(){m.fill(void 0)}function At(e,n,t,r){let i=r&2047,s=m[i];if(s!==void 0&&s.length===t-n&&e.startsWith(s,n))return s;let b=e.slice(n,t);return m[i]=b,b}var p="",u=[0],c=0,d=0,l;function C(e){g(),p=e,u=[0],c=0,d=0,l=void 0}function x(e){while(c<=e){let n=p.indexOf(`
2
+ `,c);if(n===-1){c=Number.POSITIVE_INFINITY;return}c=n+1,u.push(c)}}function Ae(e){let n=[0],t=e.indexOf(`
3
+ `);while(t!==-1)n.push(t+1),t=e.indexOf(`
4
+ `,t+1);return n}function ie(e,n,t){let r=0,i=e.length-1;if(n>=e[t])r=t;else i=t-1;if(r<i&&n<e[r+1])i=r;while(r<i){let s=r+i+1>>>1;if(e[s]<=n)r=s;else i=s-1}return r}function h(e){return x(e),d=ie(u,e,d),{line:d+1,column:e-u[d],character:e}}var a=/\r\n?|\n|\u2028|\u2029/g,E=/[\r\u2028\u2029]/;function wt(e){if(l===void 0){l=E.test(p)?[]:null,a.lastIndex=0;while(l!==null&&a.exec(p)!==null)l.push(a.lastIndex)}if(l===null)return x(e),ie(u,e,d);let n=0,t=l.length;while(n<t){let r=n+t>>>1;if(l[r]<=e)n=r+1;else t=r}return n}function _(e){let{line:n,column:t}=h(e);return{line:n,column:t}}function Et(e){while(u.length<=e+1&&c!==Number.POSITIVE_INFINITY)x(c);if(e>=u.length)return;let n=e+1<u.length?u[e+1]-1:p.length;return p.slice(u[e],n)}function Lt(e){let n,t=0;return(r)=>(n??=Ae(e),t=ie(n,r,t),{line:t+1,column:r-n[t]})}function o(e){return typeof e==="object"&&e!==null&&typeof f(e).type==="string"}function f(e){return e}function F(e,n){let t=f(e);for(let r in t){let i=t[r];if(Array.isArray(i)){for(let s=0;s<i.length;s++)if(o(i[s]))i[s]=n(i[s])}else if(o(i))t[r]=n(i)}}function ce(e,...n){if(!n.some((t)=>t===e.type))throw Error(`expected ${n.join(" or ")}, got ${e.type}`)}
5
+ export{At,C,Ae,ie,h,wt,_,Et,Lt,o,f,F,ce};
@@ -0,0 +1,2 @@
1
+ import{Ae,ie,o,f}from"./shared-4wqe6a27.js";function p(t){let e=[];return T(t,e),e}function T(t,e){switch(t.type){case"Identifier":e.push(t);return;case"ObjectPattern":for(let n of t.properties)T(n.type==="RestElement"?n.argument:n.value,e);return;case"ArrayPattern":for(let n of t.elements)if(n!==null)T(n,e);return;case"RestElement":T(t.argument,e);return;case"AssignmentPattern":T(t.left,e);return;case"TSParameterProperty":T(t.parameter,e);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":T(t.expression,e)}}function I(t,e){if(t.type!=="Identifier")return!1;if(e===null)return!0;switch(e.type){case"MemberExpression":return e.computed||t===e.object;case"MethodDefinition":return e.computed;case"Property":case"PropertyDefinition":return e.computed||t===e.value;case"ExportSpecifier":case"ImportSpecifier":return t===e.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 t===e.expression;case"TSEnumMember":return t===e.initializer;case"TSParameterProperty":case"TSEnumDeclaration":case"TSImportEqualsDeclaration":return!0;default:return!e.type.startsWith("TS")}}var k=64,A=new Map;function Nt(t,e){let n=A.get(t);if(n===void 0){if(A.size>=k)A.delete(A.keys().next().value);n={starts:Ae(t),last:0},A.set(t,n)}let s=ie(n.starts,e,n.last);return n.last=s,{line:s+1,column:e-n.starts[s]}}function Ct(t){let e=t;while(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression"||e.type==="TSTypeAssertion"||e.type==="TSNonNullExpression"||e.type==="TSInstantiationExpression")e=e.expression;return e}var x={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"]},i=["attributes","fragment"],Pt={Root:["fragment"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:[],HtmlTag:[],ConstTag:[],DeclarationTag:[],DebugTag:[],RenderTag:[],AttachTag:[],Attribute:["value"],SpreadAttribute:[],AnimateDirective:[],BindDirective:[],ClassDirective:[],LetDirective:[],OnDirective:[],StyleDirective:["value"],TransitionDirective:[],UseDirective:[],Component:i,TitleElement:i,SlotElement:i,RegularElement:i,SvelteBody:i,SvelteBoundary:i,SvelteComponent:i,SvelteDocument:i,SvelteElement:i,SvelteFragment:i,SvelteHead:i,SvelteOptions:i,SvelteSelf:i,SvelteWindow:i,IfBlock:["consequent","alternate"],EachBlock:["body","fallback"],AwaitBlock:["pending","then","catch"],KeyBlock:["fragment"],SnippetBlock:["body"]},r=[],g={...x,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:r,TSTypeParameterDeclaration:r,TSTypeParameterInstantiation:r,TSTypeParameter:r,TSArrayType:r,TSTupleType:r,TSNamedTupleMember:r,TSOptionalType:r,TSRestType:r,TSUnionType:r,TSIntersectionType:r,TSConditionalType:r,TSInferType:r,TSParenthesizedType:r,TSTypeOperator:r,TSIndexedAccessType:r,TSMappedType:r,TSLiteralType:r,TSTypeReference:r,TSTypeQuery:r,TSImportType:r,TSTypeLiteral:r,TSPropertySignature:r,TSMethodSignature:r,TSCallSignatureDeclaration:r,TSConstructSignatureDeclaration:r,TSFunctionType:r,TSConstructorType:r,TSIndexSignature:r,TSTypePredicate:r,TSInterfaceDeclaration:r,TSInterfaceBody:r,TSExpressionWithTypeArguments:r,TSTypeAliasDeclaration:r,TSNamespaceExportDeclaration:r,TSDeclareFunction:["id"],TSDeclareMethod:r,TSAsExpression:["expression"],TSSatisfiesExpression:["expression"],TSTypeAssertion:["expression"],TSInstantiationExpression:["expression"]},K=Object.assign(Object.create(null),x),O=Object.assign(Object.create(null),g),D=[],j=Symbol("sveast.walk.stop"),y=Symbol("sveast.walk.skip");function L(t,e,n){E(t,null,null,null,e,B(n))}function B(t){if(t===void 0||t===x)return w;if(t===g)return C;return(e)=>N(t,e.type)}function N(t,e){return Object.hasOwn(t,e)?t[e]:void 0}function M(t,e){if(t===void 0||t===x)return w(e);if(t===g)return C(e);return N(t,e.type)}function _t(t,e,n){let s=M(n,t);if(s===void 0)throw Error(`unknown node type: ${t.type}`);let l=f(t);for(let c=0;c<s.length;c++){let u=s[c],a=l[u];if(Array.isArray(a))for(let S=0;S<a.length;S++){let d=a[S];if(o(d))e(d,u,S)}else if(o(a))e(a,u,null)}}var R=Object.freeze([]),h=new WeakMap,V=new WeakMap;function It(t,e=x){let n=e===x?V:h.get(e);if(n===void 0)n=new WeakMap,h.set(e,n);let s=n.get(t);if(s===void 0){let l=[];_t(t,(c)=>l.push(c),e),s=l.length===0?R:l,n.set(t,s)}return s}function E(t,e,n,s,l,c){let u=c(t);if(u===void 0)throw Error(`unknown node type: ${t.type}`);let a=l.enter?.(t,e,n,s);if(a===j)return!0;if(a!==y){if(a!==t&&o(a))return W(a,e,n,s,l,c);let S=f(t);for(let d=0;d<u.length;d++){let v=u[d],m=S[v];if(Array.isArray(m))for(let b=0;b<m.length;b++){let P=m[b];if(o(P)&&E(P,t,v,b,l,c))return!0}else if(o(m)&&E(m,t,v,null,l,c))return!0}}return l.leave?.(t,e,n,s)===j}function w(t){let e=t.type;if(e==="Identifier")return t.typeAnnotation===void 0&&t.decorators===void 0?D:x.Identifier;if(e==="Literal")return x.Literal;if(e==="Text")return x.Text;return K[e]}function C(t){let e=t.type;if(e==="Identifier")return t.decorators===void 0?D:g.Identifier;if(e==="Literal")return g.Literal;if(e==="Text")return g.Text;return O[e]}function W(t,e,n,s,l,c){if(e===null||n===null)throw Error("walk can't replace the node it was called with");let u=f(e),a=u[n];if(s===null)u[n]=t;else if(Array.isArray(a))a[s]=t;return E(t,e,n,s,l,c)}
2
+ export{p,I,Nt,Ct,x,Pt,g,j,y,L,_t,It};
@@ -0,0 +1,2 @@
1
+ import{C}from"./shared-4wqe6a27.js";import{Z}from"./shared-jxkrk6hx.js";function T(e,r,o){return C(e),Z({isTypeScript:r.typescript??!1,typescript:o,loc:r.loc??!1,comments:r.comments??!0,root:{comments:[]}},e)}
2
+ export{T};
@@ -1,2 +1,2 @@
1
- import{q,D,a}from"./shared-wfjkg544.js";var N=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,O=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"]]),K=new Set("public private protected readonly declare abstract override static accessor".split(" ")),V=new Set("public private protected readonly override".split(" ")),H=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),U=new Set("var let const function class interface enum".split(" ")),k=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),L=1,j=32,z=256,G=0,Q=1,f=2,W=3,Y=4,T=6,C=7,R=256,E=1024,X=8|E,J=f|R,w=1,Z=2,I=40,tt=41,et=44,P=46,_=58,y=61,v=60,m=123,st=91,S=42,it=35,b=34,A=39,rt=SyntaxError("speculative parse failed"),F=q((x)=>{let{tokTypes:s,keywordTypes:M,isIdentifierChar:B,isIdentifierStart:u}=x.acorn,d=new x.acorn.TokenType("@");class g extends x{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(t,e,r){super(t,e,r);let i=this.options.onComment;if(typeof i==="function")this.options.onComment=(n,h,o,p,c,l)=>{if(o<this.$t)return;this.$t=p,i.call(this,n,h,o,p,c,l)}}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(t){if(t===64)return++this.pos,this.finishToken(d);return super.getTokenFromCode(t)}readToken_lt_gt(t){if(this.inType)return this.finishOp(s.relational,1);return super.readToken_lt_gt(t)}$a(t){let e=this.inType;this.inType=!0;let r=t();if(this.inType=e,!e&&this.type===s.relational)this.pos=this.start,this.nextToken();return r}$1(){return this.type===s.relational&&this.value==="<"}$p(){if(this.type===s.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(s.relational,"<");return this.$1()}$c(){return this.type===s.relational&&this.value===">"}$u(){return this.type===s.prefix&&this.value==="!"}hasPrecedingLineBreak(){return D(this.input,this.lastTokEnd,this.start)}$d(t=this.pos){return N.lastIndex=t,N.exec(this.input),N.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let t=this.$d(),e=t;while(e<this.input.length&&B(this.input.charCodeAt(e)))e++;return this.input.slice(t,e)}$b(){return!D(this.input,this.pos,this.$d())}$14(){return this.$b()&&u(this.$2())&&!Object.hasOwn(M,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(t){this.pos=t.pos,this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.startLoc=t.startLoc,this.endLoc=t.endLoc,this.lastTokStart=t.lastTokStart,this.lastTokEnd=t.lastTokEnd,this.lastTokStartLoc=t.lastTokStartLoc,this.lastTokEndLoc=t.lastTokEndLoc,this.curLine=t.curLine,this.lineStart=t.lineStart,this.context=t.context,this.exprAllowed=t.exprAllowed,this.containsEsc=t.containsEsc,this.inType=t.inType,this.$4=t.$4,this.$5=t.$5,this.$7=t.$7,this.scopeStack.length=t.scopes,this.privateNameStack.length=t.privateNames,this.labels=t.labels,this.labels.length=t.labelCount,this.strict=t.strict,this.yieldPos=t.yieldPos,this.awaitPos=t.awaitPos,this.awaitIdentPos=t.awaitIdentPos,this.potentialArrowAt=t.potentialArrowAt,this.potentialArrowInForAwait=t.potentialArrowInForAwait}raise(t,e){if(this.$n>0)throw rt;return super.raise(t,e)}$1y(t,e){try{super.raise(t,e)}catch(r){if(r instanceof SyntaxError)r.$1z=!0;throw r}throw Error("unreachable")}$g(t,e=!1){let r=this.$15();this.$n++;try{let i=t();if(e||i===void 0)this.$16(r);return i}catch(i){if(!(i instanceof SyntaxError)||!e&&i.$1z)throw i;this.$16(r);return}finally{this.$n--}}$v(t){return this.$g(t,!0)===!0}$17(t){if(t.end=this.lastTokEnd,this.options.locations)t.loc.end=this.lastTokEndLoc}$q(t,e){if(t.start=e.start,this.options.locations)t.loc.start=e.loc.start}$6(t=!1){let e=this.startNode();return e.typeAnnotation=this.$a(()=>(this.next(),t?this.$20():this.$0())),this.finishNode(e,"TSTypeAnnotation")}$h(t,e){if(e&&this.eat(s.question))t.optional=!0,this.$17(t);if(this.type===s.colon)t.typeAnnotation=this.$6(),this.$17(t);return t}$20(){if(this.type!==s.name&&this.type!==s._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&u(this.$2())){let t=this.startNode();if(this.next(),t.parameterName=this.type===s._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(t,!0);return t.asserts=!0,t.typeAnnotation=null,this.finishNode(t,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let t=this.startNode();return t.parameterName=this.type===s._this?this.$w():this.parseIdent(!0),this.$x(t,!1)}return this.$0()}$x(t,e){this.next();let r=this.startNode();return r.typeAnnotation=this.$0(),t.typeAnnotation=this.finishNode(r,"TSTypeAnnotation"),t.asserts=e,this.finishNode(t,"TSTypePredicate")}$w(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let t=this.$0();if(this.type!==s.eof)this.unexpected();return t}$0(){let t=this.$18();if(this.$4||this.type!==s._extends||this.hasPrecedingLineBreak())return t;let e=this.startNodeAt(t.start,t.loc?.start);return this.next(),e.checkType=t,e.extendsType=this.$i(!0,()=>this.$18()),this.expect(s.question),e.trueType=this.$i(!1,()=>this.$0()),this.expect(s.colon),e.falseType=this.$i(!1,()=>this.$0()),this.finishNode(e,"TSConditionalType")}$i(t,e){let r=this.$4;this.$4=t;let i=e();return this.$4=r,i}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===s._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",s.bitwiseOR,()=>this.$1a("TSIntersectionType",s.bitwiseAND,()=>this.$1b()))}$19(t){let e=this.startNode();if(t==="TSConstructorType"){if(e.abstract=this.isContextual("abstract"),e.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(e,s.arrow)),this.finishNode(e,t)}$r(t,e){if(this.$1())t.typeParameters=this.$8();if(this.expect(s.parenL),t.parameters=this.parseBindingList(s.parenR,!1,!0),this.type===e)t.typeAnnotation=this.$6(!0);else if(e===s.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==s.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===s.parenR||this.type===s.ellipsis)return!0;if(this.type===s.name||this.type===s._this)this.next();else if(this.type===s.braceL||this.type===s.bracketL)this.parseBindingAtom();else return!1;let t=this.type;if(t===s.colon||t===s.comma||t===s.question||t===s.eq)return!0;if(t!==s.parenR)return!1;return this.next(),this.type===s.arrow})}$1a(t,e,r){let i=this.startNode(),n=this.eat(e),h=[];do h.push(r());while(this.eat(e));if(h.length===1&&!n)return h[0];return i.types=h,this.finishNode(i,t)}$1b(){if(this.type===s.name&&!this.containsEsc){let t=this.value;if(t==="keyof"||t==="unique"||t==="readonly"){let e=this.startNode();return this.next(),e.operator=t,e.typeAnnotation=this.$1b(),this.finishNode(e,"TSTypeOperator")}if(t==="infer"){let e=this.startNode();this.next();let r=this.startNode();r.name=this.$y();let i=this.$g(()=>this.$22());if(i)r.constraint=i;return e.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(e,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(s._extends))return;let t=this.$i(!0,()=>this.$0());return this.$4||this.type!==s.question?t:void 0}$y(){if(this.type!==s.name&&!this.type.keyword)this.unexpected();let t=this.type===s.name?this.value:this.type.keyword;return this.next(),t}$23(){let t=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL)){let e=this.startNodeAt(t.start,t.loc?.start);if(this.eat(s.bracketR))e.elementType=t,t=this.finishNode(e,"TSArrayType");else e.objectType=t,e.indexType=this.$0(),this.expect(s.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}$24(){switch(this.type){case s.name:case s._void:case s._null:{let t=O.get(this.value);if(t&&(this.type!==s.name||!this.containsEsc&&this.$2()!==P)){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.$1c()}case s.string:case s.num:case s._true:case s._false:{let t=this.startNode();return t.literal=this.parseExprAtom(),this.finishNode(t,"TSLiteralType")}case s.plusMin:{if(this.value!=="-")break;let t=this.startNode(),e=this.startNode();if(this.next(),this.type!==s.num)this.unexpected();return e.operator="-",e.prefix=!0,e.argument=this.parseExprAtom(),t.literal=this.finishNode(e,"UnaryExpression"),this.finishNode(t,"TSLiteralType")}case s.backQuote:return this.$25();case s._this:{let t=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let e=this.startNodeAt(t.start,t.loc?.start);return e.parameterName=t,this.$x(e,!1)}return t}case s._typeof:return this.$26();case s._import:return this.$1d();case s.braceL:return this.$27()?this.$28():this.$29();case s.bracketL:return this.$2a();case s.parenL:{let t=this.startNode();return this.next(),t.typeAnnotation=this.$0(),this.expect(s.parenR),this.finishNode(t,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let t=this.startNode();if(t.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeReference")}$j(){let t=this.parseIdent(!0);while(this.eat(s.dot)){let e=this.startNodeAt(t.start,t.loc?.start);e.left=t,e.right=this.parseIdent(!0),t=this.finishNode(e,"TSQualifiedName")}return t}$26(){let t=this.startNode();if(this.next(),t.exprName=this.type===s._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeQuery")}$1d(){let t=this.startNode();if(this.next(),t.argument=this.$1e(),this.eat(s.dot))t.qualifier=this.$j();if(this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSImportType")}$z(){if(this.type!==s.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(s.parenL);let t=this.$z();return this.expect(s.parenR),t}$25(){let t=this.startNode(),e=this.startNode();this.next(),e.expressions=[];let r=this.parseTemplateElement({isTagged:!1});e.quasis=[r];while(!r.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),e.expressions.push(this.$0()),this.expect(s.braceR),r=this.parseTemplateElement({isTagged:!1}),e.quasis.push(r)}return this.next(),t.literal=this.finishNode(e,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===s.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==s.bracketL)return!1;if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s._in})}$28(){let t=this.startNode();if(this.expect(s.braceL),this.type===s.plusMin)t.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))t.readonly=!0;this.expect(s.bracketL);let e=this.startNode();if(e.name=this.$y(),this.expect(s._in),e.constraint=this.$0(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),t.nameType=this.eatContextual("as")?this.$0():null,this.expect(s.bracketR),this.type===s.plusMin)t.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))t.optional=!0;if(this.eat(s.colon))t.typeAnnotation=this.$0();return this.semicolon(),this.expect(s.braceR),this.finishNode(t,"TSMappedType")}$29(){let t=this.startNode();return t.members=this.$1f(),this.finishNode(t,"TSTypeLiteral")}$1f(){this.expect(s.braceL);let t=[];while(!this.eat(s.braceR))t.push(this.$2b());return t}$2b(){let t=this.startNode(),e="TSPropertySignature",r=this.type===s._new?this.$2():-1;if(this.type===s.parenL||this.$1())e="TSCallSignatureDeclaration",this.$r(t,s.colon);else if(r===I||r===v)e="TSConstructSignatureDeclaration",this.next(),this.$r(t,s.colon);else{let i=this.type===s._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),t.readonly=!0;if(this.type===s.bracketL&&this.$1g())return this.$1h(t);let n="method";if(i)t.key=i;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))n=this.value,this.next();this.parsePropertyName(t)}if(this.eat(s.question))t.optional=!0;if(this.type===s.parenL||this.$1()){if(e="TSMethodSignature",n!=="method")t.kind=n;this.$r(t,s.colon),t.kind=n}else if(this.type===s.colon)t.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(t,e)}$1i(){if(!this.eat(s.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s.colon})}$1h(t){if(this.expect(s.bracketL),t.parameters=[this.$h(this.parseIdent(),!1)],this.expect(s.bracketR),this.type===s.colon)t.typeAnnotation=this.$6();return this.$1i(),this.finishNode(t,"TSIndexSignature")}$2a(){let t=this.startNode();this.expect(s.bracketL),t.elementTypes=[];while(!this.eat(s.bracketR))if(t.elementTypes.push(this.$2c()),this.type!==s.bracketR)this.expect(s.comma);return this.finishNode(t,"TSTupleType")}$2c(){let t=this.start,e=this.startLoc,r=this.eat(s.ellipsis),i;if((this.type===s.name||this.type.keyword)&&this.$2d()){let n=this.startNode();n.label=this.parseIdent(!0),n.optional=this.eat(s.question),this.expect(s.colon),n.elementType=this.$0(),i=this.finishNode(n,"TSNamedTupleMember")}else if(i=this.$0(),this.eat(s.question)){let n=this.startNodeAt(i.start,i.loc?.start);n.typeAnnotation=i,i=this.finishNode(n,"TSOptionalType")}if(r){let n=this.startNodeAt(t,e);n.typeAnnotation=i,i=this.finishNode(n,"TSRestType")}return i}$2d(){let t=this.$d();if(this.input.charCodeAt(t)===63)t=this.$d(t+1);return this.input.charCodeAt(t)===_}$8(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c()){let e=this.startNode();while((this.type===s._const||this.type===s._in||this.isContextual("out"))&&u(this.$2()))e[this.value]=!0,this.next();if(e.name=this.$y(),this.eat(s._extends))e.constraint=this.$0();if(this.eat(s.eq))e.default=this.$0();if(t.params.push(this.finishNode(e,"TSTypeParameter")),!this.$c()){if(this.expect(s.comma),this.$c())t.extra={trailingComma:this.lastTokStart}}}if(this.next(),t.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(t,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c())if(t.params.push(this.$0()),!this.$c())this.expect(s.comma);if(t.params.length===0)this.unexpected();return this.next(),this.finishNode(t,"TSTypeParameterInstantiation")})}$1j(){let t=[];do{let e=this.startNode();if(e.expression=this.$j(),this.$1())e.typeParameters=this.$e();t.push(this.finishNode(e,"TSExpressionWithTypeArguments"))}while(this.eat(s.comma));return t}$1k(t=!1){if(this.type!==s.name||this.containsEsc){if(this.type===s._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(t);return this.$1l(this.startNode(),this.value)}$2e(t){switch(t){case"interface":case"type":case"namespace":return this.$14();case"enum":return u(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let e=this.$2();return this.$b()&&(e===b||e===A||u(e))}case"declare":return this.$b()&&H.has(this.$3());case"global":return this.$b()&&this.$2()===m}return!1}$1l(t,e){switch(e){case"interface":return this.$1m(t);case"type":return this.$2g(t);case"enum":return this.$10(t);case"abstract":return this.$1n(t,!0);case"global":return t.global=!0,t.id=this.parseIdent(),t.body=this.$11(),this.finishNode(t,"TSModuleDeclaration")}return this.$2h(t)}$2f(t){let e=this.$5;this.$5=!0;let r=this.startNode();this.next();let i=this.value;if(i==="const"&&this.$3()==="enum")r.const=!0;if(!t&&U.has(i))r.declare=!0;let n;if(r.const)n=this.$10(r);else if(i==="var"||i==="let"||i==="const")n=this.parseVarStatement(r,i,!0);else if(i==="function")this.next(),n=this.parseFunction(r,w,!1,!1);else if(i==="class")n=this.parseClass(r,!0);else n=this.$1l(r,i);return n.declare=!0,this.$5=e,n}$1n(t,e){return this.next(),t.abstract=!0,this.parseClass(t,e)}$1m(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,C),this.$1())t.typeParameters=this.$8();return this.$a(()=>{if(this.eat(s._extends))t.extends=this.$1j();let e=this.startNode();e.body=this.$1f(),t.body=this.finishNode(e,"TSInterfaceBody")}),this.finishNode(t,"TSInterfaceDeclaration")}$2g(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,T),this.$1())t.typeParameters=this.$8();return t.typeAnnotation=this.$a(()=>(this.expect(s.eq),this.$0())),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}$10(t){if(this.type===s._const)t.const=!0,this.next();this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,J),this.expect(s.braceL),t.members=[];while(!this.eat(s.braceR)){let e=this.startNode();if(e.id=this.type===s.string?this.parseExprAtom():this.parseIdent(!0),this.eat(s.eq))e.initializer=this.parseMaybeAssign();if(t.members.push(this.finishNode(e,"TSEnumMember")),this.type!==s.braceR)this.expect(s.comma)}return this.finishNode(t,"TSEnumDeclaration")}$2h(t){if(this.next(),this.type===s.string){if(t.id=this.parseExprAtom(),this.type===s.braceL)t.body=this.$11();else this.semicolon();return this.finishNode(t,"TSModuleDeclaration")}return t.id=this.parseIdent(),this.checkLValSimple(t.id,X),this.$1o(t)}$1o(t){if(this.eat(s.dot)){let e=this.startNode();e.id=this.parseIdent(),t.body=this.$1o(e)}else t.body=this.$11();return this.finishNode(t,"TSModuleDeclaration")}$11(){this.enterScope(z);let t=this.startNode();this.enterScope(0),this.expect(s.braceL),t.body=[];while(!this.eat(s.braceR))t.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(t,"TSModuleBlock")}$1p(t,e){if(t.isExport=e,t.id=this.parseIdent(),this.checkLValSimple(t.id,f),this.expect(s.eq),this.isContextual("require")&&this.$2()===I){let r=this.startNode();this.next(),r.expression=this.$1e(),t.moduleReference=this.finishNode(r,"TSExternalModuleReference")}else t.moduleReference=this.$j();return this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}$2i(){let t=this.$d();if(this.input.charCodeAt(t)!==y)return!1;let e=this.input.charCodeAt(t+1);return e!==y&&e!==62}parseStatement(t,e,r){if(this.type===d)this.$1q(!0);let i=this.$1k();if(i)return i;return super.parseStatement(t,e,r)}parseVarStatement(t,e,r){return super.parseVarStatement(t,e,r||this.$5)}parseVarId(t,e){if(super.parseVarId(t,e),t.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),t.definite=!0;this.$h(t.id,!1)}parseCatchClauseParam(){let t=this.$h(this.parseBindingAtom(),!1),e=t.type==="Identifier";return this.enterScope(e?j:0),this.checkLValPattern(t,e?Y:f),this.expect(s.parenR),t}parseImport(t){if(this.next(),t.importKind="value",this.type===s.string)t.specifiers=[],t.source=this.parseExprAtom();else{if(this.isContextual("type")){let e=this.$2();if(e===m||e===S||u(e)&&this.$3()!=="from")t.importKind="type",this.next()}if(this.type===s.name&&this.$2i())return this.$1p(t,!1);t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.$z()}return this.$1r(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=s._with;return this.type===s._with?super.parseWithClause():void 0}$1r(t){let e=this.parseWithClause();if(e)t.attributes=e}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(t){return this.$1s("exportKind",()=>super.parseExportSpecifier(t))}$1s(t,e){let r=this.isContextual("type")?this.$2():-1;if(r===b||r===A||u(r)&&this.$3()!=="as"){let n=this.startNode();this.next();let h=e();return this.$q(h,n),h[t]="type",h}let i=e();return i[t]="value",i}parseExport(t,e){if(this.next(),this.eat(s._import)){if(t.importKind="value",this.isContextual("type")&&u(this.$2())&&this.$3()!=="from")t.importKind="type",this.next();return this.$1p(t,!0)}if(this.eat(s.eq))return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),t.id=this.parseIdent(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration");if(t.exportKind="value",this.isContextual("type")){let n=this.$2();if(n===m||n===S)t.exportKind="type",this.next()}if(this.eat(s.star))return this.parseExportAllDeclaration(t,e);if(this.eat(s._default)){if(this.isContextual("interface")&&this.$14())t.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")t.declaration=this.$1n(this.startNode(),"nullableID");else t.declaration=this.parseExportDefaultDeclaration();return this.finishNode(t,"ExportDefaultDeclaration")}let r=this.isContextual("declare"),i=this.$1k(!0);if(i||this.shouldParseExportStatement()){if(t.declaration=i??this.parseStatement(null),r||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSTypeAliasDeclaration")t.exportKind="type";return t.specifiers=[],t.source=null,this.finishNode(t,"ExportNamedDeclaration")}if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))t.source=this.$z(),this.$1r(t);else{for(let n of t.specifiers)if(this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal")this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.");t.source=null}return this.semicolon(),this.finishNode(t,"ExportNamedDeclaration")}parseFunction(t,e,r,i,n){let h=e&w;if(h)this.$f=t,this.$o=t.start;super.parseFunction(t,e,r,i,n),this.$f=null;let o=!t.body;if(o)t.type="TSDeclareFunction";if(h&&t.id){if(o){if(this.$5&&this.currentScope().flags&L)this.declareName(t.id.name,E,t.id.start);this.checkLValSimple(t.id,G)}else if(!(e&Z)){let p=W;if(this.strict||t.generator||t.async)p=this.treatFunctionsAsVar?Q:f;this.checkLValSimple(t.id,p)}}return t}parseFunctionParams(t){if(this.$1())t.typeParameters=this.$8();if(super.parseFunctionParams(t),this.type===s.colon)t.returnType=this.$6(!0)}parseFunctionBody(t,e,r,i){if(r&&this.type===s.colon)t.returnType=this.$6(!0);if(e||this.type===s.braceL||t.start!==this.$o){super.parseFunctionBody(t,e,r,i);return}this.semicolon(),this.exitScope()}parseMethod(t,e,r){let i=this.$k;this.$k=null;let n=super.parseMethod(t,e,r);if(!n.body)n.type="TSDeclareMethod";if(i)n.typeParameters=i;return n}parseBindingList(t,e,r,i){let n=i===!0||this.$l;return this.$l=!1,super.parseBindingList(t,e,r,n)}$s(t){if(!t&&!this.$b())return!1;let e=this.$2();return e===st||e===m||e===S||e===P||e===it||e===b||e===A||e>=48&&e<=57||u(e)}parseAssignableListItem(t){let e=this.$12(),r=this.start,i=this.startLoc,n,h=!1,o=!1;if(t)while(this.type===s.name&&V.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")h=!0;else if(this.value==="override")o=!0;else n=this.value;this.next()}let p;if(this.type===s._this)p=this.startNode(),p.name="this",this.next(),this.finishNode(p,"Identifier");else p=this.parseBindingAtom();let c=this.type===s.eq?this.parseMaybeDefault(r,i,p):this.parseMaybeDefault(p.start,p.loc?.start,this.$h(p,!0));if(e.length>0)c.decorators=e;if(!n&&!h&&!o)return c;let l=this.startNodeAt(r,i);if(n)l.accessibility=n;if(h)l.readonly=!0;if(o)l.override=!0;return l.parameter=c,this.finishNode(l,"TSParameterProperty")}parseBindingListItem(t){if(t.type==="RestElement")this.$h(t,!0);return t}checkLValSimple(t,e,r){if(this.$f&&t===this.$f.id){this.$f=null;return}if(!e&&k.has(t.type)){this.checkLValSimple(t.expression,e,r);return}switch(t.type){case"TSParameterProperty":this.checkLValInnerPattern(t.parameter,e,r);return;case"Identifier":if(t.name==="this")return}super.checkLValSimple(t,e,r)}toAssignable(t,e,r){if(t&&!e&&k.has(t.type))return t;return super.toAssignable(t,e,r)}declareName(t,e,r){let i=this.currentScope();if(e&E){this.$1t(i,t),i.$1u??=[],i.$1u.push(t);return}if(e===T||e===C){if(i.$13??=[],e===T&&a(i.$13,t))this.raise(r,`type '${t}' has already been declared.`);i.$13.push(t),this.$1t(i,t);return}if(e&R){if(i.$1v??=[],a(i.$1v,t))return;super.declareName(t,f,r),i.$1v.push(t);return}super.declareName(t,e,r)}$1t(t,e){if(this.inModule&&t.flags&L)delete this.undefinedExports[e]}checkLocalExport(t){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(a(r.$13,t.name)||a(r.$1u,t.name))return}super.checkLocalExport(t)}checkExport(){}raiseRecoverable(t,e){if(e==="Duplicate constructor in the same class")return;super.raiseRecoverable(t,e)}$12(){let t=[];while(this.type===d)t.push(this.$1w());return t}$1q(t){let e=this.$9[this.$9.length-1];while(this.type===d)e.push(this.$1w());if(this.type===s._export){if(!t)this.unexpected()}else if(this.type!==s._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 t=this.startNode();this.next(),this.$9.push([]);let e=this.start,r=this.startLoc,i;if(this.type===s.parenL){if(this.next(),i=this.parseExpression(),this.expect(s.parenR),this.options.preserveParens){let h=this.startNodeAt(e,r);h.expression=i,i=this.finishNode(h,"ParenthesizedExpression")}}else{i=this.parseIdent(!1);while(this.eat(s.dot)){let h=this.startNodeAt(e,r);h.object=i,h.property=this.parseIdent(!0),h.computed=!1,i=this.finishNode(h,"MemberExpression")}}let n=this.$p()?this.$e():void 0;if(this.eat(s.parenL)){let h=this.startNodeAt(i.start,i.loc?.start);if(h.callee=i,h.arguments=this.parseExprList(s.parenR,!1,!1),n)h.typeArguments=n;i=this.finishNode(h,"CallExpression")}else if(n){let h=this.startNodeAt(i.start,i.loc?.start);h.expression=i,h.typeArguments=n,i=this.finishNode(h,"TSInstantiationExpression")}return t.expression=i,this.$9.pop(),this.finishNode(t,"Decorator")}shouldParseExportStatement(){return this.type===d||super.shouldParseExportStatement()}parseExprAtom(t,e,r){if(this.type===d)this.$1q(!1);return super.parseExprAtom(t,e,r)}parseProperty(t,e){if(t||this.type!==d)return super.parseProperty(t,e);let r=this.$12(),i=super.parseProperty(t,e);if(i.type==="SpreadElement")this.raise(i.start,"Decorators can't be used with SpreadElement");return i.decorators=r,i}parseClassId(t,e){let r=this.$9.length-1,i=this.$9[r];if(i.length>0)t.decorators=i,this.$q(t,i[0]),this.$9[r]=[];if(!this.isContextual("implements")||e===!0)super.parseClassId(t,e);if(this.$1())t.typeParameters=this.$8()}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.$1())t.superTypeParameters=this.$e();if(this.eatContextual("implements"))t.implements=this.$a(()=>this.$1j())}parseClassElement(t){if(this.type===d){let o=this.$12();if(this.type===s.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let p=this.parseClassElement(t);return p.decorators=o,this.$q(p,o[0]),p}if(this.eat(s.semi))return null;let e=this.startNode();while(this.type===s.name&&K.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let o=this.value;if(this.next(),o==="static"&&this.type===s.braceL)return this.next(),this.parseClassStaticBlock(e),e;if(o==="public"||o==="private"||o==="protected")e.accessibility=o;else e[o]=!0}if(this.type===s.bracketL&&this.$1g())return this.$1h(e);e.static??=!1;let r="",i=!1,n=!1,h="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())n=!0;else r="async";if(!r&&this.eat(s.star))i=!0;if(!r&&!n&&!i){let o=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())h=o;else r=o}if(r)e.computed=!1,e.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),e.key.name=r,this.finishNode(e.key,"Identifier");else this.parseClassElementName(e);if(this.eat(s.question))e.optional=!0;if(this.type===s.parenL||this.$1()||h!=="method"||i||n){let o=e.key,p=!e.static&&!e.computed&&(o.type==="Identifier"&&o.name==="constructor"||o.type==="Literal"&&o.value==="constructor");if(e.kind=p?"constructor":h,this.$1())e.typeParameters=this.$8();this.$l=p,this.$o=this.start,this.parseClassMethod(e,i,n,p&&t)}else{if(!e.optional&&this.$u())this.next(),e.definite=!0;if(this.type===s.colon)e.typeAnnotation=this.$6();this.parseClassField(e)}return e}parseMaybeAssign(t,e,r){if(this.$p()){let i=this.$g(()=>{let n=this.$8(),h=super.parseMaybeAssign(t,e,r);if(h.type!=="ArrowFunctionExpression")return;return h.typeParameters=n,this.$q(h,n),h});if(i)return i}return super.parseMaybeAssign(t,e,r)}parseMaybeUnary(t,e,r,i){if(this.$p()){let n=this.startNode();return n.typeAnnotation=this.$a(()=>{this.next();let h=this.$0();if(!this.$c())this.unexpected();return this.next(),h}),n.expression=this.parseMaybeUnary(null,!1,!1,i),this.finishNode(n,"TSTypeAssertion")}return super.parseMaybeUnary(t,e,r,i)}parseMaybeConditional(t,e){let r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.type===s.question&&!(n.type==="ArrowFunctionExpression"&&n.start===r)&&!this.$2j()){this.next();let h=this.startNodeAt(r,i);return h.test=n,h.consequent=this.parseMaybeAssign(),this.expect(s.colon),h.alternate=this.parseMaybeAssign(t),this.finishNode(h,"ConditionalExpression")}return n}$2j(){let t=this.$d(),e=this.input.charCodeAt(t);if(e===_||e===et||e===tt)return!0;return e===y&&this.input.charCodeAt(t+1)!==y}parseParenItem(t){return this.$h(t,!0)}$1x(){if(this.type!==s.colon)return!0;let t=this.$g(()=>{let e=this.$6(!0);return this.type===s.arrow&&!this.canInsertSemicolon()?e:void 0});if(!t)return!1;return this.$7=t,!0}shouldParseArrow(t){return this.$1x()&&super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(t,e,r,i){if(this.$7)t.returnType=this.$7,this.$7=null;return super.parseArrowExpression(t,e,r,i)}parseExprList(t,e,r,i){if(!this.$m)return super.parseExprList(t,e,r,i);this.$m=!1;let n=[],h=!0;while(!this.eat(t)){if(h)h=!1;else if(this.expect(s.comma),e&&this.afterTrailingComma(t))break;if(this.type===s.ellipsis){let o=this.parseSpread(i);if(this.eat(s.question))o.optional=!0;if(this.type===s.colon)o.typeAnnotation=this.$6();n.push(o)}else n.push(this.parseMaybeAssign(!1,i,this.parseParenItem))}return n}parseSubscript(t,e,r,i,n,h,o){if(this.$u()&&!this.hasPrecedingLineBreak()){let c=this.startNodeAt(e,r);return this.exprAllowed=!1,this.next(),c.expression=t,this.finishNode(c,"TSNonNullExpression")}if(n&&this.$1()){let c=this.$g(()=>this.$2k(e,r,o));if(c)return c}let p=this.type===s.questionDot&&this.$2()===v;if(this.$1()||p||this.type===s.bitShift&&this.value==="<<"){let c=this.$g(()=>{if(p)this.next();this.$p();let l=this.$e();if(this.type===s.parenL&&!i)return l;if(this.type===s.backQuote)return p?void 0:l;if(p)return;if(this.$c()||this.type===s.bitShift||this.type.startsExpr&&this.type!==s.parenL&&!this.hasPrecedingLineBreak())return;return l});if(c){let l=this.startNodeAt(e,r);if(this.type===s.parenL&&!i){if(this.next(),l.callee=t,l.arguments=this.parseExprList(s.parenR,!0,!1),l.typeArguments=c,p)t.optional=!0;if(p||h)l.optional=p;return this.finishNode(l,"CallExpression")}if(this.type===s.backQuote)return l.tag=t,l.quasi=this.parseTemplate({isTagged:!0}),l.typeArguments=c,this.finishNode(l,"TaggedTemplateExpression");return l.expression=t,l.typeArguments=c,this.finishNode(l,"TSInstantiationExpression")}}if(n&&this.type===s.parenL)this.$m=!0;return super.parseSubscript(t,e,r,i,n,h,o)}$2k(t,e,r){let i=this.startNodeAt(t,e);if(i.typeParameters=this.$8(),this.expect(s.parenL),i.params=this.parseBindingList(s.parenR,!1,!0),this.type===s.colon)i.returnType=this.$6(!0);if(this.type!==s.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(i,i.params,!0,r)}parseDynamicImport(t){if(this.next(),t.source=this.parseMaybeAssign(),this.eat(s.comma)&&this.type!==s.parenR)t.arguments=[this.parseExpression()];return this.expect(s.parenR),this.finishNode(t,"ImportExpression")}parseNew(){let t=super.parseNew();if(t.callee?.type!=="TSInstantiationExpression")return t;let e=this.startNodeAt(t.start,t.loc?.start);return e.callee=t.callee.expression,e.typeArguments=t.callee.typeArguments,e.arguments=t.arguments,this.finishNodeAt(e,"NewExpression",t.end,t.loc?.end)}parseExprOp(t,e,r,i,n){if(s._in.binop>i&&this.type===s.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let h=this.value==="satisfies",o=this.startNodeAt(e,r);return o.expression=t,o.typeAnnotation=this.$a(()=>{if(this.next(),!h&&this.type===s._const){let p=this.startNode();return p.typeName=this.parseIdent(!0),this.finishNode(p,"TSTypeReference")}return this.$0()}),this.finishNode(o,h?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(o,e,r,i,n)}return super.parseExprOp(t,e,r,i,n)}parseGetterSetter(t){t.kind=t.key.name,super.parseGetterSetter(t)}parsePropertyValue(t,e,r,i,n,h,o,p){if(!e&&this.$1()){if(this.$k=this.$8(),this.type!==s.parenL)this.unexpected();t.kind="init"}return super.parsePropertyValue(t,e,r,i,n,h,o,p)}}return g});
2
- export{F};
1
+ import{M,V,l}from"./shared-xyqvjc3m.js";var N=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,F=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"]]),q=new Set("public private protected readonly declare abstract override static accessor".split(" ")),O=new Set("public private protected readonly override".split(" ")),K=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),H=new Set("var let const function class interface enum".split(" ")),k=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),L=1,U=32,j=256,G=0,Q=1,f=2,W=3,Y=4,T=6,C=7,R=256,E=1024,X=8|E,J=f|R,w=1,Z=2,I=40,tt=41,et=44,P=46,_=58,y=61,v=60,m=123,st=91,S=42,it=35,b=34,A=39,rt=SyntaxError("speculative parse failed"),z=M((x)=>{let{tokTypes:s,keywordTypes:D,isIdentifierChar:B,isIdentifierStart:u}=x.acorn,d=new x.acorn.TokenType("@");class g extends x{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(t,e,r){super(t,e,r);let i=this.options.onComment;if(typeof i==="function")this.options.onComment=(n,a,h,o,c,p)=>{if(h<this.$t)return;this.$t=o,i.call(this,n,a,h,o,c,p)}}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(t){if(t===64)return++this.pos,this.finishToken(d);return super.getTokenFromCode(t)}readToken_lt_gt(t){if(this.inType)return this.finishOp(s.relational,1);return super.readToken_lt_gt(t)}$a(t){let e=this.inType;this.inType=!0;let r=t();if(this.inType=e,!e&&this.type===s.relational)this.pos=this.start,this.nextToken();return r}$1(){return this.type===s.relational&&this.value==="<"}$p(){if(this.type===s.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(s.relational,"<");return this.$1()}$c(){return this.type===s.relational&&this.value===">"}$u(){return this.type===s.prefix&&this.value==="!"}hasPrecedingLineBreak(){return V(this.input,this.lastTokEnd,this.start)}$d(t=this.pos){return N.lastIndex=t,N.exec(this.input),N.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let t=this.$d(),e=t;while(e<this.input.length&&B(this.input.charCodeAt(e)))e++;return this.input.slice(t,e)}$b(){return!V(this.input,this.pos,this.$d())}$14(){return this.$b()&&u(this.$2())&&!Object.hasOwn(D,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(t){this.pos=t.pos,this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.startLoc=t.startLoc,this.endLoc=t.endLoc,this.lastTokStart=t.lastTokStart,this.lastTokEnd=t.lastTokEnd,this.lastTokStartLoc=t.lastTokStartLoc,this.lastTokEndLoc=t.lastTokEndLoc,this.curLine=t.curLine,this.lineStart=t.lineStart,this.context=t.context,this.exprAllowed=t.exprAllowed,this.containsEsc=t.containsEsc,this.inType=t.inType,this.$4=t.$4,this.$5=t.$5,this.$7=t.$7,this.scopeStack.length=t.scopes,this.privateNameStack.length=t.privateNames,this.labels=t.labels,this.labels.length=t.labelCount,this.strict=t.strict,this.yieldPos=t.yieldPos,this.awaitPos=t.awaitPos,this.awaitIdentPos=t.awaitIdentPos,this.potentialArrowAt=t.potentialArrowAt,this.potentialArrowInForAwait=t.potentialArrowInForAwait}raise(t,e){if(this.$n>0)throw rt;return super.raise(t,e)}$1y(t,e){try{super.raise(t,e)}catch(r){if(r instanceof SyntaxError)r.$1z=!0;throw r}throw Error("unreachable")}$g(t,e=!1){let r=this.$15();this.$n++;try{let i=t();if(e||i===void 0)this.$16(r);return i}catch(i){if(!(i instanceof SyntaxError)||!e&&i.$1z)throw i;this.$16(r);return}finally{this.$n--}}$v(t){return this.$g(t,!0)===!0}$17(t){if(t.end=this.lastTokEnd,this.options.locations)t.loc.end=this.lastTokEndLoc}$q(t,e){if(t.start=e.start,this.options.locations)t.loc.start=e.loc.start}$6(t=!1){let e=this.startNode();return e.typeAnnotation=this.$a(()=>(this.next(),t?this.$20():this.$0())),this.finishNode(e,"TSTypeAnnotation")}$h(t,e){if(e&&this.eat(s.question))t.optional=!0,this.$17(t);if(this.type===s.colon)t.typeAnnotation=this.$6(),this.$17(t);return t}$20(){if(this.type!==s.name&&this.type!==s._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&u(this.$2())){let t=this.startNode();if(this.next(),t.parameterName=this.type===s._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(t,!0);return t.asserts=!0,t.typeAnnotation=null,this.finishNode(t,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let t=this.startNode();return t.parameterName=this.type===s._this?this.$w():this.parseIdent(!0),this.$x(t,!1)}return this.$0()}$x(t,e){this.next();let r=this.startNode();return r.typeAnnotation=this.$0(),t.typeAnnotation=this.finishNode(r,"TSTypeAnnotation"),t.asserts=e,this.finishNode(t,"TSTypePredicate")}$w(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let t=this.$0();if(this.type!==s.eof)this.unexpected();return t}$0(){let t=this.$18();if(this.$4||this.type!==s._extends||this.hasPrecedingLineBreak())return t;let e=this.startNodeAt(t.start,t.loc?.start);return this.next(),e.checkType=t,e.extendsType=this.$i(!0,()=>this.$18()),this.expect(s.question),e.trueType=this.$i(!1,()=>this.$0()),this.expect(s.colon),e.falseType=this.$i(!1,()=>this.$0()),this.finishNode(e,"TSConditionalType")}$i(t,e){let r=this.$4;this.$4=t;let i=e();return this.$4=r,i}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===s._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",s.bitwiseOR,()=>this.$1a("TSIntersectionType",s.bitwiseAND,()=>this.$1b()))}$19(t){let e=this.startNode();if(t==="TSConstructorType"){if(e.abstract=this.isContextual("abstract"),e.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(e,s.arrow)),this.finishNode(e,t)}$r(t,e){if(this.$1())t.typeParameters=this.$8();if(this.expect(s.parenL),t.parameters=this.parseBindingList(s.parenR,!1,!0),this.type===e)t.typeAnnotation=this.$6(!0);else if(e===s.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==s.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===s.parenR||this.type===s.ellipsis)return!0;if(this.type===s.name||this.type===s._this)this.next();else if(this.type===s.braceL||this.type===s.bracketL)this.parseBindingAtom();else return!1;let t=this.type;if(t===s.colon||t===s.comma||t===s.question||t===s.eq)return!0;if(t!==s.parenR)return!1;return this.next(),this.type===s.arrow})}$1a(t,e,r){let i=this.startNode(),n=this.eat(e),a=[];do a.push(r());while(this.eat(e));if(a.length===1&&!n)return a[0];return i.types=a,this.finishNode(i,t)}$1b(){if(this.type===s.name&&!this.containsEsc){let t=this.value;if(t==="keyof"||t==="unique"||t==="readonly"){let e=this.startNode();return this.next(),e.operator=t,e.typeAnnotation=this.$1b(),this.finishNode(e,"TSTypeOperator")}if(t==="infer"){let e=this.startNode();this.next();let r=this.startNode();r.name=this.$y();let i=this.$g(()=>this.$22());if(i)r.constraint=i;return e.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(e,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(s._extends))return;let t=this.$i(!0,()=>this.$0());return this.$4||this.type!==s.question?t:void 0}$y(){if(this.type!==s.name&&!this.type.keyword)this.unexpected();let t=this.type===s.name?this.value:this.type.keyword;return this.next(),t}$23(){let t=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL)){let e=this.startNodeAt(t.start,t.loc?.start);if(this.eat(s.bracketR))e.elementType=t,t=this.finishNode(e,"TSArrayType");else e.objectType=t,e.indexType=this.$0(),this.expect(s.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}$24(){switch(this.type){case s.name:case s._void:case s._null:{let t=F.get(this.value);if(t&&(this.type!==s.name||!this.containsEsc&&this.$2()!==P)){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.$1c()}case s.string:case s.num:case s._true:case s._false:{let t=this.startNode();return t.literal=this.parseExprAtom(),this.finishNode(t,"TSLiteralType")}case s.plusMin:{if(this.value!=="-")break;let t=this.startNode(),e=this.startNode();if(this.next(),this.type!==s.num)this.unexpected();return e.operator="-",e.prefix=!0,e.argument=this.parseExprAtom(),t.literal=this.finishNode(e,"UnaryExpression"),this.finishNode(t,"TSLiteralType")}case s.backQuote:return this.$25();case s._this:{let t=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let e=this.startNodeAt(t.start,t.loc?.start);return e.parameterName=t,this.$x(e,!1)}return t}case s._typeof:return this.$26();case s._import:return this.$1d();case s.braceL:return this.$27()?this.$28():this.$29();case s.bracketL:return this.$2a();case s.parenL:{let t=this.startNode();return this.next(),t.typeAnnotation=this.$0(),this.expect(s.parenR),this.finishNode(t,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let t=this.startNode();if(t.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeReference")}$j(){let t=this.parseIdent(!0);while(this.eat(s.dot)){let e=this.startNodeAt(t.start,t.loc?.start);e.left=t,e.right=this.parseIdent(!0),t=this.finishNode(e,"TSQualifiedName")}return t}$26(){let t=this.startNode();if(this.next(),t.exprName=this.type===s._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeQuery")}$1d(){let t=this.startNode();if(this.next(),t.argument=this.$1e(),this.eat(s.dot))t.qualifier=this.$j();if(this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSImportType")}$z(){if(this.type!==s.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(s.parenL);let t=this.$z();return this.expect(s.parenR),t}$25(){let t=this.startNode(),e=this.startNode();this.next(),e.expressions=[];let r=this.parseTemplateElement({isTagged:!1});e.quasis=[r];while(!r.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),e.expressions.push(this.$0()),this.expect(s.braceR),r=this.parseTemplateElement({isTagged:!1}),e.quasis.push(r)}return this.next(),t.literal=this.finishNode(e,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===s.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==s.bracketL)return!1;if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s._in})}$28(){let t=this.startNode();if(this.expect(s.braceL),this.type===s.plusMin)t.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))t.readonly=!0;this.expect(s.bracketL);let e=this.startNode();if(e.name=this.$y(),this.expect(s._in),e.constraint=this.$0(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),t.nameType=this.eatContextual("as")?this.$0():null,this.expect(s.bracketR),this.type===s.plusMin)t.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))t.optional=!0;if(this.eat(s.colon))t.typeAnnotation=this.$0();return this.semicolon(),this.expect(s.braceR),this.finishNode(t,"TSMappedType")}$29(){let t=this.startNode();return t.members=this.$1f(),this.finishNode(t,"TSTypeLiteral")}$1f(){this.expect(s.braceL);let t=[];while(!this.eat(s.braceR))t.push(this.$2b());return t}$2b(){let t=this.startNode(),e="TSPropertySignature",r=this.type===s._new?this.$2():-1;if(this.type===s.parenL||this.$1())e="TSCallSignatureDeclaration",this.$r(t,s.colon);else if(r===I||r===v)e="TSConstructSignatureDeclaration",this.next(),this.$r(t,s.colon);else{let i=this.type===s._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),t.readonly=!0;if(this.type===s.bracketL&&this.$1g())return this.$1h(t);let n="method";if(i)t.key=i;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))n=this.value,this.next();this.parsePropertyName(t)}if(this.eat(s.question))t.optional=!0;if(this.type===s.parenL||this.$1()){if(e="TSMethodSignature",n!=="method")t.kind=n;this.$r(t,s.colon),t.kind=n}else if(this.type===s.colon)t.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(t,e)}$1i(){if(!this.eat(s.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s.colon})}$1h(t){if(this.expect(s.bracketL),t.parameters=[this.$h(this.parseIdent(),!1)],this.expect(s.bracketR),this.type===s.colon)t.typeAnnotation=this.$6();return this.$1i(),this.finishNode(t,"TSIndexSignature")}$2a(){let t=this.startNode();this.expect(s.bracketL),t.elementTypes=[];while(!this.eat(s.bracketR))if(t.elementTypes.push(this.$2c()),this.type!==s.bracketR)this.expect(s.comma);return this.finishNode(t,"TSTupleType")}$2c(){let t=this.start,e=this.startLoc,r=this.eat(s.ellipsis),i;if((this.type===s.name||this.type.keyword)&&this.$2d()){let n=this.startNode();n.label=this.parseIdent(!0),n.optional=this.eat(s.question),this.expect(s.colon),n.elementType=this.$0(),i=this.finishNode(n,"TSNamedTupleMember")}else if(i=this.$0(),this.eat(s.question)){let n=this.startNodeAt(i.start,i.loc?.start);n.typeAnnotation=i,i=this.finishNode(n,"TSOptionalType")}if(r){let n=this.startNodeAt(t,e);n.typeAnnotation=i,i=this.finishNode(n,"TSRestType")}return i}$2d(){let t=this.$d();if(this.input.charCodeAt(t)===63)t=this.$d(t+1);return this.input.charCodeAt(t)===_}$8(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c()){let e=this.startNode();while((this.type===s._const||this.type===s._in||this.isContextual("out"))&&u(this.$2()))e[this.value]=!0,this.next();if(e.name=this.$y(),this.eat(s._extends))e.constraint=this.$0();if(this.eat(s.eq))e.default=this.$0();if(t.params.push(this.finishNode(e,"TSTypeParameter")),!this.$c()){if(this.expect(s.comma),this.$c())t.extra={trailingComma:this.lastTokStart}}}if(this.next(),t.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(t,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c())if(t.params.push(this.$0()),!this.$c())this.expect(s.comma);if(t.params.length===0)this.unexpected();return this.next(),this.finishNode(t,"TSTypeParameterInstantiation")})}$1j(){let t=[];do{let e=this.startNode();if(e.expression=this.$j(),this.$1())e.typeParameters=this.$e();t.push(this.finishNode(e,"TSExpressionWithTypeArguments"))}while(this.eat(s.comma));return t}$1k(t=!1){if(this.type!==s.name||this.containsEsc){if(this.type===s._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(t);return this.$1l(this.startNode(),this.value)}$2e(t){switch(t){case"interface":case"type":case"namespace":return this.$14();case"enum":return u(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let e=this.$2();return this.$b()&&(e===b||e===A||u(e))}case"declare":return this.$b()&&K.has(this.$3());case"global":return this.$b()&&this.$2()===m}return!1}$1l(t,e){switch(e){case"interface":return this.$1m(t);case"type":return this.$2g(t);case"enum":return this.$10(t);case"abstract":return this.$1n(t,!0);case"global":return t.global=!0,t.id=this.parseIdent(),t.body=this.$11(),this.finishNode(t,"TSModuleDeclaration")}return this.$2h(t)}$2f(t){let e=this.$5;this.$5=!0;let r=this.startNode();this.next();let i=this.value;if(i==="const"&&this.$3()==="enum")r.const=!0;if(!t&&H.has(i))r.declare=!0;let n;if(r.const)n=this.$10(r);else if(i==="var"||i==="let"||i==="const")n=this.parseVarStatement(r,i,!0);else if(i==="function")this.next(),n=this.parseFunction(r,w,!1,!1);else if(i==="class")n=this.parseClass(r,!0);else n=this.$1l(r,i);return n.declare=!0,this.$5=e,n}$1n(t,e){return this.next(),t.abstract=!0,this.parseClass(t,e)}$1m(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,C),this.$1())t.typeParameters=this.$8();return this.$a(()=>{if(this.eat(s._extends))t.extends=this.$1j();let e=this.startNode();e.body=this.$1f(),t.body=this.finishNode(e,"TSInterfaceBody")}),this.finishNode(t,"TSInterfaceDeclaration")}$2g(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,T),this.$1())t.typeParameters=this.$8();return t.typeAnnotation=this.$a(()=>(this.expect(s.eq),this.$0())),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}$10(t){if(this.type===s._const)t.const=!0,this.next();this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,J),this.expect(s.braceL),t.members=[];while(!this.eat(s.braceR)){let e=this.startNode();if(e.id=this.type===s.string?this.parseExprAtom():this.parseIdent(!0),this.eat(s.eq))e.initializer=this.parseMaybeAssign();if(t.members.push(this.finishNode(e,"TSEnumMember")),this.type!==s.braceR)this.expect(s.comma)}return this.finishNode(t,"TSEnumDeclaration")}$2h(t){if(this.next(),this.type===s.string){if(t.id=this.parseExprAtom(),this.type===s.braceL)t.body=this.$11();else this.semicolon();return this.finishNode(t,"TSModuleDeclaration")}return t.id=this.parseIdent(),this.checkLValSimple(t.id,X),this.$1o(t)}$1o(t){if(this.eat(s.dot)){let e=this.startNode();e.id=this.parseIdent(),t.body=this.$1o(e)}else t.body=this.$11();return this.finishNode(t,"TSModuleDeclaration")}$11(){this.enterScope(j);let t=this.startNode();this.enterScope(0),this.expect(s.braceL),t.body=[];while(!this.eat(s.braceR))t.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(t,"TSModuleBlock")}$1p(t,e){if(t.isExport=e,t.id=this.parseIdent(),this.checkLValSimple(t.id,f),this.expect(s.eq),this.isContextual("require")&&this.$2()===I){let r=this.startNode();this.next(),r.expression=this.$1e(),t.moduleReference=this.finishNode(r,"TSExternalModuleReference")}else t.moduleReference=this.$j();return this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}$2i(){let t=this.$d();if(this.input.charCodeAt(t)!==y)return!1;let e=this.input.charCodeAt(t+1);return e!==y&&e!==62}parseStatement(t,e,r){if(this.type===d)this.$1q(!0);let i=this.$1k();if(i)return i;return super.parseStatement(t,e,r)}parseVarStatement(t,e,r){return super.parseVarStatement(t,e,r||this.$5)}parseVarId(t,e){if(super.parseVarId(t,e),t.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),t.definite=!0;this.$h(t.id,!1)}parseCatchClauseParam(){let t=this.$h(this.parseBindingAtom(),!1),e=t.type==="Identifier";return this.enterScope(e?U:0),this.checkLValPattern(t,e?Y:f),this.expect(s.parenR),t}parseImport(t){if(this.next(),t.importKind="value",this.type===s.string)t.specifiers=[],t.source=this.parseExprAtom();else{if(this.isContextual("type")){let e=this.$2();if(e===m||e===S||u(e)&&this.$3()!=="from")t.importKind="type",this.next()}if(this.type===s.name&&this.$2i())return this.$1p(t,!1);t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.$z()}return this.$1r(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=s._with;return this.type===s._with?super.parseWithClause():void 0}$1r(t){let e=this.parseWithClause();if(e)t.attributes=e}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(t){return this.$1s("exportKind",()=>super.parseExportSpecifier(t))}$1s(t,e){let r=this.isContextual("type")?this.$2():-1;if(r===b||r===A||u(r)&&this.$3()!=="as"){let n=this.startNode();this.next();let a=e();return this.$q(a,n),a[t]="type",a}let i=e();return i[t]="value",i}parseExport(t,e){if(this.next(),this.eat(s._import)){if(t.importKind="value",this.isContextual("type")&&u(this.$2())&&this.$3()!=="from")t.importKind="type",this.next();return this.$1p(t,!0)}if(this.eat(s.eq))return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),t.id=this.parseIdent(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration");if(t.exportKind="value",this.isContextual("type")){let n=this.$2();if(n===m||n===S)t.exportKind="type",this.next()}if(this.eat(s.star))return this.parseExportAllDeclaration(t,e);if(this.eat(s._default)){if(this.isContextual("interface")&&this.$14())t.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")t.declaration=this.$1n(this.startNode(),"nullableID");else t.declaration=this.parseExportDefaultDeclaration();return this.finishNode(t,"ExportDefaultDeclaration")}let r=this.isContextual("declare"),i=this.$1k(!0);if(i||this.shouldParseExportStatement()){if(t.declaration=i??this.parseStatement(null),r||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSTypeAliasDeclaration")t.exportKind="type";return t.specifiers=[],t.source=null,this.finishNode(t,"ExportNamedDeclaration")}if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))t.source=this.$z(),this.$1r(t);else{for(let n of t.specifiers)if(this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal")this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.");t.source=null}return this.semicolon(),this.finishNode(t,"ExportNamedDeclaration")}parseFunction(t,e,r,i,n){let a=e&w;if(a)this.$f=t,this.$o=t.start;super.parseFunction(t,e,r,i,n),this.$f=null;let h=!t.body;if(h)t.type="TSDeclareFunction";if(a&&t.id){if(h){if(this.$5&&this.currentScope().flags&L)this.declareName(t.id.name,E,t.id.start);this.checkLValSimple(t.id,G)}else if(!(e&Z)){let o=W;if(this.strict||t.generator||t.async)o=this.treatFunctionsAsVar?Q:f;this.checkLValSimple(t.id,o)}}return t}parseFunctionParams(t){if(this.$1())t.typeParameters=this.$8();if(super.parseFunctionParams(t),this.type===s.colon)t.returnType=this.$6(!0)}parseFunctionBody(t,e,r,i){if(r&&this.type===s.colon)t.returnType=this.$6(!0);if(e||this.type===s.braceL||t.start!==this.$o){super.parseFunctionBody(t,e,r,i);return}this.semicolon(),this.exitScope()}parseMethod(t,e,r){let i=this.$k;this.$k=null;let n=super.parseMethod(t,e,r);if(!n.body)n.type="TSDeclareMethod";if(i)n.typeParameters=i;return n}parseBindingList(t,e,r,i){let n=i===!0||this.$l;return this.$l=!1,super.parseBindingList(t,e,r,n)}$s(t){if(!t&&!this.$b())return!1;let e=this.$2();return e===st||e===m||e===S||e===P||e===it||e===b||e===A||e>=48&&e<=57||u(e)}parseAssignableListItem(t){let e=this.$12(),r=this.start,i=this.startLoc,n,a=!1,h=!1;if(t)while(this.type===s.name&&O.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")a=!0;else if(this.value==="override")h=!0;else n=this.value;this.next()}let o;if(this.type===s._this)o=this.startNode(),o.name="this",this.next(),this.finishNode(o,"Identifier");else o=this.parseBindingAtom();let c=this.type===s.eq?this.parseMaybeDefault(r,i,o):this.parseMaybeDefault(o.start,o.loc?.start,this.$h(o,!0));if(e.length>0)c.decorators=e;if(!n&&!a&&!h)return c;let p=this.startNodeAt(r,i);if(n)p.accessibility=n;if(a)p.readonly=!0;if(h)p.override=!0;return p.parameter=c,this.finishNode(p,"TSParameterProperty")}parseBindingListItem(t){if(t.type==="RestElement")this.$h(t,!0);return t}checkLValSimple(t,e,r){if(this.$f&&t===this.$f.id){this.$f=null;return}if(!e&&k.has(t.type)){this.checkLValSimple(t.expression,e,r);return}switch(t.type){case"TSParameterProperty":this.checkLValInnerPattern(t.parameter,e,r);return;case"Identifier":if(t.name==="this")return}super.checkLValSimple(t,e,r)}toAssignable(t,e,r){if(t&&!e&&k.has(t.type))return t;return super.toAssignable(t,e,r)}declareName(t,e,r){let i=this.currentScope();if(e&E){this.$1t(i,t),i.$1u??=[],i.$1u.push(t);return}if(e===T||e===C){if(i.$13??=[],e===T&&l(i.$13,t))this.raise(r,`type '${t}' has already been declared.`);i.$13.push(t),this.$1t(i,t);return}if(e&R){if(i.$1v??=[],l(i.$1v,t))return;super.declareName(t,f,r),i.$1v.push(t);return}super.declareName(t,e,r)}$1t(t,e){if(this.inModule&&t.flags&L)delete this.undefinedExports[e]}checkLocalExport(t){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(l(r.$13,t.name)||l(r.$1u,t.name))return}super.checkLocalExport(t)}checkExport(){}raiseRecoverable(t,e){if(e==="Duplicate constructor in the same class")return;super.raiseRecoverable(t,e)}$12(){let t=[];while(this.type===d)t.push(this.$1w());return t}$1q(t){let e=this.$9[this.$9.length-1];while(this.type===d)e.push(this.$1w());if(this.type===s._export){if(!t)this.unexpected()}else if(this.type!==s._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 t=this.startNode();this.next(),this.$9.push([]);let e=this.start,r=this.startLoc,i;if(this.type===s.parenL){if(this.next(),i=this.parseExpression(),this.expect(s.parenR),this.options.preserveParens){let a=this.startNodeAt(e,r);a.expression=i,i=this.finishNode(a,"ParenthesizedExpression")}}else{i=this.parseIdent(!1);while(this.eat(s.dot)){let a=this.startNodeAt(e,r);a.object=i,a.property=this.parseIdent(!0),a.computed=!1,i=this.finishNode(a,"MemberExpression")}}let n=this.$p()?this.$e():void 0;if(this.eat(s.parenL)){let a=this.startNodeAt(i.start,i.loc?.start);if(a.callee=i,a.arguments=this.parseExprList(s.parenR,!1,!1),n)a.typeArguments=n;i=this.finishNode(a,"CallExpression")}else if(n){let a=this.startNodeAt(i.start,i.loc?.start);a.expression=i,a.typeArguments=n,i=this.finishNode(a,"TSInstantiationExpression")}return t.expression=i,this.$9.pop(),this.finishNode(t,"Decorator")}shouldParseExportStatement(){return this.type===d||super.shouldParseExportStatement()}parseExprAtom(t,e,r){if(this.type===d)this.$1q(!1);return super.parseExprAtom(t,e,r)}parseProperty(t,e){if(t||this.type!==d)return super.parseProperty(t,e);let r=this.$12(),i=super.parseProperty(t,e);if(i.type==="SpreadElement")this.raise(i.start,"Decorators can't be used with SpreadElement");return i.decorators=r,i}parseClassId(t,e){let r=this.$9.length-1,i=this.$9[r];if(i.length>0)t.decorators=i,this.$q(t,i[0]),this.$9[r]=[];if(!this.isContextual("implements")||e===!0)super.parseClassId(t,e);if(this.$1())t.typeParameters=this.$8()}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.$1())t.superTypeParameters=this.$e();if(this.eatContextual("implements"))t.implements=this.$a(()=>this.$1j())}parseClassElement(t){if(this.type===d){let h=this.$12();if(this.type===s.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let o=this.parseClassElement(t);return o.decorators=h,this.$q(o,h[0]),o}if(this.eat(s.semi))return null;let e=this.startNode();while(this.type===s.name&&q.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===s.braceL)return this.next(),this.parseClassStaticBlock(e),e;if(h==="public"||h==="private"||h==="protected")e.accessibility=h;else e[h]=!0}if(this.type===s.bracketL&&this.$1g())return this.$1h(e);e.static??=!1;let r="",i=!1,n=!1,a="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())n=!0;else r="async";if(!r&&this.eat(s.star))i=!0;if(!r&&!n&&!i){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=h;else r=h}if(r)e.computed=!1,e.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),e.key.name=r,this.finishNode(e.key,"Identifier");else this.parseClassElementName(e);if(this.eat(s.question))e.optional=!0;if(this.type===s.parenL||this.$1()||a!=="method"||i||n){let h=e.key,o=!e.static&&!e.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(e.kind=o?"constructor":a,this.$1())e.typeParameters=this.$8();this.$l=o,this.$o=this.start,this.parseClassMethod(e,i,n,o&&t)}else{if(!e.optional&&this.$u())this.next(),e.definite=!0;if(this.type===s.colon)e.typeAnnotation=this.$6();this.parseClassField(e)}return e}parseMaybeAssign(t,e,r){if(this.$p()){let i=this.$g(()=>{let n=this.$8(),a=super.parseMaybeAssign(t,e,r);if(a.type!=="ArrowFunctionExpression")return;return a.typeParameters=n,this.$q(a,n),a});if(i)return i}return super.parseMaybeAssign(t,e,r)}parseMaybeUnary(t,e,r,i){if(this.$p()){let n=this.startNode();return n.typeAnnotation=this.$a(()=>{this.next();let a=this.$0();if(!this.$c())this.unexpected();return this.next(),a}),n.expression=this.parseMaybeUnary(null,!1,!1,i),this.finishNode(n,"TSTypeAssertion")}return super.parseMaybeUnary(t,e,r,i)}parseMaybeConditional(t,e){let r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.type===s.question&&!(n.type==="ArrowFunctionExpression"&&n.start===r)&&!this.$2j()){this.next();let a=this.startNodeAt(r,i);return a.test=n,a.consequent=this.parseMaybeAssign(),this.expect(s.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return n}$2j(){let t=this.$d(),e=this.input.charCodeAt(t);if(e===_||e===et||e===tt)return!0;return e===y&&this.input.charCodeAt(t+1)!==y}parseParenItem(t){return this.$h(t,!0)}$1x(){if(this.type!==s.colon)return!0;let t=this.$g(()=>{let e=this.$6(!0);return this.type===s.arrow&&!this.canInsertSemicolon()?e:void 0});if(!t)return!1;return this.$7=t,!0}shouldParseArrow(t){return this.$1x()&&super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(t,e,r,i){if(this.$7)t.returnType=this.$7,this.$7=null;return super.parseArrowExpression(t,e,r,i)}parseExprList(t,e,r,i){if(!this.$m)return super.parseExprList(t,e,r,i);this.$m=!1;let n=[],a=!0;while(!this.eat(t)){if(a)a=!1;else if(this.expect(s.comma),e&&this.afterTrailingComma(t))break;if(this.type===s.ellipsis){let h=this.parseSpread(i);if(this.eat(s.question))h.optional=!0;if(this.type===s.colon)h.typeAnnotation=this.$6();n.push(h)}else n.push(this.parseMaybeAssign(!1,i,this.parseParenItem))}return n}parseSubscript(t,e,r,i,n,a,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let c=this.startNodeAt(e,r);return this.exprAllowed=!1,this.next(),c.expression=t,this.finishNode(c,"TSNonNullExpression")}if(n&&this.$1()){let c=this.$g(()=>this.$2k(e,r,h));if(c)return c}let o=this.type===s.questionDot&&this.$2()===v;if(this.$1()||o||this.type===s.bitShift&&this.value==="<<"){let c=this.$g(()=>{if(o)this.next();this.$p();let p=this.$e();if(this.type===s.parenL&&!i)return p;if(this.type===s.backQuote)return o?void 0:p;if(o)return;if(this.$c()||this.type===s.bitShift||this.type.startsExpr&&this.type!==s.parenL&&!this.hasPrecedingLineBreak())return;return p});if(c){let p=this.startNodeAt(e,r);if(this.type===s.parenL&&!i){if(this.next(),p.callee=t,p.arguments=this.parseExprList(s.parenR,!0,!1),p.typeArguments=c,o)t.optional=!0;if(o||a)p.optional=o;return this.finishNode(p,"CallExpression")}if(this.type===s.backQuote)return p.tag=t,p.quasi=this.parseTemplate({isTagged:!0}),p.typeArguments=c,this.finishNode(p,"TaggedTemplateExpression");return p.expression=t,p.typeArguments=c,this.finishNode(p,"TSInstantiationExpression")}}if(n&&this.type===s.parenL)this.$m=!0;return super.parseSubscript(t,e,r,i,n,a,h)}$2k(t,e,r){let i=this.startNodeAt(t,e);if(i.typeParameters=this.$8(),this.expect(s.parenL),i.params=this.parseBindingList(s.parenR,!1,!0),this.type===s.colon)i.returnType=this.$6(!0);if(this.type!==s.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(i,i.params,!0,r)}parseDynamicImport(t){if(this.next(),t.source=this.parseMaybeAssign(),this.eat(s.comma)&&this.type!==s.parenR)t.arguments=[this.parseExpression()];return this.expect(s.parenR),this.finishNode(t,"ImportExpression")}parseNew(){let t=super.parseNew();if(t.callee?.type!=="TSInstantiationExpression")return t;let e=this.startNodeAt(t.start,t.loc?.start);return e.callee=t.callee.expression,e.typeArguments=t.callee.typeArguments,e.arguments=t.arguments,this.finishNodeAt(e,"NewExpression",t.end,t.loc?.end)}parseExprOp(t,e,r,i,n){if(s._in.binop>i&&this.type===s.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let a=this.value==="satisfies",h=this.startNodeAt(e,r);return h.expression=t,h.typeAnnotation=this.$a(()=>{if(this.next(),!a&&this.type===s._const){let o=this.startNode();return o.typeName=this.parseIdent(!0),this.finishNode(o,"TSTypeReference")}return this.$0()}),this.finishNode(h,a?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,e,r,i,n)}return super.parseExprOp(t,e,r,i,n)}parseGetterSetter(t){t.kind=t.key.name,super.parseGetterSetter(t)}parsePropertyValue(t,e,r,i,n,a,h,o){if(!e&&this.$1()){if(this.$k=this.$8(),this.type!==s.parenL)this.unexpected();t.kind="init"}return super.parsePropertyValue(t,e,r,i,n,a,h,o)}}return g});
2
+ export{z};
@@ -0,0 +1,2 @@
1
+ function vt(t){return{support:"typescript",parser:t}}function Tt(t){return{support:"entities",names:t}}function ee(t){return t&&"parser"in t?t.parser:void 0}function kt(t){return t&&"names"in t?t.names:void 0}function te(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}
2
+ export{vt,Tt,ee,kt,te};
@@ -0,0 +1,2 @@
1
+ import{C}from"./shared-4wqe6a27.js";import{St}from"./shared-jxkrk6hx.js";import{G}from"./shared-2by923ar.js";function k(t,r,o){C(t);let e={isTypeScript:r.typescript??!1,typescript:o,loc:!1,comments:!1,root:{comments:[]}};return St(e,t,(s)=>G(t,r.localExports??!0,s))}
2
+ export{k};
@@ -0,0 +1,10 @@
1
+ import{At,h,wt,Et,o,f,F}from"./shared-4wqe6a27.js";import{M,re,V,l}from"./shared-xyqvjc3m.js";import{te}from"./shared-h6c4cer7.js";var Y=/^\t+/;class e extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(t,r,s){super(`${s}
2
+ https://svelte.dev/e/${r}`);this.code=r,this.reason=s;let c=typeof t==="number"?t:t?.start,p=typeof t==="number"?t:t?.end;if(c!==void 0)this.position=[c,p??c],this.start=h(this.position[0]),this.end=h(this.position[1]),this.frame=Q(this.start.line-1,this.end.column)}}var I=(t)=>t.replace(Y,(r)=>" ".repeat(r.length));function Q(t,r){let s=Math.max(0,t-2),c=[];for(let i=s;i<t+3;i++){let a=Et(i);if(a===void 0)break;c.push(a)}let p=String(s+c.length+1).length;return c.map((i,a)=>{let u=`${String(s+a+1).padStart(p," ")}: ${I(i)}`;if(s+a!==t)return u;return`${u}
3
+ ${" ".repeat(p+2+I(i.slice(0,r)).length)}^`}).join(`
4
+ `)}function Ce(t){throw new e(t,"attribute_duplicate","Attributes need to be unique")}function _e(t){throw new e(t,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Pe(t,r){throw new e(t,"block_duplicate_clause",`${r} cannot appear more than once within a block`)}function Ie(t){throw new e(t,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function Le(t){throw new e(t,"block_invalid_elseif","'elseif' should be 'else if'")}function Re(t,r,s){throw new e(t,"block_invalid_placement",`{#${r} ...} block cannot be ${s}`)}function $e(t){throw new e(t,"block_unclosed","Block was left open")}function Oe(t){throw new e(t,"block_unexpected_close","Unexpected block closing tag")}function qe(t){throw new e(t,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function De(t){throw new e(t,"css_empty_declaration","Declaration cannot be empty")}function ye(t){throw new e(t,"css_expected_identifier","Expected a valid CSS identifier")}function Be(t){throw new e(t,"css_selector_invalid","Invalid selector")}function Fe(t){throw new e(t,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function xe(t){throw new e(t,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function Me(t){throw new e(t,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Ve(t,r){throw new e(t,"directive_missing_name",`\`${r}\` name cannot be empty`)}function We(t,r){throw new e(t,"element_invalid_closing_tag",`\`</${r}>\` attempted to close an element that was not open`)}function je(t,r,s){throw new e(t,"element_invalid_closing_tag_autoclosed",`\`</${r}>\` attempted to close element that was already automatically closed by \`<${s}>\` (cannot nest \`<${s}>\` inside \`<${r}>\`)`)}function ae(t,r){throw new e(t,"element_unclosed",`\`<${r}>\` was left open`)}function ge(t){throw new e(t,"expected_attribute_value","Expected attribute value")}function ze(t){throw new e(t,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function be(t){throw new e(t,"expected_identifier","Expected an identifier")}function Ue(t){throw new e(t,"expected_pattern","Expected identifier or destructure pattern")}function Ke(t){throw new e(t,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function d(t,r){throw new e(t,"expected_token",`Expected token ${r}`)}function Ge(t){throw new e(t,"expected_whitespace","Expected whitespace")}function R(t,r){throw new e(t,"js_parse_error",`${r}`)}function He(t){throw new e(t,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Qe(t){throw new e(t,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function Xe(t,r){throw new e(t,"script_invalid_attribute_value",`If the \`${r}\` attribute is supplied, it must be a boolean attribute`)}function Ye(t){throw new e(t,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Je(t,r){throw new e(t,"script_reserved_attribute",`The \`${r}\` attribute is reserved and cannot be used`)}function Ze(t){throw new e(t,"style_duplicate","A component can have a single top-level `<style>` element")}function et(t){throw new e(t,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function tt(t){throw new e(t,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function Se(t){throw new e(t,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function it(t,r){throw new e(t,"svelte_meta_duplicate",`A component can only have one \`<${r}>\` element`)}function rt(t,r){throw new e(t,"svelte_meta_invalid_content",`<${r}> cannot have children`)}function st(t,r){throw new e(t,"svelte_meta_invalid_placement",`\`<${r}>\` tags cannot be inside elements or blocks`)}function nt(t,r){throw new e(t,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${r}`)}function ot(t){throw new e(t,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function at(t){throw new e(t,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function le(t,r){throw new e(t,"svelte_options_invalid_attribute_value",`Value must be ${r}, if specified`)}function lt(t){throw new e(t,"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 ct(t){throw new e(t,"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 pt(t){throw new e(t,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function ve(t){throw new e(t,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function ut(t){throw new e(t,"svelte_options_reserved_tagname","Tag name is reserved")}function ht(t,r){throw new e(t,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${r}'`)}function ft(t){throw new e(t,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function dt(t,r,s){throw new e(t,"tag_invalid_placement",`{@${r} ...} tag cannot be ${s}`)}function n(t){throw new e(t,"unexpected_eof","Unexpected end of input")}function mt(t,r){throw new e(t,"unexpected_reserved_word",`'${r}' is a reserved word in JavaScript and cannot be used here`)}function yt(t){throw new e(t,"unterminated_string_constant","Unterminated string constant")}function xt(t){throw new e(t,"void_element_invalid_content","Void elements cannot have children or closing tags")}var b="",W=[],L=0,g=[],x=0;function j(t,r){b=t,W=r,L=0}function U(){return L}function z(t,r,s,c){L=c}function K(t,r,s,c,p,i){L=c;let a=r;if(t&&a.includes(`
5
+ `)){let m=b.lastIndexOf(`
6
+ `,s-1)+1,_=m,v=b.charCodeAt(_);while(v===32||v===9)v=b.charCodeAt(++_);if(_>m)a=ee(a,b.slice(m,_))}let u={type:t?"Block":"Line",value:a,start:s,end:c};if(p&&i)u.loc={start:p,end:i};W.push(u)}function ee(t,r){let s=t.startsWith(r)?r.length:0,c="",p=t.indexOf(`
7
+ `,s);while(p!==-1){if(c+=t.slice(s,p+1),s=p+1,t.startsWith(r,s))s+=r.length;p=t.indexOf(`
8
+ `,s)}return c+t.slice(s)}function X(t,r,s){let c=0,p=r.length;while(c<p){let i=c+p>>>1;if(r[i].start<s)c=i+1;else p=i}if(c>=r.length)return;if(g=r.slice(c).map(({type:i,value:a,start:u,end:m})=>({type:i,value:a,start:u,end:m})),x=0,P(t,void 0,!1),x<g.length&&(g[x].start>=t.end||t.type==="Program")){t.trailingComments??=[];while(x<g.length)t.trailingComments.push(g[x++])}}var ne=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function D(t,r){for(let s=t;s<r;s++){let c=b.charCodeAt(s);if(c!==44&&c!==41&&c!==32&&c!==9)return!0}return!1}function P(t,r,s){while(x<g.length&&g[x].start<t.start)t.leadingComments??=[],t.leadingComments.push(g[x++]);if(x>=g.length)return;let c=g[x].start;if(c<t.end||!D(t.end,c)){let p=f(t),i=ne.get(t.type),a=i===void 0?void 0:p[i],u=Array.isArray(a)&&a.length===0;for(let m in p){if(x>=g.length)return;if(m==="type")continue;let _=p[m];if(Array.isArray(_)){let v=m===i;for(let w=0;w<_.length;w++){let O=_[w];if(o(O))P(O,t,v?w===_.length-1:u)}}else if(o(_))P(_,t,u)}if(x>=g.length)return}if(r!==void 0&&t.end===r.end)return;if(s)while(x<g.length){if(r&&g[x].start>=r.end)break;t.trailingComments??=[],t.trailingComments.push(g[x++])}else if(t.end<=g[x].start&&!D(t.end,g[x].start))t.trailingComments=[g[x++]]}var B=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(" "));var E=!1,y=1,oe=2,ie=32,se=256,ce=y|oe|se,de=2,pe=3,ue=4,me=/\r\n?|\n|\u2028|\u2029/,G=new Map;function S(t){if(!(t instanceof RegExp))return t;let r=G.get(t);if(!r){let s=new Set(t.source.slice(4,-2).split("|"));r={test:(c)=>s.has(c)},G.set(t,r)}return r}var Te=M((t)=>class extends t{declareName(r,s,c){let p=!1;if(s===de){let i=this.currentScope();if(p=l(i.lexical,r)||l(i.functions,r)||l(i.var,r),i.lexical.push(r),this.inModule&&i.flags&y)delete this.undefinedExports[r]}else if(s===ue)this.currentScope().lexical.push(r);else if(s===pe){let i=this.currentScope();p=this.treatFunctionsAsVar?l(i.lexical,r):l(i.lexical,r)||l(i.var,r),i.functions.push(r)}else for(let i=this.scopeStack.length-1;i>=0;--i){let a=this.scopeStack[i];if(l(a.lexical,r)&&!(a.flags&ie&&a.lexical[0]===r)||!this.treatFunctionsAsVarInScope(a)&&l(a.functions,r)){p=!0;break}if(a.var.push(r),this.inModule&&a.flags&y)delete this.undefinedExports[r];if(a.flags&ce)break}if(p)this.raiseRecoverable(c,`Identifier '${r}' has already been declared`)}}),ke=M((t)=>{let{keywordTypes:r,tokTypes:s}=t.acorn,c=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((i)=>[i,r[i]])),p;return class extends t{constructor(i,a,u){super(i,a,u);this.keywords=S(this.keywords),this.reservedWords=S(this.reservedWords),this.reservedWordsStrict=S(this.reservedWordsStrict),this.reservedWordsStrictBind=S(this.reservedWordsStrictBind),p??=this.context[0]}reset(i,a,u){if(super.reset?.(i,a,u),this.input=i,this.containsEsc=!1,this.pos=a,u)this.lineStart=a-u.column,this.curLine=u.line;else this.lineStart=i.lastIndexOf(`
9
+ `,a-1)+1,this.curLine=this.options.locations?i.slice(0,this.lineStart).split(me).length:1;this.type=s.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 m=this.context;if(m.length!==1||m[0]!==p)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 w in this.undefinedExports){this.undefinedExports=Object.create(null);break}let _=this.scopeStack,v=_[0];if(_.length!==1||v.flags!==y||v.var.length>0||v.lexical.length>0||v.functions.length>0||v.tsTypes!==void 0||v.tsExportOnly!==void 0||v.tsEnums!==void 0)this.scopeStack=[],this.enterScope(y);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(i,a){let u=super.parseParenAndDistinguishExpression(i,a);if(u.type==="ParenthesizedExpression")E=!0;return u}checkUnreserved(i){if(B.has(i.name))super.checkUnreserved(i)}canInsertSemicolon(){let i=this.type;return i===s.eof||i===s.braceR||V(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let i=this.input,a=this.options.locations,u=this.pos,m=i.charCodeAt(u);for(;;)if(m===32||m===9)m=i.charCodeAt(++u);else if(m===10){if(m=i.charCodeAt(++u),a)this.curLine++,this.lineStart=u}else break;if(this.pos=u,m===47||m<33||m>=128)super.skipSpace()}readWord1(){let i=this.input,a=this.pos,u=a,m=i.charCodeAt(u),_=0;while(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36)_=Math.imul(_,31)+m|0,m=i.charCodeAt(++u);if(m>=128||m===92)return super.readWord1();return this.containsEsc=!1,this.pos=u,At(i,a,u,_)}readWord(){let i=this.readWord1();return this.finishToken(c.get(i)??s.name,i)}}}),J=re(Te,ke),he=/ \(\d+:\d+\)$/;function k(t){return t}function q(t){return t instanceof SyntaxError&&"pos"in t&&typeof t.pos==="number"}function C(t,r,s,c,p,i=t.root.comments.length){let a=t.root.comments;j(r,a);let u={onComment:t.comments?K:z,sourceType:"module",ecmaVersion:16,locations:t.loc,preserveParens:c};if(t.lfOnly)u.startLocation=h(s);let m=t.isTypeScript?t.typescript:J;if(!m)te();let _;try{_=p(m,u)}catch(v){if(!q(v))throw v;R(v.pos,v.message.replace(he,""))}if(a.length>i)X(k(_),a,s);return _}function Z(t,r,s=0){return k(C(t,r,0,!1,(c,p)=>{if(s>0&&p.locations)p.startLocation=h(s);let i=new c(p,r,s).parse();return i.start=0,i},0))}function fe(t,r){if(!r)return{line:1,column:0};let{column:s}=h(t);return{line:wt(t-s)+1,column:s}}var we={count:0},A,Ne=(t)=>t.parseExpression();function Ee(t,r,s,c,p){let i=A;if(A=void 0,i?.ParserClass===t&&i.onComment===r.onComment&&i.locations===r.locations&&i.parser.reset)i.parser.reset(s,c,r.startLocation);else i={ParserClass:t,onComment:r.onComment,locations:r.locations,parser:new t(r,s,c)};let a=i.parser;a.nextToken();let u=p(a);return a.input="",A=i,u}function H(t,r,s,c){return we.count+=1,E=!1,C(t,r,s,!0,(p,i)=>(i.startLocation??=fe(s,i.locations),Ee(p,i,r,s,c)))}function N(t,r,s,c=!1){let p=k(H(t,r,s,Ne)),i=Math.max(p.end,U());return{node:E&&!c?T(p):p,end:i}}function gt(t,r,s){let c=t.root.comments.length,p=!0,i=H(t,r,s,(u)=>{let m={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},_=u.parseMaybeConditional(void 0,m);if(u.type!==J.acorn.tokTypes.eof)return p=!1,_;let v=u.toAssignable(_,!1,m);return u.checkLValPattern(v),v});if(!p){t.root.comments.length=c;return}let a=k(i);return E?T(a):a}function bt(t,r,s){return k(C(t,r,s,!1,(c,p)=>{let i=new c(p,r,s);try{return i.nextToken(),i.parseStatement(null,!0,Object.create(null))}catch(a){if(q(a)&&a.pos===r.length)n(r.length);throw a}}))}function St(t,r,s){let c=C(t,r,0,!1,(p,i)=>{let a=new p(i,r,0),u=a.startNode(),m=[],_=Object.create(null);return s((v)=>{a.pos=v,a.context=a.initialContext(),a.exprAllowed=!0,a.nextToken();let w=a.parseStatement(null,!0,_);return m.push(w),w.end}),u.body=m,a.finishNode(u,"Program")});return k(c).body}function T(t){let r=t;while(r.type==="ParenthesizedExpression")r=r.expression;return F(r,T),r}
10
+ export{e,Ce,_e,Pe,Ie,Le,Re,$e,Oe,qe,De,ye,Be,Fe,xe,Me,Ve,We,je,ae,ge,ze,be,Ue,Ke,d,Ge,He,Qe,Xe,Ye,Je,Ze,et,tt,Se,it,rt,st,nt,ot,at,le,lt,ct,pt,ve,ut,ht,ft,dt,n,mt,yt,xt,B,Te,ke,Z,N,gt,bt,St};
@@ -1,2 +1,2 @@
1
- var b=[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],p=/[:!]/;function he(e){let n;return()=>(n??=m(e),n)}function m(e){let n=new Map,a=0,t="";for(let u of e.split(" ")){let o=u.search(p);t=t.slice(0,Number.parseInt(u[0],36))+u.slice(1,o);let r=Number.parseInt(u.slice(o+1),36);if(n.set(`${t};`,r),u[o]==="!")n.set(t,r);a=Math.max(a,t.length+1)}return{table:n,longest:a}}var Se=he("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),l=(e)=>e>=48&&e<=57,E=(e)=>l(e)||e>=65&&e<=70||e>=97&&e<=102,g=(e)=>l(e)||e>=65&&e<=90||e>=97&&e<=122,c=0;function N(e,n,a,t){if(e.charCodeAt(n)===35){let i=(e.charCodeAt(n+1)|32)===120,f=n+(i?2:1),s=f;while(s<e.length&&(i?E:l)(e.charCodeAt(s)))s++;if(s===f)return 0;return c=e.charCodeAt(s)===59?s+1:s,Number.parseInt(e.slice(f,s),i?16:10)}let{table:u,longest:o}=t(),r=n;while(r-n<o&&g(e.charCodeAt(r)))r++;if(e.charCodeAt(r)===59){let i=u.get(e.slice(n,r+1));if(i!==void 0)return c=r+1,i}for(let i=r;i>n;i--){let f=u.get(e.slice(n,i));if(f===void 0)continue;if(a){let s=e.charCodeAt(i);if(g(s)||s===95||s===61)continue}return c=i,f}return 0}function y(e,n){if(e===10&&!n)return 32;if(e<128)return e;if(e<=159)return b[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 v(e,n,a){let t=e.indexOf("&");if(t===-1)return e;let u="",o=0;while(t!==-1){let r=N(e,t+1,n,a);if(r)u+=e.slice(o,t)+String.fromCodePoint(y(r,n)),o=c;t=e.indexOf("&",r?o:t+1)}return u+e.slice(o)}
2
- export{he,Se,v};
1
+ var b=[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],p=/[:!]/;function me(e){let n;return()=>(n??=m(e),n)}function m(e){let n=new Map,a=0,t="";for(let u of e.split(" ")){let o=u.search(p);t=t.slice(0,Number.parseInt(u[0],36))+u.slice(1,o);let r=Number.parseInt(u.slice(o+1),36);if(n.set(`${t};`,r),u[o]==="!")n.set(t,r);a=Math.max(a,t.length+1)}return{table:n,longest:a}}var Ee=me("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),l=(e)=>e>=48&&e<=57,E=(e)=>l(e)||e>=65&&e<=70||e>=97&&e<=102,g=(e)=>l(e)||e>=65&&e<=90||e>=97&&e<=122,c=0;function N(e,n,a,t){if(e.charCodeAt(n)===35){let i=(e.charCodeAt(n+1)|32)===120,f=n+(i?2:1),s=f;while(s<e.length&&(i?E:l)(e.charCodeAt(s)))s++;if(s===f)return 0;return c=e.charCodeAt(s)===59?s+1:s,Number.parseInt(e.slice(f,s),i?16:10)}let{table:u,longest:o}=t(),r=n;while(r-n<o&&g(e.charCodeAt(r)))r++;if(e.charCodeAt(r)===59){let i=u.get(e.slice(n,r+1));if(i!==void 0)return c=r+1,i}for(let i=r;i>n;i--){let f=u.get(e.slice(n,i));if(f===void 0)continue;if(a){let s=e.charCodeAt(i);if(g(s)||s===95||s===61)continue}return c=i,f}return 0}function y(e,n){if(e===10&&!n)return 32;if(e<128)return e;if(e<=159)return b[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 A(e,n,a){let t=e.indexOf("&");if(t===-1)return e;let u="",o=0;while(t!==-1){let r=N(e,t+1,n,a);if(r)u+=e.slice(o,t)+String.fromCodePoint(y(r,n)),o=c;t=e.indexOf("&",r?o:t+1)}return u+e.slice(o)}
2
+ export{me,Ee,A};
@@ -0,0 +1,3 @@
1
+ import{K}from"./shared-stdj6se1.js";import{w,i,t,H,Q,X,D,Y,u,E,J}from"./shared-nbaaegmc.js";import{R}from"./shared-2by923ar.js";var T="{",v=60,C=62,p=47,y=61,b=123,S=/\s*>/y,L=/<\/textarea(\s[^>]*)?>/iy,I=["cript","tyle","velte:options"],O="</svelte:options";function se(e){let r=w(e).trimEnd();return G(r,H(r),null)}function we(e){let r={tags:[],comments:[]};return G(e,!1,r),r}function G(e,r,d){let n={typescript:r,instance:null,module:null,css:null,options:null},o=_(e),s=[],l=0;while(l<=o){let f=e.charCodeAt(l);if(f===v)l=M(e,l,s,n,d);else if(f===b)l=N(e,l,s);else l++}return n}function _(e){let r=-1,d=e.indexOf("<s");while(d!==-1){let n=W(e,d+2);if(n!==-1){let o=e.charCodeAt(n);if(n===e.length||i(o)||o===p||o===C)r=d}d=e.indexOf("<s",d+2)}return r}function W(e,r){for(let d of I)if(e.startsWith(d,r))return r+d.length;return-1}function A(e,r){return Math.min(R(e,r)+1,e.length)}function N(e,r,d){let n=t(e,r+1),o=e.charCodeAt(n),s=e.charCodeAt(n+1);if(o===35||o===58||o===64||o===p&&s!==p&&s!==42){n++;while(n<e.length){let l=e.charCodeAt(n);if(l<97||l>122)break;n++}if(o===35)d.push(T);else if(o===p){let l=d.lastIndexOf(T);if(l!==-1)d.length=l}}return A(e,n)}function M(e,r,d,n,o){if(e.startsWith("!--",r+1)){let h=e.indexOf("-->",r+4),c=h===-1?e.length:h+3;if(o&&d.length===0)o.comments.push(r,c);return c}if(e.charCodeAt(r+1)===p){let h=r+2,c=e.slice(h,E(e,h,!1)),g=d.lastIndexOf(c);if(g!==-1)d.length=g;return x(e,t(e,h+c.length))}let s=e.slice(r+1,E(e,r+1,!1)),l=t(e,r+1+s.length),f=d[d.length-1];if(f!==void 0&&K(f,s))d.pop();let a=d.length===0;if(o&&a&&(s==="script"||s==="style"||s==="svelte:options"))o.tags.push(r);if(a&&(s==="script"||s==="style")){let h=[];if(l=x(e,V(e,l,h)),s==="script"){let g=q(e,r,l,h);if(g.context==="module")n.module??=g;else n.instance??=g;return g.end}let c=B(e,r,l,h);return n.css??=c,c.end}let m=a&&s==="svelte:options"?[]:null;if(l=U(e,l,m),e.charCodeAt(l)===p||D(s)){if(e.charCodeAt(l)===p)l++;l=x(e,l)}else{if(l=x(e,l),s==="textarea")return j(e,l);if(s==="script"||s==="style"){let h=`</${s}>`,c=e.indexOf(h,l);return c===-1?e.length:c+h.length}if(m&&e.startsWith(O,l))l=x(e,t(e,l+O.length));else return d.push(s),l}if(m)n.options??={start:r,end:l,attributes:m};return l}function x(e,r){return e.charCodeAt(r)===C?r+1:r}function q(e,r,d,n){let o=Q(e,d),s=o===-1?e.length:o,l=n.some((f)=>f.name==="module"||f.name==="context");return{start:r,end:o===-1?e.length:X(e,o),context:l?"module":"default",attributes:n,content:{start:d,end:s}}}function B(e,r,d,n){let o=Y(e,d),s=o;if(e.startsWith("</style",s)){s+=7,S.lastIndex=s;let l=S.exec(e);if(l)s+=l[0].length}return{start:r,end:s,attributes:n,content:{start:d,end:o}}}function V(e,r,d){let n=r;for(;;){let o=n,s=E(e,n,!0);if(s===o)return n;n=s;let l=!0;if(e.charCodeAt(n)===y){let f=t(e,n+1),a=e.charCodeAt(f),m=-1;if(u(a)){let c=e.indexOf(e[f],f+1);if(c!==-1)m=c+1}if(m===-1){m=f;while(m<e.length&&e.charCodeAt(m)!==C&&!i(e.charCodeAt(m)))m++}let h=u(a)?1:0;l=e.slice(f+h,m-h),n=m}d.push({name:e.slice(o,s),value:l,start:o,end:n}),n=t(e,n)}}function U(e,r,d){let n=r;for(;;){for(;;){if(e.startsWith("/*",n)){let a=e.indexOf("*/",n+2);n=a===-1?e.length:a+2}else if(e.startsWith("//",n)){let a=e.indexOf(`
2
+ `,n+2);n=a===-1?e.length:a}else break;n=t(e,n)}let o=n;if(e.charCodeAt(n)===b){n=t(e,A(e,n+1));continue}let s=E(e,n,!0);if(s===o)return n;let l=s,f=!0;if(n=t(e,s),e.charCodeAt(n)===y){let a=t(e,n+1);l=e.startsWith("/>",a)?a+1:P(e,a),f=u(e.charCodeAt(a))?e.slice(a+1,Math.max(a+1,l-1)):e.slice(a,l),n=t(e,l)}d?.push({name:e.slice(o,s),value:f,start:o,end:l})}}function P(e,r){let d=e.charCodeAt(r);if(u(d)){let o=r+1;while(o<e.length){let s=e.charCodeAt(o);if(s===d)return o+1;o=s===b?A(e,o+1):o+1}return e.length}let n=r;while(n<e.length&&!J(e,n))n=e.charCodeAt(n)===b?A(e,n+1):n+1;return n}function j(e,r){let d=r;while(d<e.length){let n=e.charCodeAt(d);if(n===v){if(L.lastIndex=d,L.test(e))return L.lastIndex}d=n===b?A(e,d+1):d+1}return e.length}
3
+ export{se,we};
@@ -1,2 +1,2 @@
1
- var f=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function S(n){return n.charCodeAt(0)===65279?n.slice(1):n}function s(n){return n>=48&&n<=57}function i(n){if(n===32||n<=13&&n>=9)return!0;if(n<160)return!1;return n===160||n===5760||n>=8192&&n<=8202||n===8232||n===8233||n===8239||n===8287||n===12288||n===65279}function t(n,r){let e=r;while(e<n.length&&i(n.charCodeAt(e)))e++;return e}function z(n){let r=n.indexOf("<");while(r!==-1){let e=n.charCodeAt(r+1);if(e===33||e===115){f.lastIndex=r;let o=f.exec(n);if(o){if(e===115)return o[2]==="ts";r=n.indexOf("<",f.lastIndex);continue}}r=n.indexOf("<",r+1)}return!1}function U(n,r){let e=n.indexOf("</script",r);while(e!==-1){if(n.charCodeAt(t(n,e+8))===l)return e;e=n.indexOf("</script",e+8)}return-1}function K(n,r){return t(n,r+8)+1}var u=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function I(n){return u.has(n)||n.charCodeAt(0)===33&&n.toLowerCase()==="!doctype"}function G(n,r){let e=r;while(e<n.length){let o=n.charCodeAt(e);if(o===47&&n.charCodeAt(e+1)===42){let a=n.indexOf("*/",e+2);e=a===-1?n.length:a+2}else if(o===34||o===39){e++;while(e<n.length){let a=n.charCodeAt(e);if(a===o||a===10)break;e+=a===92?2:1}e++}else if(o===60&&n.startsWith("</style",e))break;else e++}return Math.min(e,n.length)}var x=34,c=39,h=47,b=61,l=62,p=(n)=>n===x||n===c;function k(n,r,e){let o=r;for(;o<n.length;o++){let a=n.charCodeAt(o);if(i(a)||a===h||a===l)break;if(e&&(p(a)||a===b))break}return o}function H(n,r){let e=n.charCodeAt(r);return i(e)||p(e)||e===b||e===60||e===l||e===96||e===h&&n.charCodeAt(r+1)===l}
2
- export{S,s,i,t,z,U,K,I,G,p,k,H};
1
+ var f=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function w(n){return n.charCodeAt(0)===65279?n.slice(1):n}function s(n){return n>=48&&n<=57}function i(n){if(n===32||n<=13&&n>=9)return!0;if(n<160)return!1;return n===160||n===5760||n>=8192&&n<=8202||n===8232||n===8233||n===8239||n===8287||n===12288||n===65279}function t(n,r){let e=r;while(e<n.length&&i(n.charCodeAt(e)))e++;return e}function H(n){let r=n.indexOf("<");while(r!==-1){let e=n.charCodeAt(r+1);if(e===33||e===115){f.lastIndex=r;let o=f.exec(n);if(o){if(e===115)return o[2]==="ts";r=n.indexOf("<",f.lastIndex);continue}}r=n.indexOf("<",r+1)}return!1}function Q(n,r){let e=n.indexOf("</script",r);while(e!==-1){if(n.charCodeAt(t(n,e+8))===l)return e;e=n.indexOf("</script",e+8)}return-1}function X(n,r){return t(n,r+8)+1}var x=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function D(n){return x.has(n)||n.charCodeAt(0)===33&&n.toLowerCase()==="!doctype"}function Y(n,r){let e=r;while(e<n.length){let o=n.charCodeAt(e);if(o===47&&n.charCodeAt(e+1)===42){let a=n.indexOf("*/",e+2);e=a===-1?n.length:a+2}else if(o===34||o===39){e++;while(e<n.length){let a=n.charCodeAt(e);if(a===o||a===10)break;e+=a===92?2:1}e++}else if(o===60&&n.startsWith("</style",e))break;else e++}return Math.min(e,n.length)}var p=34,c=39,h=47,b=61,l=62,u=(n)=>n===p||n===c;function E(n,r,e){let o=r;for(;o<n.length;o++){let a=n.charCodeAt(o);if(i(a)||a===h||a===l)break;if(e&&(u(a)||a===b))break}return o}function J(n,r){let e=n.charCodeAt(r);return i(e)||u(e)||e===b||e===60||e===l||e===96||e===h&&n.charCodeAt(r+1)===l}
2
+ export{w,s,i,t,H,Q,X,D,Y,u,E,J};
@@ -0,0 +1,3 @@
1
+ import{K}from"./shared-stdj6se1.js";import{C,h,_,F,ce}from"./shared-4wqe6a27.js";import{m,S}from"./shared-xyqvjc3m.js";import{e,Ce,_e,Pe,Ie,Le,Re,$e,Oe,qe,De,ye,Be,Fe,xe,Me,Ve,We,je,ae,ge,ze,be,Ue,Ke,d,Ge,He,Qe,Xe,Ye,Je,Ze,et,tt,Se,it,rt,st,nt,ot,at,le,lt,ct,pt,ve,ut,ht,ft,dt,n,mt,yt,xt,B,Z,N,gt,bt}from"./shared-jxkrk6hx.js";import{w,s,i,t,H,Q,X,D,Y,u,E,J}from"./shared-nbaaegmc.js";import{A}from"./shared-n0fpkmn8.js";import{te}from"./shared-h6c4cer7.js";var Xn=/\r(?!\n)|[\u2028\u2029]/,j=/\s*}/y;function z(r,o){let l=r.codePointAt(o);if(l===void 0||!m(l,!0))return o;let c=o+(l<=65535?1:2),a=r.codePointAt(c);while(a!==void 0&&S(a,!0))c+=a<=65535?1:2,a=r.codePointAt(c);return c}class pe{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(r,o,l,c={}){if(this.source=r,this.loc=c.loc??!1,this.lfOnly=this.loc&&!Xn.test(r),this.isTypeScript=H(r),this.typescript=l.typescript,this.isTypeScript&&!this.typescript)te();this.entityNames=l.entityNames,this.css=c.css??!0,this.script=c.script??!0,this.comments=c.comments??!0,this.root={type:"Root",start:0,end:o,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(r){if(r.length===1)return this.source.charCodeAt(this.index)===r.charCodeAt(0);return this.source.startsWith(r,this.index)}matchRegex(r){return r.lastIndex=this.index,r.exec(this.source)?.[0]??null}eat(r,o=!1){if(this.match(r))return this.index+=r.length,!0;if(o)d(this.index,r);return!1}read(r){let o=this.matchRegex(r);if(o)this.index+=o.length;return o}readUntil(r){if(this.index>=this.source.length)n(this.source.length);let o=this.source.indexOf(r,this.index),l=o===-1?this.source.length:o,c=this.source.slice(this.index,l);return this.index=l,c}allowWhitespace(){this.index=t(this.source,this.index)}requireWhitespace(){if(!i(this.source.charCodeAt(this.index)))Ge(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(r,o){return this.loc?{start:h(r),end:h(o)}:void 0}readIdentifierName(){let r=this.index,o=z(this.source,r),l=this.source.slice(r,o);if(this.index=o,B.has(l))mt(r,l);let c={type:"Identifier",name:l,start:r,end:o};if(this.loc)c.loc=this.sourceLocation(r,o);return c}current(){return this.stack[this.stack.length-1]}append(r){this.fragments[this.fragments.length-1].nodes.push(r)}open(r,o){this.append(r),this.stack.push(r),this.fragments.push(o)}setFragment(r){this.fragments[this.fragments.length-1]=r}close(){this.stack.pop(),this.fragments.pop()}}var zn={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function me(r,o,l,c){return{type:"Literal",start:o,end:l,value:c,raw:r.slice(o,l)}}function ln(r,o){let l=r.charCodeAt(o);if(l===34||l===39){for(let a=o+1;a<r.length;a++){let p=r.charCodeAt(a);if(p===l)return me(r,o,a+1,r.slice(o+1,a));if(p===92||p===10||p===13)return null}return null}let c=o;for(;c<r.length;c++){let a=r.charCodeAt(c);if(a<48||a>57)break}if(c===o||l===48&&c-o>1)return null;return me(r,o,c,Number(r.slice(o,c)))}function Zn(r,o,l){let c=z(r,o);if(c===o)return ln(r,o);let a=r.slice(o,c);if(a==="true"||a==="false"||a==="null")return me(r,o,c,a==="null"?null:a==="true");if(B.has(a))return null;let p={type:"Identifier",start:o,end:c,name:a};for(let f=c;;){let y=r.charCodeAt(f);if(y===40){let T=Kn(r,f+1,l);if(!T)return null;p={type:"CallExpression",start:o,end:T.end,callee:p,arguments:T.arguments,optional:!1},f=T.end;continue}let x,g;if(y===46){if(g=z(r,f+1),g===f+1)return null;x={type:"Identifier",start:f+1,end:g,name:r.slice(f+1,g)}}else if(y===91){if(x=ln(r,f+1),!x||r.charCodeAt(x.end)!==93)return null;g=x.end+1}else return p;p={type:"MemberExpression",start:o,end:g,object:p,property:x,computed:y===91,optional:!1},f=g}}function Kn(r,o,l){let c=[],a=t(r,o);if(r.charCodeAt(a)===41)return{arguments:c,end:a+1};for(;;){let p=ee(r,a,l);if(!p)return null;c.push(p),a=t(r,p.end);let f=r.charCodeAt(a);if(f===41)return{arguments:c,end:a+1};if(f!==44)return null;if(a=t(r,a+1),r.charCodeAt(a)===41)return null}}function Te(r,o,l){let c=r.charCodeAt(o),a=r.charCodeAt(o+1);if(!(c===33&&a!==61)&&!(c===45&&a!==45&&a!==61))return Zn(r,o,l);let p=Te(r,t(r,o+1),l);if(!p)return null;return{type:"UnaryExpression",start:o,end:p.end,operator:c===33?"!":"-",prefix:!0,argument:p}}function sn(r,o,l){let c=r.charCodeAt(o),a=r.charCodeAt(o+1);switch(c){case 124:return a===124&&r.charCodeAt(o+2)!==61?"||":null;case 38:return a===38&&r.charCodeAt(o+2)!==61?"&&":null;case 63:return a===63&&r.charCodeAt(o+2)!==61?"??":null;case 61:if(a!==61)return null;return r.charCodeAt(o+2)===61?"===":"==";case 33:if(a!==61)return null;return r.charCodeAt(o+2)===61?"!==":"!=";case 60:case 62:if(l||a===c)return null;if(a===61)return c===60?"<=":">=";return c===60?"<":">";case 43:return a===43||a===61?null:"+";case 45:return a===45||a===61?null:"-";case 42:return a===42||a===61?null:"*";case 47:return a===47||a===42||a===61?null:"/";case 37:return a===61?null:"%";default:return null}}function Ae(r,o,l,c){if(cn(r.charCodeAt(o.end)))return o;let a=t(r,o.end),p=sn(r,a,c);if(p===null)return o;let f=zn[p];if(f<=l)return o;let y=Te(r,t(r,a+p.length),c);if(!y)return null;let x=Ae(r,y,p==="??"?2:f,c);if(!x)return null;let g;if(p==="||"||p==="&&"||p==="??"){let T=sn(r,t(r,x.end),c);if(p==="??"?T==="||"||T==="&&":T==="??")return null;g={type:"LogicalExpression",start:o.start,end:x.end,left:o,operator:p,right:x}}else g={type:"BinaryExpression",start:o.start,end:x.end,left:o,operator:p,right:x};return Ae(r,g,l,c)}function ee(r,o,l){let c=Te(r,o,l);if(!c)return null;let a=Ae(r,c,-1,l);if(!a||cn(r.charCodeAt(a.end)))return a;let p=t(r,a.end);if(r.charCodeAt(p)!==63)return a;let f=r.charCodeAt(p+1);if(f===46||f===63)return null;let y=ee(r,t(r,p+1),l);if(!y)return null;let x=t(r,y.end);if(r.charCodeAt(x)!==58)return null;let g=ee(r,t(r,x+1),l);if(!g)return null;return{type:"ConditionalExpression",start:a.start,end:g.end,test:a,consequent:y,alternate:g}}function cn(r){return r===125||r===41||r===44||r===58}function Qn(r,o){let l=r.charCodeAt(t(r,o));return l===125||l===41}function Yn(r,o,l){let c=ee(r,o,l);return c&&Qn(r,c.end)?c:null}function R(r){switch(r.loc={start:_(r.start),end:_(r.end)},r.type){case"MemberExpression":R(r.object),R(r.property);break;case"CallExpression":R(r.callee);for(let o of r.arguments)R(o);break;case"UnaryExpression":R(r.argument);break;case"BinaryExpression":case"LogicalExpression":R(r.left),R(r.right);break;case"ConditionalExpression":R(r.test),R(r.consequent),R(r.alternate);break}}function v(r){let o=!r.loc||r.lfOnly?Yn(r.source,r.index,r.isTypeScript):null;if(o){if(r.index=o.end,r.loc)R(o);return o}let{node:l,end:c}=N(r,r.source,r.index);return r.index=c,l}var Jn=new Set(["server","client","worker","test","default"]);function an(r,o,l){let{source:c,index:a}=r;if(a>=c.length)n(c.length);let p=Q(c,a);if(p===-1)ae(c.length,"script");r.index=X(c,p);let f=r.script?Z(r,c.slice(0,p),a):{type:"Program",start:a,end:p,body:[],sourceType:"module"};if(f.start=a,f.loc)Object.assign(f.loc.start,_(o)),Object.assign(f.loc.end,_(r.index));else if(r.loc)f.loc={start:_(o),end:_(r.index)};let y="default";for(let x of l){if(Jn.has(x.name))Je(x,x.name);if(x.name==="module"){if(x.value!==!0)Xe(x,x.name);y="module"}if(x.name==="context"){let g=x.value;if(!Array.isArray(g)||g.length!==1||g[0].type!=="Text"||g[0].data!=="module")Ye(x);y="module"}}return{type:"Script",start:o,end:r.index,context:y,content:f,attributes:l}}var St=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,At=/\d+(\.\d+)?%/y,Tt=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,Et=/\s*>/y,L=-1,fn=34,Ct=35,_t=36,vt=38,mn=39,Pt=40,kt=41,ie=42,wt=43,Rt=45,Nt=46,hn=47,Ee=58,Bt=59,Ot=60,un=61,Lt=62,Dt=91,we=92,Wt=93,Ft=94,xn=123,ke=124,It=125,Sn=126,re=[];function gn(r,o,l){let c=r.index;re=[];let a=r.css?Gt(r):Mt(r),p=r.index;return r.eat("</style",!0),r.read(Et),{type:"StyleSheet",start:o,end:r.index,attributes:l,children:a,comments:re,content:{start:c,end:p,styles:r.source.slice(c,p),comment:null}}}function Mt(r){return r.index=Y(r.source,r.index),[]}function Gt(r){let o=[];for(;;){if(M(r,!0),r.match("</style")||r.index>=r.source.length)break;o.push(r.match("@")?An(r):yn(r))}return o}function An(r){let o=r.index;r.eat("@",!0);let l=W(r),c=Ne(r,!0),a=null;if(r.match("{"))a=Cn(r);else r.eat(";",!0);return{type:"Atrule",start:o,end:r.index,name:l,prelude:c,block:a}}function yn(r){let o=r.index;return{type:"Rule",prelude:Tn(r,!1),block:Cn(r),start:o,end:r.index}}function Tn(r,o){let l=[];M(r,!0);let c=r.index;while(r.index<r.source.length){l.push(qt(r,o));let a=r.index;if(M(r,!0),r.match(o?")":"{"))return{type:"SelectorList",start:c,end:a,children:l};r.eat(",",!0),M(r,!0)}return n(r.source.length)}function pn(r,o){return{type:"RelativeSelector",combinator:r,selectors:[],start:o,end:-1}}function qt(r,o){let{source:l,index:c}=r,a=[],p=pn(null,r.index);while(r.index<l.length){let f=r.index,y=l.charCodeAt(f),x=p.selectors;if(y===vt)r.index++,x.push({type:"NestingSelector",name:"&",start:f,end:r.index});else if(y===ie)r.index++,x.push(dn(r,f,"*"));else if(y===Ct)r.index++,x.push({type:"IdSelector",name:W(r),start:f,end:r.index});else if(y===Nt)r.index++,x.push({type:"ClassSelector",name:W(r),start:f,end:r.index});else if(y===Ee){let P=l.charCodeAt(f+1)===Ee;r.index+=P?2:1;let k=W(r),I=null;if(r.eat("("))I=Tn(r,!0),r.eat(")",!0);if(P)x.push({type:"PseudoElementSelector",name:k,start:f,end:r.index,...I&&{args:I}});else x.push({type:"PseudoClassSelector",name:k,args:I,start:f,end:r.index})}else if(y===Dt)r.index++,x.push(Ut(r,f));else{let P=o?r.read(St):null,k=!P&&s(y)?r.read(At):null;if(P)x.push({type:"Nth",value:P,start:f,end:r.index});else if(k)x.push({type:"Percentage",value:k,start:f,end:r.index});else if(En(l,f)===0){let I=W(r);x.push(dn(r,f,I))}}let g=r.index;M(r,!1);let T=r.match(",")||r.match(o?")":"{");if(r.index=g,T)return p.end=g,a.push(p),{type:"ComplexSelector",start:c,end:g,children:a};let b=$t(r);if(b){if(p.selectors.length>0)p.end=g,a.push(p);if(p=pn(b,b.start),r.allowWhitespace(),r.match(",")||r.match(o?")":"{"))Be(r.index)}}return n(l.length)}function dn(r,o,l){let c=l,a;if(r.eat("|"))a=c,c=r.eat("*")?"*":W(r);return{type:"TypeSelector",name:c,...a!==void 0&&{namespace:a},start:o,end:r.index}}function Ut(r,o){let l=r.source;r.allowWhitespace();let c=W(r);r.allowWhitespace();let a=null,p=null,f=l.charCodeAt(r.index);if(f===un)p="=";else if((f===Sn||f===Ft||f===_t||f===ie||f===ke)&&l.charCodeAt(r.index+1)===un)p=l.slice(r.index,r.index+2);if(p)r.index+=p.length,r.allowWhitespace(),a=Xt(r);r.allowWhitespace();let y=r.index;while(_n(l.charCodeAt(r.index)))r.index++;let x=r.index>y?l.slice(y,r.index):null;return r.allowWhitespace(),r.eat("]",!0),{type:"AttributeSelector",start:o,end:r.index,name:c,matcher:p,value:a,flags:x}}function En(r,o){let l=r.charCodeAt(o);if(l===wt||l===Sn||l===Lt)return 1;if(l===ke&&r.charCodeAt(o+1)===ke)return 2;return 0}function $t(r){let o=r.index;r.allowWhitespace();let l=r.index,c=En(r.source,l);if(c>0){r.index+=c;let a=r.index;return r.allowWhitespace(),{type:"Combinator",name:r.source.slice(l,a),start:l,end:a}}if(r.index!==o)return{type:"Combinator",name:" ",start:o,end:r.index};return null}function Cn(r){let o=r.index;r.eat("{",!0);let l=[];while(r.index<r.source.length){if(M(r,!0),r.match("}"))break;l.push(Vt(r))}return r.eat("}",!0),{type:"Block",start:o,end:r.index,children:l}}function Vt(r){if(r.match("@"))return An(r);let o=r.index;Ne(r,!1);let l=r.source.charCodeAt(r.index);return r.index=o,l===xn?yn(r):jt(r)}function jt(r){let{source:o,index:l}=r;if(l>=o.length)n(o.length);let c=l;while(c<o.length){let x=o.charCodeAt(c);if(x===Ee||i(x))break;c++}let a=o.slice(l,c);r.index=c,r.allowWhitespace(),r.eat(":");let p=r.index;r.allowWhitespace();let f=Ne(r,!0);if(!f&&!a.startsWith("--"))De({start:l,end:p});let y=r.index;if(!r.match("}"))r.eat(";",!0);return{type:"Declaration",start:l,end:y,property:a,value:f}}function Ne(r,o){let l=r.source,c=l.length,a="",p=r.index,f=null,y=!1,x=!1,g=L,T=r.index;while(T<c){let b=l.charCodeAt(T);if(y){y=!1,T++;continue}if(b===we){y=!0,T++;continue}if(b===g)g=L;else if(b===kt)x=!1;else if(g===L&&(b===fn||b===mn))g=b;else if(b===Pt){if(Ht(l,a,p,T))x=!0}else if((b===Bt||b===xn||b===It)&&!x&&g===L){if(r.index=T,!o)return"";if(a+=l.slice(p,T),f){let P=a.length-a.trimStart().length;for(let k of f)k.position=Math.max(0,(k.position??0)-P)}return a.trim()}else if(b===hn&&!x&&g===L&&l.charCodeAt(T+1)===ie){a+=l.slice(p,T),r.index=T;let P=bn(r);if(o)P.position=a.length,re.push(P),f??=[],f.push(P);T=r.index,p=T;continue}T++}return r.index=c,n(c)}function Ht(r,o,l,c){if(c-l>=3)return r.charCodeAt(c-3)===117&&r.charCodeAt(c-2)===114&&r.charCodeAt(c-1)===108;return(o+r.slice(l,c)).endsWith("url")}function Xt(r){let o=r.source,l=L;if(r.eat('"'))l=fn;else if(r.eat("'"))l=mn;let c=r.index,a=!1,p=c;while(p<o.length){let f=o.charCodeAt(p);if(a)a=!1;else if(f===we)a=!0;else if(l===L?f===Wt||i(f):f===l)return r.index=l===L?p:p+1,o.slice(c,p).trim();p++}return r.index=p,n(o.length)}function W(r){let{source:o,index:l}=r,c=o.charCodeAt(l);if(s(c)||c===Rt&&s(o.charCodeAt(l+1)))ye(l);let a="",p=l,f=l;while(f<o.length){let y=o.charCodeAt(f);if(y===we){a+=o.slice(p,f),r.index=f;let x=r.matchRegex(Tt);if(x){let g=String.fromCodePoint(Number.parseInt(x.slice(1),16));a+=g==="\\"?"\\\\":g,f+=x.length}else a+=`\\${o[f+1]}`,f+=2;p=f}else if(y>=160||zt(y))f++;else break}if(a+=o.slice(p,f),r.index=f,a==="")ye(l);return a}function M(r,o){let l=r.source;r.allowWhitespace();for(;;){let c=l.charCodeAt(r.index);if(c===hn&&l.charCodeAt(r.index+1)===ie){let a=bn(r);if(o)re.push(a)}else if(c===Ot&&r.eat("<!--"))r.readUntil("-->"),r.eat("-->",!0);else break;r.allowWhitespace()}}function bn(r){let o=r.index;r.eat("/*",!0);let l=r.readUntil("*/");return r.eat("*/",!0),{type:"CSSComment",value:l,start:o,end:r.index}}function _n(r){return r>=65&&r<=90||r>=97&&r<=122}function zt(r){return _n(r)||s(r)||r===95||r===45}var en=/<\/textarea(\s[^>]*)?>/iy,Zt=/^![a-zA-Z]+$/,Kt=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Qt=/^[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,nn="\\u200C\\u200D",Yt=new RegExp(`^(?:\\p{Lu}[$${nn}\\p{ID_Continue}.]*|\\p{ID_Start}[$${nn}\\p{ID_Continue}]*(?:\\.[$${nn}\\p{ID_Continue}]+)+)$`,"u"),Jt=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),tn=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]]]),vn=[...tn.keys()],er=`${vn.slice(0,-1).join(", ")} or ${vn.at(-1)}`,nr=62,Pn=123;function oe(r,o){let l=r.index;if(l>=r.source.length)n(r.source.length);let c=E(r.source,l,o);return r.index=c,{name:r.source.slice(l,c),start:l,end:c,loc:r.sourceLocation(l,c)}}var q=(r,o,l,c=l)=>({start:r,end:o,type:"Text",raw:l,data:c});function tr(r){let o=r.charCodeAt(0);if(o>=97&&o<=122&&!r.includes("."))return!1;return Yt.test(r)}function rr(r){let o=!0;for(let l=0;l<r.length&&o;l++){let c=r.charCodeAt(l);o=c>=97&&c<=122||l>0&&c>=48&&c<=57}return o&&r.length>0||Zt.test(r)||Kt.test(r)||Qt.test(r)}function kn(r,o){for(let l=r.length-1;l>=0;l--){let c=o(r[l]);if(c!==void 0)return c}return!1}function ir(r,o,l){let c=tn.get(o);if(c)return c[0];if(l)return"Component";if(o==="title"){if(kn(r.stack,({type:p})=>{if(p==="SvelteHead")return!0;return p==="RegularElement"||p==="Component"?!1:void 0}))return"TitleElement"}if(o==="slot"){if(!kn(r.stack,(p)=>p.type==="RegularElement"&&p.attributes.some((f)=>f.type==="Attribute"&&f.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function ne(r){let o=r.index++;if(r.eat("!--")){let l=r.readUntil("-->");r.eat("-->",!0),r.append({type:"Comment",start:o,end:r.index,data:l})}else if(r.eat("/"))or(r,o);else sr(r,o)}function or(r,o){let{name:l}=oe(r,!1);if(r.allowWhitespace(),r.eat(">",!0),D(l))xt(o);let c=r.current();while(!("name"in c)||c.name!==l){if(c.type!=="RegularElement"){let a=r.lastAutoClosedTag;if(a?.tag===l)je(o,l,a.reason);We(o,l)}c.end=o,r.close(),c=r.current()}if(c.end=r.index,r.close(),r.stack.length<(r.lastAutoClosedTag?.depth??0))r.lastAutoClosedTag=void 0}function lr(r,o,l){return{type:r,start:o,end:-1,name:l}}function sr(r,o){let l=oe(r,!1),{name:c}=l,a=tn.get(c);if(!a&&c.startsWith("svelte:"))nt(l,er);let p=tr(c);if(!p&&!rr(c))ft(l);if(a?.[1]){if(r.metaTags.has(c))it(o,c);if(r.current().type!=="Root")st(o,c);r.metaTags.add(c)}let f=lr(ir(r,c,p),o,c);if(r.loc)f.name_loc=l.loc;f.attributes=[],f.fragment={type:"Fragment",nodes:[]},r.allowWhitespace();let y=r.current();if(y.type==="RegularElement"&&K(y.name,c))y.end=o,r.close(),r.lastAutoClosedTag={tag:y.name,reason:c,depth:r.stack.length};if((c==="script"||c==="style")&&r.current().type==="Root"){let g=[];f.attributes=g,Bn(r,g,fr),ar(r,f,o,g);return}if(Bn(r,f.attributes,hr),f.type==="SvelteComponent"){let g=wn(f);if(!g)tt(o);if(!Rn(g.value))et(g.start);f.expression=Nn(g.value)}else if(f.type==="SvelteElement"){let g=wn(f);if(!g)Se(o);if(g.value===!0)Se(g);f.tag=Rn(g.value)?Nn(g.value):dr(g.value[0])}if(!r.eat("/")&&!D(c))if(r.eat(">",!0),c==="textarea")f.fragment.nodes=Ln(r,(g,T)=>(en.lastIndex=T,en.test(g)),"inside <textarea>"),r.read(en);else if(c==="script"||c==="style")f.fragment.nodes.push(cr(r,`</${c}>`));else{r.open(f,f.fragment);return}else r.eat(">",!0);f.end=r.index,r.append(f)}function cr(r,o){let l=r.index,c=r.source.indexOf(o,l);r.index=c===-1?r.source.length:c;let a=q(l,r.index,r.source.slice(l,r.index));return r.eat(o,!0),a}function ar(r,o,l,c){r.eat(">",!0);let a=ur(r.root.fragment.nodes,l);if(o.name==="style"){let y=gn(r,l,c);if(y.content.comment=a,r.root.css)Ze(l);r.root.css=y;return}let p=an(r,l,c);if(a&&r.comments)p.content.leadingComments=[{type:"Line",value:a.data}];let f=p.context==="module"?"module":"instance";if(r.root[f])Qe(l);r.root[f]=p}function ur(r,o){let l=r.length-1;if(l<0||r[l].end!==o)return null;for(let c=l;c>=0;c--){let a=r[c];if(a.type==="Comment")return a;if(a.type!=="Text"||a.data.trim())return null}return null}var pr=(r)=>r.type==="Attribute"&&r.name==="this";function wn(r){let o=r.attributes.find(pr);if(o)r.attributes.splice(r.attributes.indexOf(o),1);return o}function Rn(r){if(r===!0)return!1;if(!Array.isArray(r))return!0;return r.length===1&&r[0].type==="ExpressionTag"}function Nn(r){return(Array.isArray(r)?r[0]:r).expression}function dr(r){if(r.type!=="Text")return r.expression;return{type:"Literal",value:r.data,raw:`'${r.raw}'`,start:r.start,end:r.end}}function Bn(r,o,l){let c=new Set;for(;;){let a=l(r);if(!a)return;let{type:p}=a;if(p==="Attribute"||p==="BindDirective"||p==="StyleDirective"||p==="ClassDirective"){let f=`${p==="BindDirective"?"Attribute":p}${a.name}`;if(c.has(f))Ce(a);if(a.name!=="this")c.add(f)}o.push(a),r.allowWhitespace()}}function rn(r,o,l,c,a){return r.loc?{type:"Attribute",start:l,end:c,name:o.name,name_loc:o.loc,value:a}:{type:"Attribute",start:l,end:c,name:o.name,value:a}}function On(r){if(u(r.source.charCodeAt(r.index)))d(r.index,"=")}function fr(r){let o=r.index,l=oe(r,!0);if(!l.name)return null;let c=!0;if(r.eat("=")){r.allowWhitespace();let{source:a}=r,p=r.index,f=u(a.charCodeAt(p)),y=-1;if(f){let T=a.indexOf(a[p],p+1);if(T!==-1)y=T+1}if(y===-1){y=p;while(y<a.length&&a.charCodeAt(y)!==nr&&!i(a.charCodeAt(y)))y++;if(y===p)ge(p)}r.index=y;let x=f?1:0,g=a.slice(p+x,y-x);c=[q(y-g.length-x,y-x,g,A(g,!0,r.entityNames))]}return On(r),rn(r,l,o,r.index,c)}function mr(r){let o=r.index,l=r.match("/*");if(!l&&!r.match("//"))return!1;r.index+=2;let c=r.readUntil(l?"*/":`
2
+ `);if(l)r.eat("*/");let a={type:l?"Block":"Line",start:o,end:r.index,value:c},p=r.sourceLocation(o,r.index);if(p)a.loc=p;if(r.comments)r.root.comments.push(a);return!0}function hr(r){while(mr(r))r.allowWhitespace();let o=r.index;if(r.eat("{"))return xr(r,o);let l=oe(r,!0);if(!l.name)return null;let c=r.index;r.allowWhitespace();let a=!0;if(r.eat("=")){if(r.allowWhitespace(),r.match("/>"))a=[q(r.index,r.index+1,"/")],r.index++;else a=Ar(r);c=r.index}else On(r);let p=l.name.indexOf(":"),f=p>0?Jt.get(l.name.slice(0,p)):void 0;return f?gr(r,f,l,p,o,c,a):rn(r,l,o,c,a)}function xr(r,o){if(r.allowWhitespace(),r.eat("@attach")){r.requireWhitespace();let a=v(r);return r.eatClosingBrace(),{type:"AttachTag",start:o,end:r.index,expression:a}}if(r.eat("...")){let a=v(r);return r.eatClosingBrace(),{type:"SpreadAttribute",start:o,end:r.index,expression:a}}let l=r.readIdentifierName();if(l.name==="")_e(o);r.eatClosingBrace();let c={type:"ExpressionTag",start:l.start,end:l.end,expression:l};return rn(r,l,o,r.index,c)}function Sr(r){if(r===!0)return;return Array.isArray(r)?r[0]:r}function gr(r,o,l,c,a,p,f){let[y,...x]=l.name.slice(c+1).split("|");if(y==="")Ve({start:a,end:a+c+1},l.name);let g={start:a,end:p,type:o,name:y};if(r.loc)g.name_loc=l.loc;if(o==="StyleDirective")return g.modifiers=x,g.value=f,g;let T=Sr(f);if(T&&(Array.isArray(f)&&f.length>1||T.type==="Text"))Me(T.start);if(g.expression=T?.expression??null,g.modifiers=x,o==="TransitionDirective"){let b=l.name.slice(0,c);g.intro=b!=="out",g.outro=b!=="in"}if((o==="BindDirective"||o==="ClassDirective")&&!g.expression)g.expression={start:a+c+1,end:p,type:"Identifier",name:y};return g}function Ar(r){let o=r.source.charCodeAt(r.index),l=u(o);if(l){if(r.index++,r.source.charCodeAt(r.index)===o)return r.index++,[q(r.index-1,r.index-1,"")]}let c;try{c=Ln(r,l?(a,p)=>a.charCodeAt(p)===o:J,"in attribute value",l?o:void 0)}catch(a){let p=a instanceof e&&a.code==="js_parse_error"?a.position?.[0]:void 0;if(p!==void 0&&r.source.startsWith("/>",p-1))r.index=p,d(p,l?String.fromCharCode(o):"}");throw a}if(l)r.index++;else if(c.length===0)ge(r.index);return l||c.length>1||c[0].type==="Text"?c:c[0]}function Ln(r,o,l,c){let{source:a}=r,p=[],f=r.index,y=(x)=>{if(x<=f)return;let g=a.slice(f,x);p.push(q(f,x,g,A(g,!0,r.entityNames)))};while(r.index<a.length){let x=r.index;if(o(a,x))return y(x),p;if(a.charCodeAt(x)!==Pn){if(r.index++,c!==void 0)while(r.index<a.length&&a.charCodeAt(r.index)!==Pn&&a.charCodeAt(r.index)!==c)r.index++;continue}r.index++;let g=a.charCodeAt(r.index);if(g===35||g===64){r.index++;let b=r.index;while(r.index<a.length&&a.charCodeAt(r.index)>=97&&a.charCodeAt(r.index)<=122)r.index++;let P=a.slice(b,r.index);(g===35?Re:dt)(x,P,l)}y(x),r.allowWhitespace();let T=v(r);r.eatClosingBrace(),p.push({type:"ExpressionTag",start:x,end:r.index,expression:T}),f=r.index}n(a.length)}var yr=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),Tr=new Map([["type",(r,o)=>{if(o!=="String"&&o!=="Number"&&o!=="Boolean"&&o!=="Array"&&o!=="Object")return!1;return r.type=o,!0}],["reflect",(r,o)=>{if(typeof o!=="boolean")return!1;return r.reflect=o,!0}],["attribute",(r,o)=>{if(typeof o!=="string")return!1;return r.attribute=o,!0}]]),Dn="[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}-]",Er=new RegExp(`^[a-z]${Dn}*-${Dn}*$`,"u"),Cr=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),se=(r)=>(o,l)=>{let c=ue(l);if(typeof c!=="boolean")le(l,"true or false");o[r]=c},br=new Map([["runes",se("runes")],["immutable",se("immutable")],["preserveWhitespace",se("preserveWhitespace")],["accessors",se("accessors")],["namespace",(r,o)=>{let l=yr.get(ue(o));if(!l)le(o,'"html", "mathml" or "svg"');r.namespace=l}],["css",(r,o)=>{if(ue(o)!=="injected")le(o,'"injected"');r.css="injected"}],["tag",(r,o)=>ot(o)],["customElement",(r,o)=>{let l=vr(o);if(l)r.customElement=l}]]);function Fn(r){let o=[],l={start:r.start,end:r.end,attributes:o};for(let c of r.attributes){if(c.type!=="Attribute")at(c);o.push(c);let a=br.get(c.name);if(!a)ht(c,c.name);a(l,c)}return l}function ue({value:r}){if(r===!0)return!0;let o=Array.isArray(r)?r:[r];if(o.length===0)return!0;if(o.length>1)return null;let[l]=o;if(l.type==="Text")return l.data;return l.expression.type==="Literal"?l.expression.value:null}function Wn(r,o){if(typeof o!=="string")ve(r);if(!o)return;if(!Er.test(o))ve(r);if(Cr.has(o))ut(r)}function on(r){return r.type==="Property"&&!r.computed&&r.key.type==="Identifier"}function _r(r,o){let l=new Map;for(let c of r.properties){if(!on(c))o();if(!l.has(c.key.name))l.set(c.key.name,c.value)}return l}function vr(r){let o=()=>lt(r);if(r.value===!0)o();let l=Array.isArray(r.value)?r.value[0]:r.value;if(l.type==="Text"){let T=ue(r);return Wn(r,T),{tag:T}}let{expression:c}=l;if(c.type!=="ObjectExpression"){if(c.type==="Literal"&&c.value===null)return;o()}let a=_r(c,o),p={},f=a.get("tag");if(f){let T=f.type==="Literal"?f.value:void 0;Wn(null,T),p.tag=T}let y=a.get("props");if(y){let T=()=>ct(r);if(y.type!=="ObjectExpression")T();p.props={};for(let b of y.properties){if(!on(b)||b.value.type!=="ObjectExpression")T();let P={};p.props[b.key.name]=P;for(let k of b.value.properties){if(!on(k)||k.value.type!=="Literal")T();if(!Tr.get(k.key.name)?.(P,k.value.value))T()}}}let x=a.get("shadow");if(x)if(x.type==="ObjectExpression")p.shadow=x;else if(x.type==="Literal"&&(x.value==="open"||x.value==="none"))p.shadow=x.value;else pt(r);let g=a.get("extend");if(g)p.extend=g;return p}var Pr={"{":"}","(":")","[":"]"};function V(r,o,l=Pr){let c=Object.values(l),a=[],p=o;while(p<r.length){let f=r[p++];if(f==="'"||f==='"'||f==="`")p=kr(r,p,f);else if(Object.hasOwn(l,f))a.push(f);else if(c.includes(f)){let y=l[a.pop()??""];if(f!==y)d(p-1,y);if(a.length===0)return p}}n(r.length)}function kr(r,o,l){let c=o;while(c<r.length){let a=r[c++];if(a===l)return c;if(a==="\\")c++;else if(l==="`"&&a==="$"&&r[c]==="{")c=V(r,c)}yt(o)}var wr=/\?\s*:/g;function G(r){let o=r.index,l=r.readIdentifierName();if(l.name!=="")return{...l,typeAnnotation:In(r)};let c=r.source[r.index];if(c!=="{"&&c!=="[")Ue(r.index);r.index=V(r.source,o);let a=gt(r,r.source.slice(0,r.index),o)??Rr(r,o);ce(a,"ObjectPattern","ArrayPattern");let p=In(r);if(a.typeAnnotation=p,p)a.end=p.end;return a}function Rr(r,o){let{node:l}=N(r,`${r.source.slice(0,r.index)} = 1`,o);return ce(l,"AssignmentExpression"),l.left}function In(r){let o=r.index;if(r.allowWhitespace(),!r.eat(":")){r.index=o;return}let l="_ as ",c=r.index-l.length,a=r.source.slice(0,c)+l+r.source.slice(r.index).replace(wr,":"),p=N(r,a,c).node;if(p.type==="AssignmentExpression"){let f=p.right.start;while(a[f]!=="=")f-=1;p=N(r,a.slice(0,f),c).node}if(p.type==="SequenceExpression")p=p.expressions[0];return ce(p,"TSAsExpression"),r.index=p.end,{type:"TSTypeAnnotation",start:o,end:r.index,typeAnnotation:p.typeAnnotation}}var Nr={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},O=()=>({type:"Fragment",nodes:[]});function Gn(r,o){if(r.eat("if")){r.requireWhitespace();let l=v(r);r.eatClosingBrace();let c=O();r.open({type:"IfBlock",elseif:!1,start:o,end:-1,test:l,consequent:c,alternate:null},c)}else if(r.eat("each"))Or(r,o);else if(r.eat("await")){r.requireWhitespace();let l=v(r);r.allowWhitespace();let c={type:"AwaitBlock",start:o,end:-1,expression:l,value:null,error:null,pending:null,then:null,catch:null},a=O();if(r.eat("then"))c.value=Mn(r),c.then=a;else if(r.eat("catch"))c.error=Mn(r),c.catch=a;else c.pending=a;r.eat("}",!0),r.open(c,a)}else if(r.eat("key")){r.requireWhitespace();let l=v(r);r.eatClosingBrace();let c=O();r.open({type:"KeyBlock",start:o,end:-1,expression:l,fragment:c},c)}else if(r.eat("snippet"))Lr(r,o);else ze(r.index)}function Mn(r){if(r.matchRegex(j))return r.allowWhitespace(),null;r.requireWhitespace();let o=G(r);return r.allowWhitespace(),o}function Br(r){let o={assertion:null},l=r.end,c=(p)=>{if(p.type==="TSAsExpression"&&p.end===r.end)return o.assertion=p,l=p.expression.end,p.expression;return F(p,c),p},a=r;if(r.type==="TSAsExpression")o.assertion=r,a=r.expression,l=a.end;else F(r,c);return a.end=l,{expression:a,assertion:o.assertion}}function Or(r,o){r.requireWhitespace();let l=r.source,c;while(!c)try{c=v(r)}catch(x){let T=((x instanceof e?x.position:void 0)?.[0]??o)-2;while(T>o&&r.source.slice(T,T+2)!=="as")T-=1;if(T<=o)throw r.source=l,x;r.source=l.slice(0,T)}if(r.source=l,r.allowWhitespace(),!r.match("as")){if(c.type==="SequenceExpression")c=c.expressions[0];let x=Br(c);if(c=x.expression,x.assertion){let g=x.assertion.typeAnnotation.start-2;while(r.source.slice(g,g+2)!=="as")g-=1;r.index=g}}let a=null,p,f;if(r.eat("as"))r.requireWhitespace(),a=G(r);else r.index=c.end;if(r.allowWhitespace(),r.eat(",")){if(r.allowWhitespace(),p=r.readIdentifierName().name,!p)be(r.index);r.allowWhitespace()}if(r.eat("("))r.allowWhitespace(),f=v(r),r.allowWhitespace(),r.eat(")",!0),r.allowWhitespace();r.eat("}",!0);let y=O();r.open({type:"EachBlock",start:o,end:-1,expression:c,body:y,context:a,index:p,key:f},y)}function Lr(r,o){r.requireWhitespace();let l=r.readIdentifierName();if(l.name==="")be(r.index);r.allowWhitespace();let c=r.index,a;if(r.isTypeScript&&r.match("<")){let x=V(r.source,c,{"<":">"});a=r.source.slice(c+1,x-1),r.index=x}r.allowWhitespace(),r.eat("(",!0);let p=1;while(r.index<r.source.length&&(!r.match(")")||p!==1)){if(r.match("("))p++;if(r.match(")"))p--;r.index+=1}r.eat(")",!0);let{node:f}=N(r,`${r.source.slice(0,r.index)} => {}`,c,!0);r.eatClosingBrace();let y=O();r.open({type:"SnippetBlock",start:o,end:-1,expression:l,typeParams:a,parameters:f.type==="ArrowFunctionExpression"?f.params:void 0,body:y},y)}function qn(r,o){let l=r.index-1,c=r.current();if(c.type==="IfBlock"){if(!r.eat("else"))d(l,"{:else} or {:else if}");if(r.eat("if"))Le(l);if(r.allowWhitespace(),c.alternate=O(),r.setFragment(c.alternate),r.eat("if")){r.requireWhitespace();let a=v(r);r.eatClosingBrace();let p=O();r.open({start:o,end:-1,type:"IfBlock",elseif:!0,test:a,consequent:p,alternate:null},p)}else r.eatClosingBrace()}else if(c.type==="EachBlock"){if(!r.eat("else"))d(l,"{:else}");r.eatClosingBrace(),c.fallback=O(),r.setFragment(c.fallback)}else if(c.type==="AwaitBlock"){let a;if(r.eat("then"))a="then";else if(r.eat("catch"))a="catch";else d(l,"{:then ...} or {:catch ...}");if(c[a])Pe(l,`{:${a}}`);if(!r.eat("}")){r.requireWhitespace();let f=G(r);if(a==="then")c.value=f;else c.error=f;r.eatClosingBrace()}let p=O();c[a]=p,r.setFragment(p)}else Ie(l)}function Un(r){let o=r.current(),l=Nr[o.type];if(!l)Oe(r.index-1);r.eat(l,!0),r.eatClosingBrace();while(o.type==="IfBlock"&&o.elseif)o.end=r.index,r.close(),o=r.current();o.end=r.index,r.close()}function Dr(r){return r.type==="CallExpression"||r.type==="ChainExpression"&&r.expression.type==="CallExpression"}function $n(r,o){if(r.eat("html")){r.requireWhitespace();let l=v(r);r.eatClosingBrace(),r.append({type:"HtmlTag",start:o,end:r.index,expression:l})}else if(r.eat("debug")){let l=[];if(!r.read(j)){let c=v(r),a=c.type==="SequenceExpression"?c.expressions:[c];for(let p of a){if(p.type!=="Identifier")Fe(p.start);l.push(p)}r.eatClosingBrace()}r.append({type:"DebugTag",start:o,end:r.index,identifiers:l})}else if(r.eat("const")){r.requireWhitespace();let l=G(r);r.allowWhitespace(),r.eat("=",!0),r.allowWhitespace();let c=r.index,a=v(r),p=r.index;if(a.type==="SequenceExpression"&&!r.source.slice(c,a.start).includes("("))qe(a);r.eatClosingBrace();let f={type:"VariableDeclarator",id:l,init:a,start:l.start,end:p};r.append({type:"ConstTag",start:o,end:r.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[f],start:o+2,end:r.index-1}})}else if(r.eat("render")){r.requireWhitespace();let l=v(r);if(!Dr(l))He(l);r.eatClosingBrace(),r.append({type:"RenderTag",start:o,end:r.index,expression:l})}else Ke(r.index)}var Wr=/(?:var|interface|enum)\b/y,Fr=/(?:let|const|type)\b/y;function Vn(r){let o=r.index;if(r.index+=1,r.allowWhitespace(),r.eat("#"))Gn(r,o);else if(r.eat(":"))qn(r,o);else if(r.eat("@"))$n(r,o);else if(r.match("/")&&!r.match("/*")&&!r.match("//"))r.index+=1,Un(r);else if(!Ir(r,o)){let l=v(r);r.eatClosingBrace(),r.append({type:"ExpressionTag",start:o,end:r.index,expression:l})}}function Ir(r,o){let l=r.index,c=r.matchRegex(Wr);if(c)xe({start:l,end:l+c.length});if(!r.matchRegex(Fr))return!1;let a=r.root.comments.length,p=bt(r,r.source,l);if(p.type==="ExpressionStatement")return r.root.comments.length=a,!1;if(p.type!=="VariableDeclaration"||p.kind!=="let"&&p.kind!=="const")xe(p);return r.index=p.end,r.eatClosingBrace(),r.append({type:"DeclarationTag",start:o,end:r.index,declaration:p}),!0}function Hn(r){let{source:o,index:l}=r;if(r.nextAngle<l)r.nextAngle=jn(o,"<",l);if(r.nextBrace<l)r.nextBrace=jn(o,"{",l);let c=Math.min(r.nextAngle,r.nextBrace);r.index=c;let a=o.slice(l,c);r.append({type:"Text",start:l,end:c,raw:a,data:A(a,!1,r.entityNames)})}function jn(r,o,l){let c=r.indexOf(o,l);return c===-1?r.length:c}function U(r,o,l){let c=he(r,o,l);while(c.index<c.source.length)de(c);return fe(c)}function he(r,o,l){let c=w(r);return C(c),new pe(c.trimEnd(),c.length,l,o)}function fe(r){if(r.stack.length>1){let a=r.current();if(a.end=a.start+1,a.type==="RegularElement")ae(a,a.name);$e(a)}let{nodes:o}=r.root.fragment,l=o.findIndex((a)=>a.type==="SvelteOptions"),c=o[l];if(c?.type==="SvelteOptions"){o.splice(l,1),r.root.options=Fn(c);let{nodes:a}=c.fragment;if(a.length>0)rt({start:a[0].start,end:a[a.length-1].end},c.name)}return r.root}function de(r){if(r.match("<"))ne(r);else if(r.match("{"))Vn(r);else Hn(r)}
3
+ export{ne,U,he,fe,de};
@@ -0,0 +1,2 @@
1
+ import{U}from"./shared-rh41v5ez.js";import{v}from"./shared-v0nj05q2.js";import{c}from"./shared-vjpq32kx.js";var o={typescript:c,entityNames:v};function pe(t,r){return U(t,r,o)}
2
+ export{pe};
@@ -1,2 +1,2 @@
1
- var o={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 W(t,d){return Object.hasOwn(o,t)&&o[t].includes(d)}
2
- export{W};
1
+ var o={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 K(t,d){return Object.hasOwn(o,t)&&o[t].includes(d)}
2
+ export{K};