sveld 0.37.9 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser.js ADDED
@@ -0,0 +1,265 @@
1
+ function qc(e){return e}var ge=Symbol("sveld.parsedComponentTypeScriptMetadata");function Ns(e){return e[ge]}function fe(e){return typeof e==="object"&&e!==null}function $s(e){return fe(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function Be(e){return fe(e)&&e.type==="Literal"}function _(e){return fe(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Xe(e){return fe(e)&&e.type==="MemberExpression"}function ee(e){return fe(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Bc(e){return fe(e)&&e.type==="CallExpression"}function he(e,t){if(!Bc(e))return!1;return!!e.callee&&fe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Pe(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?Pe(e.expression):e}function Ls(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?e.typeAnnotation:void 0}function Oc(e){return fe(e)&&e.type==="NewExpression"}function cr(e,t){if(!Oc(e))return!1;return!!e.callee&&fe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function _s(e){if(!fe(e)||typeof e.type!=="string")return null;if(e.type==="Literal"){let t=e.value;if(typeof t==="string")return t;return t==null?null:String(t)}if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1){let n=t[0]?.value?.cooked;return n==null?null:n}}return null}function G(e){if(!e||typeof e!=="object"||!("type"in e))return;if(_(e))return e.name;if(Be(e))return e.value==null?void 0:String(e.value);return}function Ye(e,t,n=0,r=e.length,i=0){let o=i;for(let a=n;a<r;a++){let s=e.charCodeAt(a);if(s===34||s===39||s===96){a=Fc(e,a,r);continue}if(s===123||s===40||s===91||s===60)o++;else if(s===125||s===41||s===93||s===62&&e.charCodeAt(a-1)!==61){if(o>0)o--}if(t?.(a,o)===!0)break}return o}function Fc(e,t,n){let r=e.charCodeAt(t);for(let i=t+1;i<n;i++){let o=e.charCodeAt(i);if(o===92)i++;else if(o===r)return i}return n-1}function z(e,t){let n=[],r=0;return Ye(e,(i,o)=>{if(o===0&&t.includes(e[i]))n.push(e.slice(r,i)),r=i+1;return!1}),n.push(e.slice(r)),n}function Kt(e,t){let n=-1;return Ye(e,(r,i)=>{if(i===0&&t.includes(e[r]))n=r;return n!==-1}),n}function Vc(e){let t=-1;return Ye(e,(n,r)=>{if(r===0&&e[n]==="="&&e[n+1]===">")t=n;return t!==-1}),t}function Qe(e,t){let n=-1;return Ye(e,(r,i)=>{if(i===0)n=r;return n!==-1},t),n}function Is(e){if(!e)return;let t=Vc(e);if(t===-1)return;return e.slice(t+2).trim()||void 0}function ur(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,sourceLineHint:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}function dr(e,t){return e.propLocalToPublicName.get(t)??t}function Xt(e,t,n=t){e.propLocalToPublicName.set(n,t)}function fr(e,t){return e.props.get(dr(e,t))}function mt(e,t){return fr(e,t)?.type}var hr={"prop-unknown-type":"sveld/prop-unknown-type","context-any-type":"sveld/context-any-type","slot-missing-type":"sveld/slot-missing-type","event-no-source":"sveld/event-no-source","dispatch-escapes":"sveld/dispatch-escapes","example-compile-error":"sveld/example-compile-error","example-syntax-error":"sveld/example-syntax-error","syntax-skipped":"sveld/syntax-skipped","type-syntax-error":"sveld/type-syntax-error","rest-props-unresolved":"sveld/rest-props-unresolved","context-duplicate-key":"sveld/context-duplicate-key","context-key-unresolved":"sveld/context-key-unresolved","context-value-unresolved":"sveld/context-value-unresolved","spread-unresolved":"sveld/spread-unresolved","export-unresolved":"sveld/export-unresolved","module-export-conflict":"sveld/module-export-conflict","extend-props-target-missing":"sveld/extend-props-target-missing","extend-props-duplicate":"sveld/extend-props-duplicate","extend-props-override":"sveld/extend-props-override","jsdoc-unknown-tag":"sveld/jsdoc-unknown-tag","typedef-duplicate":"sveld/typedef-duplicate","property-duplicate":"sveld/property-duplicate","generics-conflict":"sveld/generics-conflict","event-description-ambiguous":"sveld/event-description-ambiguous","jsdoc-tag-dropped":"sveld/jsdoc-tag-dropped","internal-typedef-referenced":"sveld/internal-typedef-referenced","cross-file-unresolved":"sveld/cross-file-unresolved","export-ambiguous":"sveld/export-ambiguous"},Hc={"prop-unknown-type":"warning","context-any-type":"warning","slot-missing-type":"warning","event-no-source":"warning","dispatch-escapes":"warning","example-compile-error":"error","example-syntax-error":"error","syntax-skipped":"error","type-syntax-error":"error","rest-props-unresolved":"warning","context-duplicate-key":"warning","context-key-unresolved":"warning","context-value-unresolved":"warning","spread-unresolved":"warning","export-unresolved":"warning","module-export-conflict":"warning","extend-props-target-missing":"error","extend-props-duplicate":"warning","extend-props-override":"warning","jsdoc-unknown-tag":"warning","typedef-duplicate":"warning","property-duplicate":"warning","generics-conflict":"warning","event-description-ambiguous":"warning","jsdoc-tag-dropped":"warning","internal-typedef-referenced":"error","cross-file-unresolved":"warning","export-ambiguous":"warning"};function Yt(e){return{...e,code:hr[e.kind],severity:Hc[e.kind]}}function P(e,t,n,r,i){e.diagnosticRecords.push(mr(e,t,n,r,i))}function mr(e,t,n,r,i){return Yt({component:e.componentFilePath,kind:t,name:n,message:r,...i?{source:i}:{},...gr(e,t,n)?{ignored:!0}:{}})}function Rs(e,t){return`${e}:${t}`}function me(e,t,n,r){if(!r||r.length===0)return;let i=Rs(t,n),o=e.sveldIgnoreDirectives.get(i)??new Set;for(let a of r)o.add(a);e.sveldIgnoreDirectives.set(i,o)}function gr(e,t,n){let r=e.sveldIgnoreDirectives.get(Rs(t,n));if(!r)return!1;return r.has("")||r.has(hr[t])}var yr="/**",Ms="*",Qt="*/",Gc="```",br=/^\s+/,js=/\s/,zc=/^@[^\s/]+(?=\s|$)/,Wc=/^@(\S+)\s*/,Uc=new Set(["extends","extendProps","generics","template","typedef"]);function gt(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!js.test(e[t]))break;t++}return t}function Jc(e,t){let n=e.slice(gt(e)),r=!1;if(t)n=n.slice(yr.length),r=!0;else if(n.startsWith(Ms)&&!n.startsWith(Qt))n=n.slice(Ms.length),r=!0;let i=n.slice(0,gt(n));n=n.slice(i.length);let o=n.trimEnd(),a=o.endsWith(Qt)?o.slice(0,-Qt.length).trimEnd():n;return{indent:r?i.slice(1):i,content:a}}function Kc(e,t,n){let r=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,r)}function Xc(e){let t=[],n=0;while(!0){let r=e.indexOf(yr,n);if(r===-1)break;let i=e.lastIndexOf(`
2
+ `,r-1)+1;if(e.charCodeAt(r+yr.length)===42||e.slice(i,r).trim()!==""){n=r+1;continue}let o=[],a=i,s=!1,p=0;while(a<=e.length){let l=e.indexOf(`
3
+ `,a),c=l===-1?e.length:l,d=Kc(e,a,c),{indent:f,content:h}=Jc(d,o.length===0);o.push({raw:d,start:a,number:o.length,indent:f,content:h});let g=d.trimEnd();if(g.endsWith(Qt)){s=!0,p=a+g.length,n=c;break}if(l===-1)break;a=l+1}if(!s)break;t.push({start:r,end:p,lines:o})}return t}function Yc(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function Qc(e){let t=[[]],n=!1;for(let r of e){if(zc.test(r.content)&&!n)t.push([r]);else t[t.length-1].push(r);if(yt(r.content))n=!n}return t}function yt(e){return Zc(e,Gc)%2===1}function Zc(e,t){let n=0,r=e.indexOf(t);while(r!==-1)n++,r=e.indexOf(t,r+t.length);return n}function qs(e){return e.map((t)=>t.indent+t.content).join(`
4
+ `)}function eu(e,t){let n=t;while(n<e.length-1&&e[n].content.trim()==="")n++;if(e[n].content[0]!=="{")return null;let r=e.slice(n).map((l)=>l.content).join(`
5
+ `),i=Qe(r,0);if(i===-1)return null;let o=[],a=i+1;for(let l=n;a>0;l++){let c=e[l].content.length;o.push(Math.min(a,c)),a-=c+1}let s=n+o.length-1;return{type:o.map((l,c)=>{let d=n+c,f=e[d].content.slice(0,l);if(e[d].content=e[d].content.slice(l).replace(br,""),d>0)e[d].continuesType=!0;return c===0?f:e[d].indent+f}).join(`
6
+ `).slice(1,-1),endIndex:s}}function tu(e){let t=e.content.match(br)?.[0]??"",n=e.content.slice(t.length),r=0,i=0;for(let l of n){if(r===0&&js.test(l))break;if(l==="[")r++;if(l==="]")r--;i++}let o=r===0?n.slice(0,i):"";if(!o)return null;let a=o,s=!1,p;if(o.startsWith("[")&&o.endsWith("]")){s=!0;let c=o.slice(1,-1).split("=");if(a=c[0].trim(),c.length>1)p=c.slice(1).join("=").trim();if(!a)return null}if(a.length>1&&(a[0]==='"'||a[0]==="'")&&a[a.length-1]===a[0])a=a.slice(1,-1);return e.content=n.slice(i).replace(br,""),{name:a,optional:s,default:p}}function nu(e){let t=e[0],n=t.content.match(Wc),r=n?n[1]:"",i=n?t.content.slice(n[0].length):t.content,o=i.trimEnd(),a=e.slice(1).map((h)=>h.indent+h.content),s=(o?[o,...a]:a).join(`
7
+ `);t.content=i,t.tag=r;let p=eu(e,0),l=p?.type??"",c=p?.endIndex??0;if(Uc.has(r))while(c<e.length-1&&e[c].content.trim()==="")c++;let d=tu(e[c]),f=qs(e.slice(c));return{tag:r,name:d?.name??"",type:l,optional:d?.optional??!1,default:d?.default,description:f,text:s,lines:e}}function ru(e,t,n){let r=Yc(e);r.forEach((a,s)=>{a.number=s});let i=Qc(r),o=i.slice(1).map(nu);return{description:qs(i[0]),tags:o,start:t,end:n,lines:r}}function Zt(e){return Xc(e).map(({start:t,end:n,lines:r})=>ru(r,t,n))}var iu=/\*\//g;function ye(e){return e.replace(iu,"*\\/")}function Ae(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}function X(e){return e===void 0||e===""?void 0:e}var su=new Intl.Collator("en");function be(e,t){return su.compare(e,t)}var ou=/\s/;function xr(e,t,n){let r=t;while(r<n){let i=e[r];if(i==="/"&&e[r+1]==="/"){let o=e.indexOf(`
8
+ `,r+2);if(o===-1||o>=n)return!0;r=o+1}else if(i==="/"&&e[r+1]==="*"&&e[r+2]!=="*"){let o=e.indexOf("*/",r+2);if(o===-1||o+2>n)return!1;r=o+2}else if(i===" "||i===`
9
+ `||i==="\t"||i==="\r"||ou.test(i))r++;else return!1}return!0}var au=/^-\s*/;function en(e){let t=[],n,r=!1;for(let i of e){let o=yt(i);if(n!==void 0){if(o)t.push(i.trim()),n=void 0;else t.push(i.slice(Math.min(n,gt(i))).trimEnd());continue}let a=i.trim();if(a===""){r=t.length>0;continue}if(r)t.push("");if(r=!1,t.push(a),o)n=gt(i)}return t.join(`
10
+ `).trimEnd()}function xe(e){if(e===void 0)return;let t=e.replace(au,"").trim();return t===""?"":t}function Os(e){let t=e.name?`${e.name} ${e.description}`:e.description;return xe(en(t.split(`
11
+ `)))}function vr(e){let t=0;while(e[t+1]?.continuesType)t++;return t}var tn=new Set(["since","example","see"]),Er=new Set(["bindable","default","required"]);function pu(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function nn(e){let t=e.trim();return t===""?!0:t}function lu(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}function De(e){if(e==="*")return"any";return e.trim()}var cu=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function Tr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Zt(t),e.parsedJsDocByText.set(t,n);return n}function Sr(e){let t=e[0]?.tags??[],n,r=[],i,o,a,s=!1,p=[],l=[],c=[];for(let d of t)if(d.tag==="type")n=d;else if(d.tag==="param")r.push(d);else if(d.tag==="returns"||d.tag==="return")i=d;else if(d.tag==="deprecated")a??=nn(d.text);else if(d.tag==="ignore"||d.tag==="internal")s=!0;else if(d.tag==="sveld-ignore")c.push(d.name);else if(tn.has(d.tag))l.push(d);else if(d.tag==="bindable"){if(d.type)continue;let f=`${d.name}${d.description?` ${d.description}`:""}`.trim();if(f==="readonly"||f==="writable")o??=f}else if(!cu.has(d.tag))p.push(d);return{type:n,param:r,returns:i,binding:o,deprecated:a,internal:s,additional:p,passthrough:l,ignore:c,description:e[0]?.description}}function uu(e,t){if(typeof t.start!=="number"||typeof t.end!=="number")return;let n=e.jsDocBlocksByStart.get(t.start);if(n===void 0||n.end!==t.end)return;return[n]}function du(e){if(!e||e.length===0)return;let t=e[e.length-1];return t&&typeof t==="object"&&"value"in t?t:void 0}function Fs(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let r=t.length-1;r>=0;r--){let i=t[r];if(!i||typeof i!=="object"||!("value"in i)||!("end"in i))continue;if(typeof i.end!=="number"||!("start"in i)||typeof i.start!=="number")continue;if("type"in i&&i.type==="Line"||!String(i.value).startsWith("*"))continue;if(xr(e.source,i.end,n))return i}return}function Vs(e){let t=new Set,n=(i)=>{let{leadingComments:o,start:a}=i,s=Fs(e,o,a);if(s)t.add(s.start)};for(let i of e.funcDecls.values())n(i);let r=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:i,isModule:o}of r)for(let a of i?.content.body??[]){let s=a.type==="ExportNamedDeclaration",p=a.type==="ExportNamedDeclaration"?a.declaration:a;if(p?.type==="FunctionDeclaration"){if(s)n(a)}else if(p?.type==="ClassDeclaration"&&o){n(s?a:p);for(let l of p.body.body)if(l.type==="MethodDefinition")n(l)}else if(p?.type==="VariableDeclaration"&&(o||!s||p.kind==="const")&&p.declarations.length===1&&fu.has(p.declarations[0].init?.type??""))n(a)}return t}var fu=new Set(["ArrowFunctionExpression","FunctionExpression"]);function V(e,t){if(!t?.leadingComments)return;let n=Fs(e,t.leadingComments,t.start);if(!n)return;return gu(e,[n])}function kr(e,t){if(!t?.leadingComments)return;return V(e,t)}function hu(e,t,n){let r=e;if(t)r=`${e} extends ${t}`;if(n)r+=` = ${n}`;return r}var mu=/^[^\s,]+/,Bs=/^\s*,\s*([^\s,]+)/;function Cr(e,t){let n=e.optional?e.name:mu.exec(e.name)?.[0];if(!n)return[];let r=[{name:n,constraint:hu(n,t,e.default)}],i=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let o=Bs.exec(i);o;o=Bs.exec(i))r.push({name:o[1],constraint:o[1]}),i=i.slice(o[0].length);return r}function gu(e,t){if(!t)return;let n=du(t);if(!n)return;let r=uu(e,n)??Tr(e,lu(n.value)),{type:i,param:o,returns:a,binding:s,deprecated:p,internal:l,additional:c,passthrough:d,ignore:f,description:h}=Sr(r),g,m,y,T;if(i)g=De(i.type);if(o.length>0)m=o.filter((L)=>!L.name.includes(".")).map((L)=>({name:L.name,type:De(L.type),description:xe(en(L.description.split(`
12
+ `))),optional:L.optional||!1}));if(a)y=De(a.type);let S,D=c;if(typeof n.start==="number"&&e.functionDocCommentStarts.has(n.start)){let L=c.filter((R)=>R.tag==="template"&&R.name);if(L.length>0)S=L.flatMap((R)=>Cr(R,De(R.type))).map(({constraint:R})=>R).join(", "),D=c.filter((R)=>R.tag!=="template")}let b=X(h?.trim());if(b||D.length>0){let L=[];if(b)L.push(b);for(let R of D)L.push(`@${R.tag}${R.text?` ${R.text}`:""}`);T=L.join(`
13
+ `)}return{type:g,params:m,returnType:y,description:T,binding:s,deprecated:p,tags:pu(d),sveldIgnore:f.length>0?f:void 0,internal:l,typeParameters:S}}function yu(e,t,n,r,i){for(let o of e){if(o.type!=="Block"||o.start<n||o.end>r)continue;i.push({start:o.start,end:o.end,isJsDoc:o.end-o.start>4&&t.startsWith("/**",o.start)})}}function Hs(e,t,n){if(!e||typeof e!=="object"||!("type"in e))return;let r=e;if(r.type==="FunctionDeclaration"){if(r.id?.type==="Identifier"&&r.id.name)n.push({name:r.id.name,start:t});return}if(r.type==="VariableDeclaration"){for(let i of r.declarations??[])if(i?.id?.type==="Identifier"&&i.id.name)n.push({name:i.id.name,start:t})}}function bu(e){let t=[];for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;let r=n;if(r.start===void 0)continue;if(r.type==="ExportNamedDeclaration"&&r.declaration)Hs(r.declaration,r.start,t);else Hs(r,r.start,t)}return t}function xu(e,t,n){let r=0,i=e.length;while(r<i){let o=r+i>>>1;if(e[o].end<=t)r=o+1;else i=o}for(let o=r-1;o>=0;o--){let a=e[o];if(!a.isJsDoc)continue;return xr(n,a.end,t)?a:void 0}return}function vu(e){let t=new Map;if(!e.source)return t;let n=[e.parsed?.module,e.parsed?.instance],r=[],i=[],o=e.parsed?.comments??[];for(let a of n){let s=a?.content;if(!s)continue;yu(o,e.source,s.start,s.end,r),i.push(...bu(s.body))}r.sort((a,s)=>a.end-s.end);for(let a of i){let s=xu(r,a.start,e.source);if(!s)continue;let p=Tr(e,e.source.slice(s.start,s.end)),{type:l,description:c,ignore:d,internal:f}=Sr(p);if(d.length>0)me(e,"context-any-type",a.name,d);if(!l&&!c&&!f)continue;t.set(a.name,{type:l?De(l.type):void 0,description:c||l&&Os(l),internal:f||void 0})}return t}function Gs(e,t){if(!e.variableInfoCacheBuilt)e.variableInfoCache=vu(e),e.variableInfoCacheBuilt=!0;return e.variableInfoCache.get(t)}function Ne(e,t){let n=fr(e,t);if(n?.type)return{type:n.type,description:n.description,internal:n.internal};let r=Gs(e,t),i=e.explicitVariableTypesByName.get(t);if(i)return{type:i,description:r?.description,internal:r?.internal};if(!r?.type)return null;return{type:r.type,description:r.description,internal:r.internal}}function zs(e,t){let n=Gs(e,t);return{...n?.description?{description:n.description}:{},...n?.internal?{internal:!0}:{}}}function $e(e,t){for(let r of e.vars)if(r.declarations.some((o)=>o.id&&typeof o.id==="object"&&("type"in o.id)&&o.id.type==="Identifier"&&("name"in o.id)&&o.id.name===t))return V(e,r);let n=e.funcDecls.get(t);if(n)return V(e,n);return}var Eu=/\w/;function Tu(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let r=z(n.slice(1,-1),";,").map((i)=>i.trim());for(let i of r){if(!i.startsWith(t))continue;let o=i.slice(t.length);if(o.length>0&&Eu.test(o[0]))continue;let a=o.trimStart();if(a.startsWith("?"))a=a.slice(1).trimStart();if(a.startsWith(":"))return a.slice(1).trim()}return}function rn(e,t){let n=t;if(n.computed||n.object?.type!=="Identifier"||n.property?.type!=="Identifier")return;let r=n.object.name,i=n.property.name;if(!r||!i)return;if(e.wholePropsLocals.has(r))return mt(e,i);let o=mt(e,r)??Ne(e,r)?.type;if(!o)return;return Tu(o,i)}var Su=/(?:_|[^\p{ID_Continue}$])+/u,ku=/^[\p{ID_Start}$]/u;function sn(e){let r=`${e.split(Su).map((i)=>i.charAt(0).toUpperCase()+i.slice(1)).join("")}Context`;return ku.test(r)?r:`_${r}`}var Cu=/^\{([\s\S]*)\}$/,wu=/^[A-Za-z_$][\w$]*$/;function ve(e){let t=e.trim(),n=Cu.exec(t);if(!n)return null;let r=n[1].trim();if(r==="")return[];let i=[];for(let o of z(r,";,")){let a=o.trim();if(!a)continue;let s=Kt(a,":");if(s===-1)return null;let p=a.slice(0,s).trim(),l=a.slice(s+1).trim();if(!l)return null;let c=!1;if(p.endsWith("?"))c=!0,p=p.slice(0,-1).trim();if(!wu.test(p))return null;i.push({name:p,type:l,optional:c})}return i}var on=/[\r\n]+/g;function Pu(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let n=e.source.indexOf(`
14
+ `);while(n!==-1)t.push(n+1),n=e.source.indexOf(`
15
+ `,n+1)}return e.sourceLineStartOffsetsCache=t,t}function Ws(e,t){if(!e.source||t<0||t>e.source.length)return;let n=Pu(e),r=e.sourceLineHint;if(r!==void 0)for(let a=r;a<=r+1&&a<n.length;a++){let s=n[a],p=n[a+1]??Number.POSITIVE_INFINITY;if(t>=s&&t<p)return e.sourceLineHint=a,{line:a+1,column:t-s}}let i=0,o=n.length-1;while(i<=o){let a=i+o>>>1,s=n[a],p=n[a+1]??Number.POSITIVE_INFINITY;if(t<s)o=a-1;else if(t>=p)i=a+1;else return e.sourceLineHint=a,{line:a+1,column:t-s}}return}function an(e,t,n){if(t===void 0||n===void 0||n<t)return;let r=Ws(e,t),i=Ws(e,n);if(!r||!i)return;return{start:r,end:i}}function C(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;return an(e,n,r)}function Y(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let p=n[n.length-1];if(p.tag!==void 0||!p.raw.trim().endsWith("*/"))break;n.pop()}let r=n[0],i=r.raw.indexOf(`@${r.tag??""}`),o=r.start+Math.max(i,0),a=n[n.length-1],s=a.start+a.raw.length;return an(e,o,s)}function N(e,t,n){return e.source?.slice(t,n)}function Q(e,t){if(!t||typeof t!=="object")return;let n="start"in t&&typeof t.start==="number"?t.start:void 0,r="end"in t&&typeof t.end==="number"?t.end:void 0;if(n===void 0||r===void 0)return;return N(e,n,r)?.replace(on," ")}function pn(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function Ks(e,t,n){return pn(e,t)?.props.get(n)}function Xs(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"right"in e&&e.right&&typeof e.right==="object"&&"name"in e.right&&typeof e.right.name==="string")return e.right.name;return}function Ys(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"left"in e&&e.left&&typeof e.left==="object")return Ys(e.left);return}function Ee(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return N(e,n+1,r)?.trim()}function Oe(e,t){let n=t?.start,r=t?.end;if(n===void 0||r===void 0)return;return N(e,n,r)?.trim()}function Z(e,t,n,r,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":for(let o of t.extends??[])Us(e,o.expression,o.typeParameters?.params,n,r,i);Js(e,t.body.body,n,r,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Z(e,t.typeAnnotation,n,r,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Z(e,o,n,r,i);return;case"TSTypeLiteral":Js(e,t.members,n,r,i);return;case"TSTypeReference":Us(e,t.typeName,t.typeArguments?.params,n,r,i);return;case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o in t){let a=t[o];if(!a||typeof a!=="object")continue;if(Array.isArray(a)){for(let s of a){if(!s||typeof s!=="object"||!("type"in s))continue;Z(e,s,n,r,i)}continue}if("type"in a)Z(e,a,n,r,i)}}function Au(e,t){let n=new Map;for(let r of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(r),o=i?void 0:e.valueImportBindingsByLocalName.get(r),a=i??(o?{importedName:o.importedName,localName:o.localName,source:o.source,specifierType:"named"}:void 0);if(!a)continue;let s=n.get(a.source)??{default:[],named:[],namespace:[]};if(a.specifierType==="default")s.default.push(a.localName);else if(a.specifierType==="namespace")s.namespace.push(a.localName);else s.named.push({imported:a.importedName,local:a.localName});n.set(a.source,s)}return Array.from(n.entries()).sort(([r],[i])=>be(r,i)).map(([r,i])=>{if(i.namespace.length>0)return i.namespace.map((p)=>`import type * as ${p} from "${r}";`).join(`
16
+ `);let o=i.named.map(({imported:p,local:l})=>{if(!p||p===l)return l;return`${p} as ${l}`}),a=i.default[0],s=o.length>0?`{ ${o.join(", ")} }`:"";if(a&&s)return`import type ${a}, ${s} from "${r}";`;if(a)return`import type ${a} from "${r}";`;return`import type ${s} from "${r}";`})}function Us(e,t,n,r,i,o){let a=Ys(t);if(a){if(e.typeImportBindingsByLocalName.has(a)||e.valueImportBindingsByLocalName.has(a))r.add(a);let s=e.localTypeDeclarationsByName.get(a);if(s&&!o.has(a))i.add(a),o.add(a),Z(e,s.node,r,i,o),o.delete(a)}for(let s of n??[])Z(e,s,r,i,o)}function Js(e,t,n,r,i){for(let o of t){if(o.type!=="TSPropertySignature")continue;Z(e,o.typeAnnotation?.typeAnnotation,n,r,i)}}function F(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function Du(e){if(!e.const)return;let t=e.id.name,n=[];for(let r of e.members){let i=r.initializer;if(i?.type!=="Literal")return;let o=i.value;if(typeof o==="string")n.push(JSON.stringify(o));else if(typeof o==="number")n.push(String(o));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function Qs(e,t){let n=Du(t);if(n)return n;let r=N(e,t.start,t.end)?.trim();return r?`declare ${r}`:void 0}function wr(e,t){let n=[];for(let r of t.params){let i=r.type==="TSParameterProperty"?r.parameter:r;if(i.type==="RestElement"){F(e,i.typeAnnotation?.typeAnnotation),n.push({name:i.argument.type==="Identifier"?i.argument.name:"rest",type:Ee(e,i.typeAnnotation),optional:!1,rest:!0});continue}let o=i.type==="AssignmentPattern",a=o?i.left:i,s="typeAnnotation"in a?a.typeAnnotation:void 0;F(e,s?.typeAnnotation),n.push({name:a.type==="Identifier"?a.name:"arg",type:Ee(e,s),optional:o||"optional"in i&&i.optional===!0,rest:!1})}F(e,t.returnType?.typeAnnotation);for(let r of t.typeParameters?.params??[])F(e,r.constraint),F(e,r.default);return{params:n,returnType:Ee(e,t.returnType),typeParameters:Oe(e,t.typeParameters)||void 0}}function Zs(e,t){let{params:n,returnType:r,typeParameters:i}=wr(e,t),o=n.map(({name:s,type:p,optional:l,rest:c})=>c?`...${s}: ${p??"any[]"}`:`${s}${l?"?":""}: ${p??"any"}`),a=r!==void 0||i!==void 0||n.some((s)=>s.type!==void 0);return{signature:`${i??""}(${o.join(", ")}) => ${r??"any"}`,hasAnnotations:a}}function eo(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,n=e.pendingConstDefaultCandidates.length>0?e.pendingConstDefaultCandidates.slice():void 0,r=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,i=e.pendingDispatchEscapeCandidates.length>0?e.pendingDispatchEscapeCandidates.slice():void 0;if(!t&&!n&&!r&&!i)return;let o=e.deferredEventNoSourceDiagnostics.length>0?e.deferredEventNoSourceDiagnostics.slice():void 0,a=i&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0;return{...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...r?{pendingContextKeyCandidates:r}:{},...i?{pendingDispatchEscapeCandidates:i}:{},...o?{deferredEventNoSourceDiagnostics:o}:{},...a?{untypedJsDocEventNames:a}:{}}}function to(e){let t=new Set,n=new Set;for(let p of e.additionalTypeDependencyNodes)Z(e,p,t,n);let r=Array.from(e.localTypeDeclarationsByName.values()).filter((p)=>p.exported).sort((p,l)=>p.start-l.start);for(let p of r)Z(e,p.node,t,n);let i=r.map((p)=>`export ${p.code}`),o=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,a=o?.canonicalType;if(o&&a){for(let p of o.referencedImportedTypes)t.add(p);for(let p of o.referencedLocalTypes)n.add(p)}if(!a&&t.size===0&&n.size===0&&i.length===0)return;let s=Array.from(n).map((p)=>e.localTypeDeclarationsByName.get(p)).filter((p)=>p!==void 0&&!p.exported).sort((p,l)=>p.start-l.start).map((p)=>p.code);return{...a?{canonicalPropsType:a}:{},canonicalPropNames:o&&a?Array.from(o.props.keys()).sort():[],localTypeDeclarations:s,...i.length>0?{moduleTypeDeclarations:i}:{},typeImportStatements:Au(e,t)}}function bt(e,t){let n=t.source.value;if(typeof n!=="string"||t.importKind==="type")return;for(let r of t.specifiers){if(r.type!=="ImportSpecifier"||r.importKind==="type")continue;let i=r.local.name;if(!i)continue;let{imported:o}=r,a=o.type==="Identifier"?o.name:typeof o.value==="string"?o.value:i;e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:a,source:n})}}function xt(e){return[e.importedName,...e.members??[]].join(".")}function Pr(e,t){let n=[],r=t;while(r.type==="MemberExpression"){if(r.computed||!_(r.property))return;n.unshift(r.property.name),r=r.object}if(!_(r))return;let i=r.name,o=(s,p,l)=>l.length>0?{source:s,importedName:p,members:l}:{source:s,importedName:p},a=e.valueImportBindingsByLocalName.get(i);if(a)return o(a.source,a.importedName,n);for(let s of[e.parsed?.instance,e.parsed?.module])for(let p of s?.content.body??[]){if(p.type!=="ImportDeclaration")continue;let l=p,c=l.source.value;if(l.importKind==="type"||typeof c!=="string")continue;let d=l.specifiers.find((f)=>f.local.name===i);if(d?.type==="ImportDefaultSpecifier")return o(c,"default",n);if(d?.type==="ImportNamespaceSpecifier"&&n.length>0)return o(c,n[0],n.slice(1))}return}function ln(e,t){if(!Xe(t))return;return Pr(e,t)}function no(e){let t=new Map;for(let n of e.content.body){if(n.type!=="ImportDeclaration")continue;let r=n;if(r.importKind==="type")continue;let i=r.source.value;if(typeof i!=="string")continue;for(let o of r.specifiers){let a=o.local.name;if(!a||o.type==="ImportSpecifier"&&o.importKind==="type")continue;let s;if(o.type==="ImportDefaultSpecifier")s="default";else if(o.type==="ImportNamespaceSpecifier")s="*";else if(o.imported.type==="Identifier")s=o.imported.name;else s=String(o.imported.value??a);t.set(a,{from:i,imported:s})}}return t}function Ar(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){bt(e,n);continue}let r=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(r.type==="FunctionDeclaration"&&r.id?.name)e.funcDecls.set(r.id.name,r)}}function Ze(e,t,n){if(X(t)===void 0)return;if(Xt(e,t),e.props.has(t)){let r=e.props.get(t);e.props.set(t,{...r,...n})}else e.props.set(t,n)}function cn(e,t,n,r){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:r,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:r,...t.pendingConstDefault})}var Nu=/[^\S\r\n]*[\r\n]\s*/g;function Te(e,t,n=0){let r,i,o=!1;if(!t||typeof t!=="object"||!("type"in t))return{value:r,type:i,isFunction:o};let a=so(e,t);if(t.type==="ObjectExpression"||t.type==="BinaryExpression"||t.type==="ArrayExpression"||t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end)?.replace(on," ");if(o=t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression",t.type==="BinaryExpression")i=te(e,t,n);else if(t.type==="ObjectExpression"||t.type==="ArrayExpression"){let{start:p,end:l}=s;i=Dr(t)?_u(e,p,l,r):void 0}if(t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression")i=ao(t),r=io(e,t)}else if(t.type==="UnaryExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);i=te(e,s,n)}else if(t.type==="LogicalExpression"||t.type==="ConditionalExpression"||t.type==="SequenceExpression"){let{start:s,end:p}=t,l=s===void 0||p===void 0?void 0:N(e,s,p)?.replace(Nu," ");r=l!==void 0&&t.type==="SequenceExpression"?`(${l})`:l,i=te(e,t,n)}else if(t.type==="NewExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);if(s.callee&&typeof s.callee==="object"&&"type"in s.callee&&s.callee.type==="Identifier"){let p=s.callee.name;if(p==="Date")i="Date";else if(p==="Map")i="Map<any, any>";else if(p==="Set")i="Set<any>";else if(p==="WeakMap")i="WeakMap<object, any>";else if(p==="WeakSet")i="WeakSet<object>";else if(p==="Array")i="any[]";else if(p==="RegExp"||p==="Regexp")i="RegExp";else if(p==="Error")i="Error";else i=p}}else if(t.type==="CallExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);let p=s.callee,l=p&&typeof p==="object"&&"type"in p&&p.type==="Identifier"?p.name:void 0;if((l==="$derived"||l==="$state")&&s.arguments.length===1&&n<5)return{...Te(e,s.arguments[0],n+1),value:r,defaultValue:a};if(l){let c=Ru(e,l);if(c)return{value:r,type:void 0,isFunction:!1,defaultValue:a,resolvedType:c};if(e.funcDecls.has(l)||Mu(e,l))return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l}};let d=e.valueImportBindingsByLocalName.get(l);if(d)return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l,importSource:d.source,importedName:d.importedName}}}return{value:r,type:void 0,isFunction:!1,defaultValue:a,pendingCallDefault:{calleeName:l??Iu(e,p)}}}else if(t.type==="Identifier"){let s=t;if(n<5){let l=dn(e,s.name);if(l){let c=Te(e,l,n+1),d=$e(e,s.name);return{...c,resolvedType:d?.type??c.resolvedType,resolvedDescription:d?.description??c.resolvedDescription,resolvedParams:d?.params??c.resolvedParams,resolvedReturnType:d?.returnType??c.resolvedReturnType}}if(e.funcDecls.has(s.name)){let c=$e(e,s.name),d=e.funcDecls.get(s.name);return{value:d?io(e,d):void 0,type:void 0,isFunction:!0,defaultValue:d?so(e,d):void 0,resolvedType:c?.type??Bu(c,d),resolvedDescription:c?.description,resolvedParams:c?.params,resolvedReturnType:c?.returnType}}}if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);let p=e.valueImportBindingsByLocalName.get(s.name);if(p)return{value:r,type:i,isFunction:o,defaultValue:a,pendingConstDefault:{importSource:p.source,importedName:p.importedName}}}else if(t.type==="MemberExpression"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);if(Wu(t))i="number";let p=ln(e,t);if(p)return{value:r,type:i,isFunction:o,defaultValue:a,pendingConstDefault:{importSource:p.source,importedName:p.importedName,...p.members?{members:p.members}:{}}}}else if(t.type==="TemplateLiteral"){let s=t;if("start"in s&&"end"in s&&typeof s.start==="number"&&typeof s.end==="number")r=N(e,s.start,s.end);i="string"}else if("raw"in t&&typeof t.raw==="string")r=t.raw,i=vt(t);return{value:r,type:i,isFunction:o,defaultValue:a}}function vt(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var $u=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),Lu=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function te(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return;switch(t.type){case"UnaryExpression":{let r=t;if(r.operator==="!"||r.operator==="delete")return"boolean";if(r.operator==="typeof")return"string";if(r.operator==="void")return;if(r.operator==="+")return"number";return te(e,r.argument,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let r=t;if(Lu.has(r.operator))return"boolean";let i=te(e,r.left,n),o=te(e,r.right,n);if(i==="bigint"&&o==="bigint")return"bigint";if($u.has(r.operator))return"number";if(r.operator!=="+")return;if(i==="string"||o==="string")return"string";if(i==="number"&&o==="number")return"number";return}case"LogicalExpression":{let r=t;return ro([te(e,r.left,n),te(e,r.right,n)])}case"ConditionalExpression":{let r=t;return ro([te(e,r.consequent,n),te(e,r.alternate,n)])}case"SequenceExpression":{let r=t.expressions;return te(e,r[r.length-1],n)}case"Identifier":{let r=t.name;if(r==="NaN"||r==="Infinity")return"number";if(r==="undefined")return;let i=Ne(e,r)?.type;if(i)return i;if(n>=5)return;return te(e,dn(e,r),n+1)}default:{if(n>=5)return;let r=Te(e,t,n+1);return r.type??r.resolvedType}}}function ro(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function _u(e,t,n,r){if(r===void 0||t===void 0||n===void 0)return r;let i=e.parsed?.comments??[],o="",a=t;for(let s of i){if(s.start<t||s.end>n)continue;o+=N(e,a,s.start)??"",a=s.end}if(a===t)return r;return o+=N(e,a,n)??"",o.replace(on," ")}function Dr(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(e.type){case"Literal":return!(("regex"in e)&&e.regex);case"TemplateLiteral":return e.expressions.length===0;case"Identifier":return e.name==="undefined";case"UnaryExpression":{let t=e,n=t.argument;return t.operator==="-"&&n?.type==="Literal"&&(typeof n.value==="number"||typeof n.value==="bigint")}case"ArrayExpression":return e.elements.every((t)=>t!==null&&Dr(t));case"ObjectExpression":return e.properties.every((t)=>t.type==="Property"&&t.kind==="init"&&!t.computed&&!t.method&&!t.shorthand&&(t.key.type==="Identifier"||t.key.type==="Literal")&&Dr(t.value));default:return!1}}function un(e,t){let n=dn(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="CallExpression"){let r=n,i=Q(e,r.callee);if(i==="$state"||i==="$state.raw"||i==="$derived"){let o=r.typeArguments?.params[0];if(o)return F(e,o),Q(e,o);if(i==="$state.raw")return Te(e,r.arguments[0],1).type}}return Te(e,n).type}function dn(e,t){for(let n of e.vars)for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init;return}function et(e,t){for(let n of e.vars){if(n.kind!=="const")continue;for(let r of n.declarations)if(r.id&&typeof r.id==="object"&&"type"in r.id&&r.id.type==="Identifier"&&"name"in r.id&&r.id.name===t&&r.init)return r.init}return}function Iu(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return N(e,t.start,t.end)??"call";return"call"}function Ru(e,t){let n=$e(e,t);if(n?.returnType)return n.returnType;let r=e.funcDecls.get(t)??oo(e,t);if(!r)return;let i=qu(e,r);if(i)return i;let o=ju(e,t);if(o)return o;let a=po(r);return a==="any"?void 0:a}function Mu(e,t){return oo(e,t)!==void 0}function oo(e,t){let n=dn(e,t);if(!n||typeof n!=="object"||!("type"in n))return;if(n.type==="ArrowFunctionExpression"||n.type==="FunctionExpression")return n;return}function ju(e,t){for(let n of e.vars)for(let r of n.declarations){let i=r.id;if(!i||typeof i!=="object"||!("type"in i)||i.type!=="Identifier"||!("name"in i)||i.name!==t)continue;let o=i.typeAnnotation?.typeAnnotation;if(!o)return;return Is(N(e,o.start,o.end))}return}function qu(e,t){let n=t.returnType?.typeAnnotation;if(!n)return;return N(e,n.start,n.end)}function Bu(e,t){let n=e?.returnType??"any",r=e?.params;if(r&&r.length>0)return`(${Ae(r)}) => ${n}`;if(e?.returnType)return`() => ${n}`;if(t)return ao(t);return"(...args: any[]) => any"}function ao(e){return`(${Ou(e)}) => ${po(e)}`}function Ou(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let n=[];for(let r of t)if(r&&typeof r==="object"&&"type"in r&&r.type==="Identifier"&&"name"in r&&typeof r.name==="string")n.push(`${r.name}: any`);else return"...args: any[]";return n.join(", ")}function po(e){if(e.async||e.generator)return"any";let t=e.body,n;if(t&&typeof t==="object"&&"type"in t&&t.type==="BlockStatement"){if(n=Fu(t),n.length===0)return"any"}else n=[t];let r=null;for(let i of n){let o=Vu(i);if(!o)return"any";if(r===null)r=o;else if(r!==o)return"any"}return r??"any"}function Fu(e){let t=[];return Nr(e,t),t}function Nr(e,t){if(!e||typeof e!=="object")return;let n=e;if(typeof n.type!=="string")return;if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return;if(n.type==="ReturnStatement")t.push(n.argument??null);for(let r in n){if(r==="leadingComments")continue;let i=n[r];if(!i||typeof i!=="object")continue;if(Array.isArray(i))for(let o=0;o<i.length;o++)Nr(i[o],t);else Nr(i,t)}}function Vu(e){if(!e||typeof e!=="object"||!("type"in e))return null;switch(e.type){case"Literal":{let t=e.value;if(typeof t==="string")return"string";if(typeof t==="number")return"number";if(typeof t==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let t=e.callee;if(t&&typeof t==="object"&&"type"in t&&t.type==="Identifier"){let n=t.name;if(n==="String")return"string";if(n==="Number")return"number";if(n==="Boolean")return"boolean"}return null}default:return null}}function lo(e){if(he(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function Hu(e,t){let n=t.params;if(!Array.isArray(n)||n.length===0)return"";let r=n[0],i=n[n.length-1];if(typeof r.start!=="number"||typeof i.end!=="number")return"";return N(e,r.start,i.end)??""}function io(e,t){if(t.generator)return;let n=t.body;if(!n||typeof n!=="object"||!("type"in n))return;let r=Hu(e,t),i=t.async?"async ":"",o=(s,p)=>s&&typeof s==="object"&&("type"in s)&&s.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let s=Q(e,n);return s===void 0?void 0:`${i}(${r}) => ${o(n,s)}`}let a=n.body;if(a.length===0)return`${i}(${r}) => {}`;if(a.length===1){let s=a[0];if(s&&typeof s==="object"&&"type"in s&&s.type==="ReturnStatement"){let p=s.argument;if(p){let l=Q(e,p);if(l!==void 0)return`${i}(${r}) => ${o(p,l)}`}}}return}function so(e,t){let n=Q(e,t);if(!n||!t||typeof t!=="object"||!("type"in t))return;let r="expression";if(t.type==="Literal"||t.type==="UnaryExpression")r="literal";else if(t.type==="TemplateLiteral")r=t.expressions.length===0?"literal":"expression";else if(t.type==="ArrayExpression")r="array";else if(t.type==="ObjectExpression")r="object";else if(t.type==="ArrowFunctionExpression"||t.type==="FunctionExpression"||t.type==="FunctionDeclaration")r="function";let i={raw:n,kind:r};if(r==="literal"||r==="array"||r==="object"){let o=$r(t);if(o.ok)i.value=o.value}return i}function $r(e){if(!e||typeof e!=="object"||!("type"in e))return{ok:!1};if(e.type==="Literal"){let t=e.value;return typeof t==="bigint"||"regex"in e?{ok:!1}:{ok:!0,value:t}}if(e.type==="UnaryExpression"){let t=e,n=t.argument;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="Literal")return{ok:!1};let r=n.value;if(typeof r==="number"){if(t.operator==="-")return{ok:!0,value:-r};if(t.operator==="+")return{ok:!0,value:r}}if(typeof r==="boolean"&&t.operator==="!")return{ok:!0,value:!r};return{ok:!1}}if(e.type==="TemplateLiteral"){let t=e;if(t.expressions.length>0||t.quasis.length!==1)return{ok:!1};return{ok:!0,value:t.quasis[0].value.cooked??t.quasis[0].value.raw}}if(e.type==="ArrayExpression"){let t=e,n=[];for(let r of t.elements){if(!r)return{ok:!1};let i=$r(r);if(!i.ok)return{ok:!1};n.push(i.value)}return{ok:!0,value:n}}if(e.type==="ObjectExpression"){let t=e,n={};for(let r of t.properties){if(r.type!=="Property"||r.computed)return{ok:!1};let i=G(r.key);if(!i)return{ok:!1};let o=$r(r.value);if(!o.ok)return{ok:!1};n[i]=o.value}return{ok:!0,value:n}}return{ok:!1}}var Gu=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),zu=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function Wu(e){if(!e||typeof e!=="object"||!("type"in e))return!1;if(e.type!=="MemberExpression")return!1;let t=e,n=t.object&&"name"in t.object?t.object.name:void 0,r=t.property&&"name"in t.property?t.property.name:void 0;if(!n||!r)return!1;if(n==="Number")return Gu.has(r);if(n==="Math")return zu.has(r);return!1}function W(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function Et(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n]?.get(t);if(!r)continue;return r.kind==="prop"?r.publicPropName:void 0}return}function Tt(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let r=e.activeScopes[n];if(r===e.componentScope)return!1;if(r?.has(t))return!0}return!1}function fn(e,t){let n=t;while(Xe(n))n=n.object;return _(n)&&Tt(e,n.name)}function M(e,t=new Set){if(!e||typeof e!=="object"||!("type"in e))return t;switch(e.type){case"Identifier":t.add(e.name);break;case"AssignmentPattern":M(e.left,t);break;case"ArrayPattern":for(let n of e.elements)M(n??void 0,t);break;case"ObjectPattern":for(let n of e.properties)if(n.type==="Property")M(n.value,t);else if(n.type==="RestElement")M(n.argument,t);break;case"RestElement":M(e.argument,t);break}return t}function _r(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let r=Et(e,t.name);if(r)e.reactive_vars.add(r);return}let n=M(t);for(let r of n){let i=Et(e,r);if(i)e.reactive_vars.add(i)}}function St(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function co(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function Uu(e,t){let n=e.scopeDeclarations.get(t);if(!n)n=new Map,e.scopeDeclarations.set(t,n);return n}function Ju(e){let t=[];if(e.id.type==="Identifier")return t.push({kind:"local",name:e.id.name}),t;if(e.id.type!=="ObjectPattern")return t;for(let n of e.id.properties){if(n.type==="RestElement"){if(n.argument.type==="Identifier")t.push({kind:"local",name:n.argument.name});continue}if(n.computed)continue;let r=G(n.key);if(!r)continue;let i;if(n.value.type==="Identifier")i=n.value.name;else if(n.value.type==="AssignmentPattern"&&n.value.left.type==="Identifier")i=n.value.left.name;if(!i)continue;t.push({kind:"prop",name:i,publicPropName:r})}return t}function Lr(e,t,n,r){if(!$s(e))return;let i=r?.allowRunesProps??!1,o=r?.forceProp??!1,a=e;for(let s of a.declarations){if(i&&he(Pe(s.init),"$props")){for(let c of Ju(s))W(c.kind==="prop"?t:n,c.name,c.kind==="prop"?{kind:"prop",publicPropName:c.publicPropName}:{kind:"local"});continue}let p=a.kind==="var"?n:t,l=o?"prop":"local";for(let c of M(s.id))W(p,c,l==="prop"?{kind:"prop",publicPropName:c}:{kind:"local"})}}function Ku(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")W(t,e.id.name,{kind:"local"});for(let n of e.params){let r=n.type==="TSParameterProperty"?n.parameter:n;for(let i of M(r))W(t,i,{kind:"local"})}}function Xu(e,t,n){if(!Array.isArray(e))return;for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;switch(r.type){case"VariableDeclaration":Lr(r,t,n);break;case"FunctionDeclaration":if(r.id?.name)W(t,r.id.name,{kind:"local"});break;case"ClassDeclaration":if(r.id?.name)W(t,r.id.name,{kind:"local"});break}}}function Yu(e,t){for(let{local:n,exported:r}of t){if(n.type!=="Identifier")continue;let i=r.type==="Identifier"?r.name:String(r.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:i})}}function Qu(e,t){for(let n of t?.content.body??[])switch(n.type){case"ImportDeclaration":for(let r of n.specifiers)if(r.local.name)W(e.componentScope,r.local.name,{kind:"local"});break;case"VariableDeclaration":Lr(n,e.componentScope,e.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(n.id?.name)W(e.componentScope,n.id.name,{kind:"local"});break;case"ClassDeclaration":if(n.id?.name)W(e.componentScope,n.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!n.declaration){if(n.source==null)Yu(e,n.specifiers);break}if(n.declaration.type==="VariableDeclaration")Lr(n.declaration,e.componentScope,e.componentScope,{forceProp:!0});else if(n.declaration.type==="FunctionDeclaration"&&n.declaration.id?.name)W(e.componentScope,n.declaration.id.name,{kind:"prop",publicPropName:n.declaration.id.name});break}}function uo(e){e.componentScope.clear(),e.scopeDeclarations=new Map,e.activeScopes.length=0,Qu(e,e.parsed?.instance)}function fo(e){return{varScopeStack:[e.componentScope]}}function ho(e,t,n){if(!St(n))return;let r=Uu(e,n),i=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Ku(n,r);break;case"BlockStatement":Xu(n.body,r,i);break;case"CatchClause":for(let o of M(n.param))W(r,o,{kind:"local"});break;case"EachBlock":for(let o of M(n.context))W(r,o,{kind:"local"});if(typeof n.index==="string")W(r,n.index,{kind:"local"});break;case"AwaitBlock":for(let o of M(n.value))W(r,o,{kind:"local"});for(let o of M(n.error))W(r,o,{kind:"local"});break}if(co(n))t.varScopeStack.push(r);return r}function mo(e,t){if(co(t))e.varScopeStack.pop()}function Ir(e,t){let n=Ne(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))F(e,e.explicitVariableTypeNodesByName.get(t));return n}function hn(e,t,n=!0){let r=Ir(e,t);if(r||!n)return r;let i=un(e,t);return i?{type:i,...zs(e,t)}:null}function Zu(e,t,n){if(!_(t))return null;let r=et(e,t.name);if(ee(r))return To(e,r,n).properties;let i=hn(e,t.name);return i?ve(i.type):null}function ed(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&G(n.key)===t)}function go(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let r=t[n];if(!r||typeof r!=="object"||!("typeAnnotation"in r))return;return Q(e,r.typeAnnotation)}function td(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function nd(e,t,n,r,i){if(_(i)){let o=hn(e,i.name);if(o)return o;return P(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,C(e,r)),{type:"any"}}if(i?.type==="ArrowFunctionExpression"||i?.type==="FunctionExpression")return{type:`(${i.params.map((a)=>`${_(a)?a.name||"arg":"arg"}: any`).join(", ")}) => any`};if(Be(i))return{type:vt(i)??"null"};return{type:"any"}}function To(e,t,n){let r=[],i=!1;for(let o of t.properties){if(o.type==="SpreadElement"){let c=Zu(e,o.argument,n);if(c)r.push(...c);else i=!0,P(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,o));continue}if(o.type!=="Property")continue;let a=G(o.key);if(!a)continue;if(o.kind==="set"&&ed(t,a))continue;let s=o.kind==="get"||o.kind==="set"?o.value:void 0,p=s?o.kind==="get"?go(e,s,"returnType"):go(e,s.params[0],"typeAnnotation"):void 0,l=p?{type:p}:nd(e,n,a,o,o.kind==="get"?td(s):o.kind==="set"?void 0:o.value);r.push({name:a,type:l.type,description:l.description,optional:!1,...l.internal?{internal:!0}:{}})}return{properties:r,hasUnresolvedSpread:i}}function yo(e,t,n){let{properties:r,hasUnresolvedSpread:i}=To(e,t,n);return{key:n,typeName:sn(n),properties:r,description:void 0,...i?{hasUnresolvedSpread:i}:{}}}function bo(e,t,n){if(ee(t))return yo(e,t,n);else if(_(t)){let r=t.name,i=hn(e,r,!1),o=i?void 0:et(e,r);if(ee(o))return yo(e,o,n);let a=i??hn(e,r);if(a){let s=ve(a.type);return{key:n,typeName:sn(n),...s?{}:{type:a.type},properties:s??[],description:a.description,...a.internal?{internal:!0}:{}}}return P(e,"context-any-type",r,`Context "${n}" variable "${r}" has no type annotation; defaulted to "any".`,C(e,t)),{key:n,typeName:sn(n),type:"any",properties:[]}}return null}function xo(e){let t=e.callee;if(!t||typeof t!=="object"||!("type"in t))return null;let n=t.type==="Identifier"&&t.name==="Symbol",r=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!r)return null;let i=e.arguments[0];if(!i||typeof i!=="object"||!("type"in i))return"";if(i.type==="Literal"&&typeof i.value==="string")return i.value;if(i.type==="TemplateLiteral"&&i.quasis?.length===1)return i.quasis[0].value.cooked??"";return""}function vo(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function So(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let r=t;if(r.type==="Literal"||r.type==="TemplateLiteral"){let i=_s(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="CallExpression"||r.type==="NewExpression"){let i=xo(r);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(r.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let i=et(e,r.name);if(i&&typeof i==="object"&&"type"in i){let a=i;if((a.type==="CallExpression"||a.type==="NewExpression")&&xo(a)==="")return{kind:"resolved",key:r.name};return So(e,a,n+1)}let o=n===0&&Tt(e,r.name)?void 0:e.valueImportBindingsByLocalName.get(r.name);return o?vo(o):{kind:"unresolved"}}if(r.type==="MemberExpression"){let i=n===0&&fn(e,r)?void 0:ln(e,r);if(i)return vo(i)}return{kind:"unresolved"}}function Eo(e,t,n,r,i){let o=Q(e,r)??"";P(e,"context-value-unresolved",t,`setContext(${n}, ${o}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,i)}function ko(e,t){if(!t||typeof t!=="object"||!("type"in t)||t.type!=="CallExpression")return;let n=t,r=n.arguments[0];if(!r)return;let i=So(e,r);if(i.kind==="unresolved"||i.kind==="resolved"&&!i.key){let l=Q(e,r)??"";P(e,"context-key-unresolved",l,`setContext key \`${l}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,C(e,t));return}let o=n.arguments[1];if(!o)return;let a=C(e,t);if(i.kind==="pending"){let l=xt(i),c=bo(e,o,l);if(c)e.pendingContextKeyCandidates.push({importSource:i.importSource,importedName:i.importedName,...i.members?{members:i.members}:{},...c.type===void 0?{}:{type:c.type},properties:c.properties,description:c.description,...c.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...c.internal?{internal:!0}:{},source:a});else Eo(e,l,l,o,a);return}let s=i.key,p=bo(e,o,s);if(!p){Eo(e,s,JSON.stringify(s),o,a);return}if(e.contexts.has(s)){P(e,"context-duplicate-key",s,`setContext("${s}", ...) was called more than once; only the first call's shape is used.`,a);return}e.contexts.set(s,{...p,source:a})}var rd=new Set(["Component","SvelteComponent","SvelteSelf"]),id=new Set(["RegularElement","SvelteElement"]);function kt(e){return rd.has(e)}function Ct(e){return id.has(e)}var sd=/\n/g,od=/^[A-Za-z_$][\w$]*$/;function Rr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return Ir(e,n)?.type??un(e,n)}}}function wt(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(_(t)){if(!Tt(e,t.name))return n;let i=n??new Set;return i.add(t.name),i}let r=n;if(ee(t)){for(let i of t.properties)if(i.type==="Property")r=wt(e,i.value,r)}else if(t.type==="ArrayExpression")for(let i of t.elements)r=wt(e,i,r);return r}function Mr(e,t){if(_(t))return e.variableType(t.name);return ad(e,t)}function ad(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(ee(t))return wo(e,t);if(t.type==="ArrayExpression")return Po(e,t);return}function Co(e,t){if(!t||typeof t!=="object"||!("type"in t))return"any";if(_(t))return e.variableType(t.name)??"any";if(Be(t))return vt(t)??"null";if(ee(t))return wo(e,t);if(t.type==="ArrayExpression")return Po(e,t);return"any"}function wo(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],r=!1;for(let i of t.properties){let o=i.type==="Property"&&!i.computed?G(i.key):void 0;if(i.type!=="Property"||!o){r=!0;continue}n.push({name:o,type:Co(e,i.value)})}if(!r)return Pt(n);if(n.length===0)return"Record<string, any>";return Pt([...n,{name:"[key: string]",type:"any"}])}function Po(e,t){let n=new Set(t.elements.filter((r)=>r!=null).map((r)=>Co(e,r)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Ao(e,t){for(let[n,r]of e.arguments.entries()){if(_(r)&&r.name===t)return{argumentIndex:n};if(!ee(r))continue;for(let i of r.properties){if(i.type!=="Property"||!_(i.value))continue;if(i.value.name!==t)continue;let o=!i.computed&&_(i.key)?i.key.name:void 0;return{argumentIndex:n,property:o??""}}}return}function jr(e){return typeof e==="string"?JSON.stringify(e):String(e)}function Le(e,{name:t,detail:n,has_argument:r,description:i,deprecated:o,tags:a,internal:s,source:p}){if(t===void 0)return;let l=!r&&!n?"null":X(n),c=i,d=e.events.get(t);if(d?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:l,description:c||d.description,deprecated:o??d.deprecated,tags:a??d.tags,...s||d.internal?{internal:!0}:{},source:p||d.source});else if(d){let f=d.tags??a,h=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...d,detail:d.detail===void 0||h?l:d.detail,description:d.description||c,deprecated:d.deprecated??o,tags:f,...d.internal||s?{internal:!0}:{},source:p||d.source})}else e.events.set(t,{type:"dispatched",name:t,detail:l,description:c,deprecated:o,tags:a,...s?{internal:!0}:{},source:p})}function Do(e,t){let n=t.arguments[0],r=cr(n,"CustomEvent");if(!r&&!cr(n,"Event"))return;let i=n.arguments[0],o=Be(i)?i.value:void 0;if(o==null)return;let a=r?n.arguments[1]:void 0,s=!1,p;if(ee(a)){let l=a.properties.find((c)=>c.type==="Property"&&_(c.key)&&c.key.name==="detail");if(l?.type==="Property")s=!0,p=l.value}return{name:String(o),detail:p,hasArgument:s,nestedBoundNames:wt(e,p),source:C(e,t)}}function No(e,t){let n=Mr(Rr(e,t.nestedBoundNames),t.detail),r=n===void 0&&Be(t.detail)?t.detail.value:void 0;Le(e,{name:t.name,detail:n??(r==null?"":jr(r)),has_argument:t.hasArgument,source:t.source})}function Pt(e,t,n=!1){if(e.length===0)return"null";let r=e.map(({name:i,type:o,description:a,optional:s,default:p})=>{let l=s?"?":"",c=od.test(i)||i.startsWith("[")?i:JSON.stringify(i),d=a||"";if(p&&d)d=`${d} @default ${p}`;else if(p)d=`@default ${p}`;if(d=ye(d),d){if(n)return`${d.includes(`
17
+ `)?`/**
18
+ ${d.split(`
19
+ `).map((h)=>h?` * ${h}`:" *").join(`
20
+ `)}
21
+ */`:`/** ${d} */`}
22
+ ${c}${l}: ${o};`;return`/** ${d.replace(sd," ")} */ ${c}${l}: ${o};`}return`${c}${l}: ${o};`}).join(n?`
23
+ `:" ");return n?`{
24
+ ${r}
25
+ }`:`{ ${r} }`}function pd({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:r}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(r!==void 0)return"inferred";return"unknown"}function mn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,r=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration?t==="() => any":e.initializerIsFunction&&t===e.typeSeed)&&r){let l=e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:"";t=n&&n.length>0?`${l}(${Ae(n)}) => ${r}`:`${l}() => ${r}`}let o=e.jsdocDescription??e.resolvedDescription;if(o===void 0&&t!==void 0)o=e.typedefs?.get(t)?.description;let a=pd({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),s=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>")),p=s?e.jsdocTypeParameters:void 0;return{type:t,typeSource:a,description:o,params:n,returnType:r,isFunction:s,typeParameters:p}}function gn(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function $o(e,t){for(let n of e?.body??[]){let r=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(r.type==="VariableDeclaration"){let i=r.declarations.find((o)=>o.id.type==="Identifier"?o.id.name===t:M(o.id).has(t));if(i)return{declaration:r,declarator:i,statement:n}}else if((r.type==="FunctionDeclaration"||r.type==="ClassDeclaration")&&r.id?.name===t)return{declaration:r,statement:n}}return}function ld(e,t){for(let n of e?.body??[]){if(n.type!=="LabeledStatement"||n.label.name!=="$")continue;if(n.body.type!=="ExpressionStatement")continue;let r=n.body.expression;if(r.type!=="AssignmentExpression"||r.operator!=="=")continue;if(r.left.type.startsWith("TS"))continue;if(!M(r.left).has(t))continue;let i={type:"VariableDeclarator",id:r.left,init:r.right,start:r.start,end:r.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[i],start:n.start,end:n.end},declarator:i,statement:n}}return}function cd(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function qr(e,t,n,r,i){let o=gn(n.local),a=gn(n.exported);if(!o||!a)return;if(t.source!=null)return{localName:o,exportedName:a};let s=$o(r,o);if(!s&&i==="instance")s=$o(e.parsed?.module?.content,o)??ld(r,o);return{localName:o,exportedName:a,...s}}function Br(e,t,n,r){let i=t.source?.value,o=typeof i==="string"?`it re-exports from "${i}"`:e.valueImportBindingsByLocalName.has(n)?"it re-exports an imported binding":"no matching local declaration was found";P(e,"export-unresolved",r,`export "${r}" was skipped because ${o}; sveld only resolves exports of a local declaration.`,C(e,t))}function yn(e,t,n){if(!n)return V(e,t);let r=t.specifiers.length===1?V(e,t):void 0,i=V(e,n.statement);if(!r||!i)return r??i;let o=Object.fromEntries(Object.entries(r).filter(([,a])=>a!==void 0));return{...i,...o,internal:r.internal||i.internal}}function Or(e,t,n,r){let i=[];if(t.type==="FunctionDeclaration"){let p=t;if(!p.id)return i;let l=e.scriptLanguage==="ts"?Zs(e,p):void 0;return i.push({prop_name:n?.exportedName??p.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:l?.hasAnnotations?void 0:"() => any",explicitType:l?.hasAnnotations?l.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:p.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),i}if(t.type!=="VariableDeclaration")return i;let o=t,a=cd(o.kind),s=n?.declarator?[n.declarator]:o.declarations;for(let p of s){if(!p||typeof p!=="object"||!("id"in p))continue;let{id:l,init:c}=p;if(!l||typeof l!=="object")continue;if(l.type!=="Identifier"){for(let S of M(l)){if(n&&n.localName!==S)continue;i.push({prop_name:n?.exportedName??S,kind:a,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:S,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let d=l.name,f=n?.exportedName??d,h=c==null?{isFunction:!1}:Te(e,c),{value:g,type:m,isFunction:y,defaultValue:T}=h;cn(e,h,f,r),i.push({prop_name:f,kind:a,isFunctionDeclaration:!1,value:g,typeSeed:m,explicitType:e.explicitPropTypesByName.get(d),initializerIsFunction:y,isRequired:a==="let"&&c==null,localName:d,defaultValue:T,inferredTypeForSource:m,resolvedJSDoc:h})}return i}function Fr(e,t,n){let{resolvedJSDoc:r}=t;return mn({explicitType:t.explicitType,typeSeed:t.typeSeed,inferredTypeForSource:t.inferredTypeForSource,jsdocType:n?.type,jsdocDescription:n?.description,jsdocParams:n?.params,jsdocReturnType:n?.returnType,jsdocTypeParameters:n?.typeParameters,resolvedType:r?.resolvedType,resolvedDescription:r?.resolvedDescription,resolvedParams:r?.resolvedParams,resolvedReturnType:r?.resolvedReturnType,initializerIsFunction:t.initializerIsFunction,isFunctionDeclaration:t.isFunctionDeclaration,typedefs:e.typedefs})}function ud(e,t,n){P(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,C(e,t))}function Lo(e,t,n,r){if(n.type==="ClassDeclaration"){if(n.id)ud(e,t,r?.exportedName??n.id.name);return}let i=Or(e,n,r,"props");if(i.length===0)return;let o=yn(e,t,r);for(let a of i){let{prop_name:s,kind:p,localName:l}=a,{type:c,typeSource:d,description:f,params:h,returnType:g,isFunction:m,typeParameters:y}=Fr(e,a,o);me(e,"prop-unknown-type",s,o?.sveldIgnore),Ze(e,s,{name:s,...l!==void 0&&l!==s?{localName:l}:{},kind:p,description:f,binding:o?.binding,deprecated:o?.deprecated,tags:o?.tags,...o?.internal?{internal:!0}:{},type:c,typeSource:d,value:a.value,defaultValue:a.defaultValue,params:h,returnType:g,typeParameters:y,isFunction:m,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:a.isRequired,constant:p==="const",reactive:e.reactive_vars.has(s),source:C(e,t)})}}function _o(e,t,n){if(t.declaration!=null){Lo(e,t,t.declaration);return}for(let r of t.specifiers){let i=qr(e,t,r,n,"instance");if(!i)continue;if(i.declaration)Lo(e,t,i.declaration,i);else Br(e,t,i.localName,i.exportedName)}}function dd(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=kt(t);if(!n&&!Ct(t))return;let r="name"in e&&typeof e.name==="string"?e.name:void 0;if(!r)return;let i=n?{type:"InlineComponent",name:r}:{type:"Element",name:r};if(r==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let o=e.tag;if(o.type==="Literal"&&typeof o.value==="string")i.thisValue=o.value}return i}function Io(e,t){let n=dd(t);if(!n)return;if(e.rest_props===void 0){e.rest_props=n;return}if(e.rest_props.type==="InlineComponent"&&n.type==="Element")e.rest_props=n}var fd=/^[A-Za-z_$][\w$]*/,hd=/[A-Za-z_$][\w$]*/g,Ro=/^(?:const|in|out)\s+/;function Mo(e){let t=z(e,",").map((r)=>r.trim()).filter((r)=>r.length>0);if(t.length===0)return null;return[t.map((r)=>{let i=r;while(Ro.test(i))i=i.replace(Ro,"");return i.match(fd)?.[0]??r}).join(", "),t.join(", ")]}function jo(e,t,n){let r=e.scriptGenericsAttribute?.value;if(!r)return;for(let[i]of r.matchAll(hd)){if(e.typeImportBindingsByLocalName.has(i))t.add(i);if(n.has(i))continue;let o=e.localTypeDeclarationsByName.get(i);if(!o)continue;n.add(i),Z(e,o.node,t,n)}}function bn(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function Vr(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function qo(e){let t=[e.instance,e.module].filter((r)=>r!==void 0),n=!1;for(let r of t){let i=r.attributes.find((a)=>a.name==="lang");if(!i){n=!0;continue}if(Vr(i)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function Bo(e,t){let n=t.instance?.attributes.find((s)=>s.name==="generics");if(!n)return;let r=C(e,n),i=t.instance?.attributes.find((s)=>s.name==="lang");if((i?Vr(i)?.toLowerCase():void 0)!=="ts"){P(e,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',r);return}let a=Vr(n);if(!a)return;return{value:a,source:r}}var md=/[A-Za-z_$][\w$]*/g;function gd(e,t,n){let r=new Map,i=t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"?t.typeParameters?.params:void 0,o=n.typeArguments?.params;if(!i?.length||!o?.length)return r;for(let a=0;a<i.length;a++){let s=i[a]?.name,p=o[a];if(!s||p?.start===void 0||p?.end===void 0)continue;let l=N(e,p.start,p.end)?.trim();if(l)r.set(s,l)}return r}function yd(e,t){if(t.size===0)return e;return e.replace(md,(n)=>t.get(n)??n)}function tt(e,t,n,r=new Set){let i=new Map;if(!t?.type)return i;let o=(a)=>{for(let s of a){if(s?.type!=="TSPropertySignature"||s.computed)continue;if(!s.key)continue;let p=G(s.key);if(!p)continue;let l=s.typeAnnotation?.start,c=s.typeAnnotation?.end;if(l===void 0||c===void 0)continue;let d=N(e,l+1,c)?.trim();if(!d)continue;F(e,s.typeAnnotation?.typeAnnotation);let f=kr(e,s);i.set(p,{type:d,optional:s.optional===!0,source:C(e,s),...f?{jsdoc:f}:{}})}};switch(t.type){case"TSTypeLiteral":o(t.members??[]);break;case"TSInterfaceDeclaration":o(t.body?.body??[]);break;case"TSTypeAliasDeclaration":{let a=tt(e,t.typeAnnotation,n,r);for(let[s,p]of a)i.set(s,p);break}case"TSTypeReference":{let a=Xs(t.typeName);if(!a||r.has(a))break;let s=n.get(a);if(!s)break;r.add(a);let p=tt(e,s,n,r);r.delete(a);let l=gd(e,s,t);for(let[c,d]of p)i.set(c,l.size===0?d:{...d,type:yd(d.type,l)});break}case"TSIntersectionType":for(let a of t.types??[]){let s=tt(e,a,n,r);for(let[p,l]of s)i.set(p,l)}break;case"TSParenthesizedType":{let a=tt(e,t.typeAnnotation,n,r);for(let[s,p]of a)i.set(s,p);break}}return i}function Oo(e){return e?.content.body??[]}function bd(e){let t={};for(let[n,r]of Object.entries(e))t[n]={...r.attribute===void 0?{}:{attribute:r.attribute},...r.reflect===void 0?{}:{reflect:r.reflect},...r.type===void 0?{}:{type:r.type}};return t}function Hr(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let r of t.specifiers??[]){let i=r.local?.name;if(!i)continue;if(!(t.importKind==="type"||r.type==="ImportSpecifier"&&r.importKind==="type"))continue;let a,s;if(r.type==="ImportSpecifier")a="named",s=r.imported?.type==="Identifier"?r.imported.name:typeof r.imported?.value==="string"?r.imported.value:void 0;else if(r.type==="ImportDefaultSpecifier")a="default";else if(r.type==="ImportNamespaceSpecifier")a="namespace";if(!a)continue;e.typeImportBindingsByLocalName.set(i,{importedName:s,localName:i,source:String(t.source.value),specifierType:a})}if(t.type==="TSEnumDeclaration"||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"){let r=t.type==="TSEnumDeclaration"?Qs(e,t):N(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:r??"",node:t,start:t.start,...n?{exported:n}:{}})}}function Vo(e,t){if(e.runesPropsDeclarationMetadataByDeclaratorStart.clear(),e.explicitPropTypesByName.clear(),e.explicitVariableTypesByName.clear(),e.explicitVariableTypeNodesByName.clear(),e.typeImportBindingsByLocalName.clear(),e.localTypeDeclarationsByName.clear(),e.additionalTypeDependencyNodes.length=0,e.typedRunesPropsDeclarations.length=0,!e.source)return;e.scriptLanguage=qo(t);let n=t.options?.customElement;e.customElementTag=n?.tag,e.customElement=n?{...n.tag===void 0?{}:{tag:n.tag},...n.shadow==="open"||n.shadow==="none"?{shadow:n.shadow}:{},...n.props?{props:bd(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=Bo(e,t);let r=Oo(t.module),i=new Set;for(let a of r){if(!a?.type)continue;if(a.type==="ExportNamedDeclaration"&&a.declaration)Hr(e,a.declaration,!0);else if(a.type==="ExportNamedDeclaration"&&!a.source)for(let s of a.specifiers){if(s.local.type!=="Identifier"||s.exported.type!=="Identifier")continue;if(s.local.name===s.exported.name)i.add(s.local.name)}else Hr(e,a,!1)}for(let a of i){let s=e.localTypeDeclarationsByName.get(a);if(s)s.exported=!0}let o=Oo(t.instance);for(let a of o){if(!a?.type)continue;if(Hr(e,a,!1),a.type==="ExportNamedDeclaration"&&a.declaration?.type==="VariableDeclaration")for(let s of a.declaration.declarations??[]){if(s.id?.type!=="Identifier"||!s.id.name)continue;let p=Ee(e,s.id.typeAnnotation);if(p)e.explicitPropTypesByName.set(s.id.name,p),F(e,s.id.typeAnnotation?.typeAnnotation)}else if(a.type==="VariableDeclaration")for(let s of a.declarations??[]){if(s.id?.type!=="Identifier"||!s.id.name)continue;let p=Ee(e,s.id.typeAnnotation);if(p){e.explicitVariableTypesByName.set(s.id.name,p);let l=s.id.typeAnnotation?.typeAnnotation;if(l)e.explicitVariableTypeNodesByName.set(s.id.name,l)}}}for(let a of o){if(!a||typeof a!=="object"||!("declarations"in a))continue;for(let s of a.declarations??[]){if(!he(Pe(s.init),"$props"))continue;let p="typeAnnotation"in s.id?s.id.typeAnnotation:void 0,l=p?void 0:Ls(s.init),c=p?.typeAnnotation??l,d=p?Ee(e,p):Oe(e,l),f=tt(e,c,new Map(Array.from(e.localTypeDeclarationsByName.entries(),([m,y])=>[m,y.node]))),h=new Set,g=new Set;if(Z(e,c,h,g),jo(e,h,g),s.start!==void 0){let m={canonicalType:d,props:f,referencedImportedTypes:h,referencedLocalTypes:g};if(e.runesPropsDeclarationMetadataByDeclaratorStart.set(s.start,m),d)e.typedRunesPropsDeclarations.push(m)}}}}function Fo(e,t){let n=t?.trim();if(!n)return;let r=e.typedefMembersByName.get(n)??ve(n);return r?new Map(r.map((i)=>[i.name,i])):void 0}function Ho(e,t){for(let n of t.declarations){if(!he(Pe(n.init),"$props"))continue;if(n.id.type==="Identifier"){e.wholePropsLocals.add(n.id.name),e.restPropLocals.add(n.id.name);let a=pn(e,n.start),s=a?.props.size?void 0:Fo(e,V(e,t)?.type);for(let p of s?.values()??[])Ze(e,p.name,{name:p.name,kind:"let",description:p.description,type:p.type,typeSource:"jsdoc",isFunction:p.type.includes("=>"),isFunctionDeclaration:!1,isRequired:!p.optional,constant:!1,reactive:!1});if(a)for(let[p,l]of a.props)Ze(e,p,{name:p,kind:"let",description:l.jsdoc?.description,deprecated:l.jsdoc?.deprecated,tags:l.jsdoc?.tags,type:l.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1,source:l.source});continue}if(n.id.type!=="ObjectPattern")continue;let r=V(e,t),i=pn(e,n.start)?.props.size?void 0:Fo(e,r?.type),o=n.id.properties.filter((a)=>{if(a.type!=="Property"||a.computed)return!1;if(!G(a.key))return!1;if(a.value.type==="Identifier")return!0;return a.value.type==="AssignmentPattern"&&a.value.left.type==="Identifier"}).length;for(let a of n.id.properties){if(a.type==="RestElement"){if(a.argument.type==="Identifier")e.restPropLocals.add(a.argument.name);continue}let s=G(a.key);if(!s)continue;let p,l;if(a.value.type==="Identifier")p=a.value.name;else{let ht=a.value;p=ht.left.name,l=ht.right}if(!p)continue;if(Xt(e,s,p),s==="children")e.snippetPropLocals.add(p);let c=i?.get(s),d=Ks(e,n.start,s),f=kr(e,a)??d?.jsdoc??(o===1&&!i?r:void 0),{init:h,bindable:g}=lo(l),m=h==null?{isFunction:!1}:Te(e,h),{value:y,type:T,isFunction:S,defaultValue:D}=m,b=d?.type===void 0&&f?.type===void 0?m.resolvedType:void 0;cn(e,m,s,"props");let{type:L,typeSource:R,description:qe,params:Wt,returnType:Ut,isFunction:Jt}=mn({explicitType:d?.type,typeSeed:T,inferredTypeForSource:T,jsdocType:f?.type??c?.type,jsdocDescription:f?.description??c?.description,jsdocParams:f?.params,jsdocReturnType:f?.returnType,resolvedType:b,resolvedDescription:m.resolvedDescription,resolvedParams:m.resolvedParams,resolvedReturnType:m.resolvedReturnType,initializerIsFunction:S,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(g)e.reactive_vars.add(s);me(e,"prop-unknown-type",s,f?.sveldIgnore),Ze(e,s,{name:s,...p===s?{}:{localName:p},kind:"let",description:qe,binding:f?.binding,deprecated:f?.deprecated,tags:f?.tags,...f?.internal?{internal:!0}:{},...g?{bindable:!0}:{},type:L,typeSource:R,value:y,defaultValue:D,params:Wt,returnType:Ut,isFunction:Jt,isFunctionDeclaration:!1,isRequired:!g&&h==null&&d?.optional!==!0&&c?.optional!==!0,constant:!1,reactive:g,source:C(e,a)})}}}function xd(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let r=n+15;while(e[r]===" ")r++;if(e[r]!=="<")return;let i=Qe(e,r);return i===-1?void 0:e.slice(r+1,i)}var vd=/^["']|["']$/g,Ed=/\?$/,Td=/^\{/,Sd=/\}$/;function kd(e){let t=Kt(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(Ed,"").replace(vd,""),r=e.slice(t+1).trim();if(!n||!r)return;return{name:n,type:r}}function Go(e,t,n,r){if(t){let s=new Map(Array.from(e.localTypeDeclarationsByName.entries(),([l,c])=>[l,c.node])),p=tt(e,t,s);for(let[l,c]of p)Le(e,{name:l,detail:c.type,has_argument:!0,source:c.source});return}let i=$e(e,n)?.type,o=i?xd(i):void 0;if(!o)return;let a=o.trim().replace(Td,"").replace(Sd,"");for(let s of z(a,";,")){let p=kd(s.trim());if(!p)continue;Le(e,{name:p.name,detail:p.type,has_argument:!0,source:r})}}function zo(e,t){if(e.syntaxMode!=="runes")return;for(let[n,r]of Array.from(e.events.entries())){if(r.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let i=`on${n}`,o=e.props.get(i);if(!o)continue;let a=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,s=r.detail===void 0||r.detail==="undefined"||r.detail==="null"?"() => void":`(detail: ${r.detail}) => void`;e.props.set(i,{...o,description:o.description??r.description,type:a?o.type:s,typeSource:a?o.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var At=null;function Cd(e,t){let n={value:void 0,replace:!1};if(!t||typeof t!=="object"||!("type"in t))return n;if(t.type==="Identifier")n.value=t.name,n.replace=!0;else if(t.type==="Literal")n.value=String(t.value);else if(t.type==="MemberExpression")n.value=rn(e,t);else if((t.type==="ObjectExpression"||t.type==="TemplateLiteral")&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")n.value=N(e,t.start,t.end);return n}function wd(e,t){if(!_(t))return null;let n=et(e,t.name);if(ee(n))return Gr(e,n).slot_props;let r=Ne(e,t.name);if(!r)return null;let i=ve(r.type);if(!i)return null;let o={};for(let a of i)o[a.name]={value:a.type,replace:!1};return o}function Gr(e,t){let n={},r=!1;for(let i of t.properties){if(i.type==="SpreadElement"){let a=wd(e,i.argument);if(a)Object.assign(n,a);else r=!0,P(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,i));continue}if(i.type!=="Property"||i.computed)continue;let o=G(i.key);if(!o)continue;n[o]=Cd(e,i.value)}return{slot_props:n,hasUnresolvedSpread:r}}function Pd(e,t){if(!t||typeof t!=="object"||!("type"in t))return null;if(t.type==="Identifier"){let o=t,a=e.propLocalToPublicName.get(o.name);if(!a)return null;return{publicName:a,trackingName:o.name}}if(t.type!=="MemberExpression")return null;let n=t,r=n.object&&typeof n.object==="object"&&"type"in n.object&&n.object.type==="Identifier"?n.object.name:void 0;if(!r||!e.wholePropsLocals.has(r))return null;let i;if(!n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property){if(n.property.type==="Identifier")i=n.property.name;else if(n.property.type==="Literal"&&n.property.value!=null)i=String(n.property.value)}else if(n.computed&&n.property&&typeof n.property==="object"&&"type"in n.property&&n.property.type==="Literal"&&"value"in n.property&&n.property.value!=null)i=String(n.property.value);if(!i)return null;return{publicName:i,trackingName:i}}function Wo(e,t){let n=t;if(n&&typeof n==="object"&&"type"in n&&n.type==="ChainExpression")n=n.expression;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="CallExpression")return null;let r=n;if(!r.callee||typeof r.callee!=="object"||!("type"in r.callee))return null;let i=Pd(e,r.callee);if(!i)return null;return{...i,arguments:r.arguments}}function Dt(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:r,slot_fallback:i,slot_description:o,slot_deprecated:a,slot_tags:s,slot_internal:p,source:l}){let c=t===void 0||t==="",d=c?At:t??"",f=X(i),h=n===void 0||n===""?void 0:n,g=o?.trim()||void 0;if(e.slots.has(d)){let m=e.slots.get(d);if(m)e.slots.set(d,{...m,default:m.default??c,fallback:f,slot_props:m.slot_props===void 0?h:m.slot_props,slot_props_unresolved_spread:m.slot_props_unresolved_spread||r,description:m.description||g,deprecated:m.deprecated??a,tags:m.tags||s,...m.internal||p?{internal:!0}:{},source:l||m.source})}else e.slots.set(d,{name:d,default:c,fallback:f,slot_props:h,slot_props_unresolved_spread:r,description:g,deprecated:a,tags:s,...p?{internal:!0}:{},source:l})}function Wr(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function xn(e,t,n,r){zr(e,null,null,t,n,r?.skipTypeOnlySubtrees===!0)}function zr(e,t,n,r,i,o){r(e,t,n);let a=e,s=e.type;if((s==="Identifier"||s==="Literal"||s==="Text")&&a.typeAnnotation===void 0){if(i)i(e);return}if(o&&s.charCodeAt(0)===84&&Wr(s)){if(i)i(e);return}for(let p in a){if(p==="leadingComments")continue;let l=a[p];if(!l||typeof l!=="object")continue;if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];if(d&&typeof d==="object"&&typeof d.type==="string")zr(d,e,p,r,i,o)}else if(typeof l.type==="string")zr(l,e,p,r,i,o)}if(i)i(e)}var Uo=/^@component/,Ad=/\r/g,Dd=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function Jo(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function Nd(e,t,n,r){let i=n.callee.type==="Identifier"?n.callee.name:void 0;if(i==="createEventDispatcher"){let o=Jo(r);if(o!==void 0)t.dispatcherName=o,t.dispatcherDeclaratorNode=r;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(i==="$host"){let o=Jo(r);if(o!==void 0)t.hostLocalNames.add(o)}if(i==="setContext")ko(e,n);if(n.arguments.length>0){if(t.callsWithArguments.push(n),fn(e,n.callee))t.locallyBoundCalls.add(n)}if(i)t.callees.push({name:i,arguments:n.arguments,node:n,nestedBoundDetailNames:wt(e,n.arguments[1])});if(Xe(n.callee)&&_(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(he(n.callee.object,"$host")||_(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let o=Do(e,n);if(o)t.hostDispatchedEventNames.add(o.name),t.hostDispatches.push(o)}}function $d(e,t){let n=t,r=n.attributes?.find((s)=>s.name==="name")?.value,i=(Array.isArray(r)?r[0]:void 0)?.data,o=(n.attributes||[]).filter((s)=>s.name!=="name").reduce((s,p)=>{let l={value:void 0,replace:!1},c=p.value;if(c===void 0||c===!0)return s;let d=Array.isArray(c)?c[0]:c;if(d){let{type:f,expression:h,raw:g,start:m,end:y}=d;if(f==="Text"&&g!==void 0)l.value=JSON.stringify(g);else if(!Array.isArray(c)&&f==="ExpressionTag"&&h&&typeof h==="object"&&"type"in h&&h.type==="Identifier"&&"name"in h&&h.name===p.name)l.value=h.name,l.replace=!0;if(h&&typeof h==="object"&&"type"in h){if(h.type==="Literal"&&"value"in h){let T=h.value;l.value=typeof T==="string"?JSON.stringify(T):String(T)}else if(h.type==="MemberExpression")l.value=rn(e,h);else if(h.type!=="Identifier"){if(m!==void 0&&y!==void 0){if(h.type==="ObjectExpression"||h.type==="TemplateLiteral")l.value=N(e,m+1,y-1)}}}}if(p.name)s[p.name]=l;return s},{}),a=t.fragment.nodes.map(({start:s,end:p})=>N(e,s,p)??"").join("").trim();Dt(e,{slot_name:i,slot_props:o,slot_fallback:a,source:C(e,t)})}function Ld(e,t){let n=Wo(e,t.expression);if(!n)return;let r,i=!1;if(n.arguments.length===0)r={};else if(n.arguments.length===1&&typeof n.arguments[0]==="object"&&n.arguments[0]&&"type"in n.arguments[0]&&n.arguments[0].type==="ObjectExpression"){let s=Gr(e,n.arguments[0]);r=s.slot_props,i=s.hasUnresolvedSpread}let o=n.publicName==="children"?void 0:n.publicName,a=o===void 0?At:o;if(r!==void 0)Dt(e,{slot_name:o,slot_props:r,slot_props_unresolved_spread:i||void 0,source:C(e,t)});if(r!==void 0||e.slots.has(a))e.snippetPropLocals.add(n.trackingName)}function _d(e,t,n){let r=t.name;if(t.expression!=null||!r)return;if(n==null||!("name"in n))return;let i=typeof n.name==="string"?n.name:void 0,o=n.type;if(!i||!o)return;let a=kt(o)?{type:"InlineComponent",name:i}:{type:"Element",name:i};e.forwardedEvents.set(r,a);let s=e.events.get(r),p=e.eventDescriptions.get(r),l=s?.deprecated,c=s?.internal;if(!s)e.events.set(r,{type:"forwarded",name:r,element:a,description:p,deprecated:l,...c?{internal:!0}:{},source:C(e,t)});else if(s.type==="forwarded"&&p&&!s.description)e.events.set(r,{...s,description:p,deprecated:s.deprecated??l,...s.internal||c?{internal:!0}:{},source:s.source||C(e,t)})}function Id(e,t,n){if(!(n&&(Ct(n.type)||kt(n.type))))return;let r=t.expression.type==="Identifier"?t.expression.name:void 0;if(r){let i=Et(e,r);if(i)e.reactive_vars.add(i)}if(Ct(n.type)&&t.name==="this"&&r&&"name"in n&&typeof n.name==="string"){let i=Et(e,r);if(!i)return;let o=n.name;if(e.bindings.has(i)){let a=e.bindings.get(i);if(a&&!a.elements.includes(o))e.bindings.set(i,{...a,elements:[...a.elements,o]})}else e.bindings.set(i,{elements:[o]})}}function Ko(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set},n={type:"ComponentRoot",instance:e.parsed?.instance,fragment:e.parsed?.fragment};uo(e),e.activeScopes.push(e.componentScope);let r=fo(e);return xn(n,(i,o)=>{let a=ho(e,r,i);if(a)e.activeScopes.push(a);if(!Dd.has(i.type))return;switch(i.type){case"AssignmentExpression":_r(e,i.left);break;case"UpdateExpression":_r(e,i.argument);break;case"CallExpression":Nd(e,t,i,o);break;case"SpreadAttribute":{let s=i.expression.type==="Identifier"?i.expression.name:void 0;if(s==="$$restProps"||e.restPropLocals.has(s??""))Io(e,o);break}case"FunctionDeclaration":if(i.id?.name)e.funcDecls.set(i.id.name,i);break;case"ImportDeclaration":bt(e,i);break;case"VariableDeclaration":if(e.vars.add(i),o?.type==="Program"&&i.declarations.some((s)=>he(Pe(s.init),"$props")))Ho(e,i);break;case"ExportNamedDeclaration":_o(e,i,o?.type==="Program"?o:null);break;case"Comment":{let s=i.data.trim();if(Uo.test(s))e.componentComment=s.replace(Uo,"").replace(Ad,""),e.componentCommentSource=C(e,i);break}case"SlotElement":$d(e,i);break;case"RenderTag":Ld(e,i);break;case"OnDirective":_d(e,i,o);break;case"BindDirective":Id(e,i,o);break}},(i)=>{if(St(i))e.activeScopes.pop(),mo(r,i)},{skipTypeOnlySubtrees:!0}),t}var Rd=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],aa=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Md="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",pa="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Ur={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Jr="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",jd={5:Jr,"5module":Jr+" export import",6:Jr+" const class extends export import super"},la=/^in(stanceof)?$/,qd=new RegExp("["+pa+"]"),Bd=new RegExp("["+pa+Md+"]");function ei(e,t){var n=65536;for(var r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function ce(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&qd.test(String.fromCharCode(e));if(t===!1)return!1;return ei(e,aa)}function Se(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&Bd.test(String.fromCharCode(e));if(t===!1)return!1;return ei(e,aa)||ei(e,Rd)}var A=function(e,t){if(t===void 0)t={};this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function ne(e,t){return new A(e,{beforeExpr:!0,binop:t})}var re={beforeExpr:!0},U={startsExpr:!0},si={};function w(e,t){if(t===void 0)t={};return t.keyword=e,si[e]=new A(e,t)}var u={num:new A("num",U),regexp:new A("regexp",U),string:new A("string",U),name:new A("name",U),privateId:new A("privateId",U),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",re),semi:new A(";",re),colon:new A(":",re),dot:new A("."),question:new A("?",re),questionDot:new A("?."),arrow:new A("=>",re),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",re),backQuote:new A("`",U),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ne("||",1),logicalAND:ne("&&",2),bitwiseOR:ne("|",3),bitwiseXOR:ne("^",4),bitwiseAND:ne("&",5),equality:ne("==/!=/===/!==",6),relational:ne("</>/<=/>=",7),bitShift:ne("<</>>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ne("%",10),star:ne("*",10),slash:ne("/",10),starstar:new A("**",{beforeExpr:!0}),coalesce:ne("??",1),_break:w("break"),_case:w("case",re),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",re),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",re),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",U),_if:w("if"),_return:w("return",re),_switch:w("switch"),_throw:w("throw",re),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",U),_super:w("super",U),_class:w("class",U),_extends:w("extends",re),_export:w("export"),_import:w("import",U),_null:w("null",U),_true:w("true",U),_false:w("false",U),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},J=/\r\n?|\n|\u2028|\u2029/,Od=new RegExp(J.source,"g");function nt(e){return e===10||e===13||e===8232||e===8233}function ca(e,t,n){if(n===void 0)n=e.length;for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(nt(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ua=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Fd=Object.prototype,{hasOwnProperty:Vd,toString:Hd}=Fd,_t=Object.hasOwn||function(e,t){return Vd.call(e,t)},Xo=Array.isArray||function(e){return Hd.call(e)==="[object Array]"},Yo=Object.create(null);function vn(e){return Yo[e]||(Yo[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function wn(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Gd=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Lt=function(e,t){this.line=e,this.column=t};Lt.prototype.offset=function(e){return new Lt(this.line,this.column+e)};var Pn=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function da(e,t){for(var n=1,r=0;;){var i=ca(e,r,t);if(i<0)return new Lt(n,t-r);++n,r=i}}var ti={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Qo=!1;function zd(e){var t={};for(var n in ti)t[n]=e&&_t(e,n)?e[n]:ti[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Qo&&typeof console==="object"&&console.warn)Qo=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
26
+ Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(Xo(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(Xo(t.onComment))t.onComment=Wd(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Wd(e,t){return function(n,r,i,o,a,s){var p={type:n?"Block":"Line",value:r,start:i,end:o};if(e.locations)p.loc=new Pn(this,a,s);if(e.ranges)p.range=[i,o];t.push(p)}}var Fe=1,Ve=2,oi=4,fa=8,ai=16,ha=32,An=64,ma=128,He=256,It=512,ga=1024,Dn=Fe|Ve|He;function pi(e,t){return Ve|(e?oi:0)|(t?fa:0)}var Sn=0,li=1,ke=2,ya=3,ba=4,xa=5,j=function(e,t,n){this.options=e=zd(e),this.sourceFile=e.sourceFile,this.keywords=vn(jd[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var r="";if(e.allowReserved!==!0){if(r=Ur[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")r+=" await"}this.reservedWords=vn(r);var i=(r?r+" ":"")+Ur.strict;if(this.reservedWordsStrict=vn(i),this.reservedWordsStrictBind=vn(i+" "+Ur.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
27
+ `,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(J).length}else this.lineStart=0;if(this.type=u.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ve:Fe),this.regexpState=null,this.privateNameStack=[]},ie={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};j.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})};ie.inFunction.get=function(){return(this.currentVarScope().flags&Ve)>0};ie.inGenerator.get=function(){return(this.currentVarScope().flags&fa)>0};ie.inAsync.get=function(){return(this.currentVarScope().flags&oi)>0};ie.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(He|It))return!1;if(n&Ve)return(n&oi)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ie.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Fe)return!0;return!1};ie.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&An)>0||this.options.allowSuperOutsideMethod};ie.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ma)>0};ie.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ie.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(He|It)||n&Ve&&!(n&ai))return!0}return!1};ie.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&ga)return!1;if(!this.inModule&&t&Fe)return!1;return!0};ie.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&He)>0};j.extend=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var r=0;r<e.length;r++)n=e[r](n);return n};j.parse=function(e,t){return new this(t,e).parse()};j.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()};j.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(j.prototype,ie);var H=j.prototype,Ud=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;H.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){q.lastIndex=e,e+=q.exec(this.input)[0].length;var t=Ud.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){q.lastIndex=e+t[0].length;var n=q.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||J.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}if(e+=t[0].length,q.lastIndex=e,e+=q.exec(this.input)[0].length,this.input[e]===";")e++}};H.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};H.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc};H.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};H.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};H.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};H.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||J.test(this.input.slice(this.lastTokEnd,this.start))};H.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};H.semicolon=function(){if(!this.eat(u.semi)&&!this.insertSemicolon())this.unexpected()};H.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};H.expect=function(e){this.eat(e)||this.unexpected()};H.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var Nn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};H.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1)this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")};H.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:r}=e;if(!t)return n>=0||r>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(r>=0)this.raiseRecoverable(r,"Redefinition of __proto__ property")};H.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};H.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var x=j.prototype;x.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==u.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var ci={kind:"loop"},Jd={kind:"switch"};x.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;q.lastIndex=this.pos;var t=q.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(ce(r)){var i=n;do n+=r<=65535?1:2;while(Se(r=this.fullCharCodeAt(n)));if(r===92)return!0;var o=this.input.slice(i,n);if(!la.test(o))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;q.lastIndex=this.pos;var e=q.exec(this.input),t=this.pos+e[0].length,n;return!J.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Se(n=this.fullCharCodeAt(t+8))||n===92))};x.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;q.lastIndex=this.pos;var n=q.exec(this.input),r=this.pos+n[0].length;if(J.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,o;if(this.input.slice(r,i)!=="using"||i===this.input.length||Se(o=this.fullCharCodeAt(i))||o===92)return!1;q.lastIndex=i;var a=q.exec(this.input);if(r=i+a[0].length,a&&J.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!ce(s)&&s!==92)return!1;var p=r;do r+=s<=65535?1:2;while(Se(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(p,r);if(la.test(l))return!1;if(t&&!e&&l==="of"){q.lastIndex=r;var c=q.exec(this.input);if(r=r+c[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0};x.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};x.isUsing=function(e){return this.isUsingKeyword(!1,e)};x.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),o;if(this.isLet(e))r=u._var,o="let";switch(r){case u._break:case u._continue:return this.parseBreakContinueStatement(i,r.keyword);case u._debugger:return this.parseDebuggerStatement(i);case u._do:return this.parseDoStatement(i);case u._for:return this.parseForStatement(i);case u._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case u._class:if(e)this.unexpected();return this.parseClass(i,!0);case u._if:return this.parseIfStatement(i);case u._return:return this.parseReturnStatement(i);case u._switch:return this.parseSwitchStatement(i);case u._throw:return this.parseThrowStatement(i);case u._try:return this.parseTryStatement(i);case u._const:case u._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case u._while:return this.parseWhileStatement(i);case u._with:return this.parseWithStatement(i);case u.braceL:return this.parseBlock(!0,i);case u.semi:return this.parseEmptyStatement(i);case u._export:case u._import:if(this.options.ecmaVersion>10&&r===u._import){q.lastIndex=this.pos;var a=q.exec(this.input),s=this.pos+a[0].length,p=this.input.charCodeAt(s);if(p===40||p===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===u._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var l=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(l){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(l==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var c=this.value,d=this.parseExpression();if(r===u.name&&d.type==="Identifier"&&this.eat(u.colon))return this.parseLabeledStatement(i,c,d,e);else return this.parseExpressionStatement(i,d)}};x.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.label=null;else if(this.type!==u.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var i=this.labels[r];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(n||i.kind==="loop"))break;if(e.label&&n)break}}if(r===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};x.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};x.parseDoStatement=function(e){if(this.next(),this.labels.push(ci),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(u.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ci),this.enterScope(0),this.expect(u.parenL),this.type===u.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===u._var||this.type===u._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),a=!1,s=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(s){var p=this.startNode();if(this.next(),s==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(p,!0,s),this.finishNode(p,"VariableDeclaration"),this.parseForAfterInit(e,p,t)}var l=this.containsEsc,c=new Nn,d=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);if(this.type===u._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===u._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(f.start===d&&!l&&f.type==="Identifier"&&f.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&a)this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)}else this.checkExpressionErrors(c,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,f)};x.parseForAfterInit=function(e,t,n){if((this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===u._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};x.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,$t|(n?0:ni),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(u.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(Jd),this.enterScope(ga);var t;for(var n=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var r=this.type===u._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(u.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};x.parseThrowStatement=function(e){if(this.next(),J.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Kd=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?ha:0),this.checkLValPattern(e,t?ba:ke),this.expect(u.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();if(this.next(),this.eat(u.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ci),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1){var a=o[i];if(a.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var s=this.type.isLoop?"loop":this.type===u._switch?"switch":null;for(var p=this.labels.length-1;p>=0;p--){var l=this.labels[p];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=s;else break}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(u.braceL),e)this.enterScope(0);while(this.type!==u.braceR){var r=this.parseStatement(null);t.body.push(r)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};x.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var n=this.type===u._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,n,r){e.declarations=[],e.kind=n;for(;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(u.eq))i.init=this.parseMaybeAssign(t);else if(!r&&n==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!r&&i.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(u.comma))break}return e};x.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?li:ke,!1)};var $t=1,ni=2,va=4;x.parseFunction=function(e,t,n,r,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r){if(this.type===u.star&&t&ni)this.unexpected();e.generator=this.eat(u.star)}if(this.options.ecmaVersion>=8)e.async=!!r;if(t&$t){if(e.id=t&va&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&ni))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?li:ke:ya)}var o=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pi(e.async,e.generator)),!(t&$t))e.id=this.type===u.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,t&$t?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),o=!1;i.body=[],this.expect(u.braceL);while(this.type!==u.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(o)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");o=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&Xd(r,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};x.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,a="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===u.star)s=!0;else r="static"}if(n.static=s,!r&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon())o=!0;else r="async";if(!r&&(t>=9||!o)&&this.eat(u.star))i=!0;if(!r&&!o&&!i){var p=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=p;else r=p}if(r)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===u.parenL||a!=="method"||i||o){var l=!n.static&&kn(n,"constructor"),c=l&&e;if(l&&a!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=l?"constructor":a,this.parseClassMethod(n,i,o,c)}else this.parseClassField(n);return n};x.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword};x.parseClassElementName=function(e){if(this.type===u.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};x.parseClassMethod=function(e,t,n,r){var i=e.key;if(e.kind==="constructor"){if(t)this.raise(i.start,"Constructor can't be a generator");if(n)this.raise(i.start,"Constructor can't be an async method")}else if(e.static&&kn(e,"prototype"))this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,n,r);if(e.kind==="get"&&o.params.length!==0)this.raiseRecoverable(o.start,"getter should have no params");if(e.kind==="set"&&o.params.length!==1)this.raiseRecoverable(o.start,"setter should have exactly one param");if(e.kind==="set"&&o.params[0].type==="RestElement")this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};x.parseClassField=function(e){if(kn(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&kn(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(u.eq))this.enterScope(It|An),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(He|An);while(this.type!==u.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){if(this.type===u.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,ke,!1)}else{if(t===!0)this.unexpected();e.id=null}};x.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1];for(var o=0;o<n.length;++o){var a=n[o];if(!_t(t,a.name))if(i)i.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function Xd(e,t){var n=t.key.name,r=e[n],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget")return e[n]="true",!1;else if(!r)return e[n]=i,!1;else return!0}function kn(e,t){var{computed:n,key:r}=e;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}x.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==u.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==u.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};x.parseExportDeclaration=function(e){return this.parseStatement(null)};x.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,$t|va,!1,e)}else if(this.type===u._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};x.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(_t(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};x.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if(n==="ArrayPattern")for(var a=0,s=t.elements;a<s.length;a+=1){var p=s[a];if(p)this.checkPatternExport(e,p)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};x.checkVariableExport=function(e,t){if(!e)return;for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}};x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};x.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};x.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};x.parseImport=function(e){if(this.next(),this.type===u.string)e.specifiers=Kd,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};x.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,ke),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,ke),this.finishNode(e,"ImportDefaultSpecifier")};x.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,ke),this.finishNode(e,"ImportNamespaceSpecifier")};x.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma))return e}if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(u.braceL);while(!this.eat(u.braceR)){if(!t){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};x.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);var t={},n=!0;while(!this.eat(u.braceR)){if(!n){if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break}else n=!1;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;if(_t(t,i))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(r)}return e};x.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);if(Gd.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};x.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};x.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var se=j.prototype;se.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",n)this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];if(this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern"))this.raise(o.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",n)this.checkPatternErrors(n,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(n)this.checkPatternErrors(n,!0);return e};se.toAssignableList=function(e,t){var n=e.length;for(var r=0;r<n;r++){var i=e[r];if(i)this.toAssignable(i,t)}if(n){var o=e[n-1];if(this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier")this.unexpected(o.argument.start)}return e};se.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};se.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==u.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};se.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()};se.parseBindingList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(u.comma);if(t&&this.type===u.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===u.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),i.push(a),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};se.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};se.parseBindingListItem=function(e){return e};se.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};se.checkLValSimple=function(e,t,n){if(t===void 0)t=Sn;var r=t!==Sn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode");if(r){if(t===ke&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(_t(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==xa)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(r)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(r)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};se.checkLValPattern=function(e,t,n){if(t===void 0)t=Sn;switch(e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var a=0,s=e.elements;a<s.length;a+=1){var p=s[a];if(p)this.checkLValInnerPattern(p,t,n)}break;default:this.checkLValSimple(e,t,n)}};se.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=Sn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var le=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},I={b_stat:new le("{",!1),b_expr:new le("{",!0),b_tmpl:new le("${",!1),p_stat:new le("(",!1),p_expr:new le("(",!0),q_tmpl:new le("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new le("function",!1),f_expr:new le("function",!0),f_expr_gen:new le("function",!0,!1,null,!0),f_gen:new le("function",!1,!1,null,!0)},rt=j.prototype;rt.initialContext=function(){return[I.b_stat]};rt.curContext=function(){return this.context[this.context.length-1]};rt.braceIsBlock=function(e){var t=this.curContext();if(t===I.f_expr||t===I.f_stat)return!0;if(e===u.colon&&(t===I.b_stat||t===I.b_expr))return!t.isExpr;if(e===u._return||e===u.name&&this.exprAllowed)return J.test(this.input.slice(this.lastTokEnd,this.start));if(e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow)return!0;if(e===u.braceL)return t===I.b_stat;if(e===u._var||e===u._const||e===u.name)return!1;return!this.exprAllowed};rt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};rt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===u.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};rt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===I.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?I.b_stat:I.b_expr),this.exprAllowed=!0};u.dollarBraceL.updateContext=function(){this.context.push(I.b_tmpl),this.exprAllowed=!0};u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?I.p_stat:I.p_expr),this.exprAllowed=!0};u.incDec.updateContext=function(){};u._function.updateContext=u._class.updateContext=function(e){if(e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==I.p_stat)&&!(e===u._return&&J.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===I.b_stat))this.context.push(I.f_expr);else this.context.push(I.f_stat);this.exprAllowed=!1};u.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};u.backQuote.updateContext=function(){if(this.curContext()===I.q_tmpl)this.context.pop();else this.context.push(I.q_tmpl);this.exprAllowed=!1};u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;if(this.context[t]===I.f_expr)this.context[t]=I.f_expr_gen;else this.context[t]=I.f_gen}this.exprAllowed=!0};u.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==u.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var E=j.prototype;E.checkPropClash=function(e,t,n){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){if(i==="__proto__"&&o==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=r.start}else this.raiseRecoverable(r.start,"Redefinition of __proto__ property");t.proto=!0}return}i="$"+i;var a=t[i];if(a){var s;if(o==="init")s=this.strict&&a.init||a.get||a.set;else s=a.init||a[o];if(s)this.raiseRecoverable(r.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[o]=!0};E.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:r,startLoc:i}=n,o=n.parseMaybeAssign(e,t);if(n.type===u.comma){var a=n.startNodeAt(r,i);a.expressions=[o];while(n.eat(u.comma))a.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(a,"SequenceExpression")}return o})};E.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var r=!1,i=-1,o=-1,a=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new Nn,r=!0;var s=this.start,p=this.startLoc;if(this.type===u.parenL||this.type===u.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var l=this.parseMaybeConditional(e,t);if(n)l=n.call(this,l,s,p);if(this.type.isAssign){var c=this.startNodeAt(s,p);if(c.operator=this.value,this.type===u.eq)l=this.toAssignable(l,!1,t);if(!r)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=l.start)t.shorthandAssign=-1;if(this.type===u.eq)this.checkLValPattern(l);else this.checkLValSimple(l);if(c.left=l,this.next(),c.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(c,"AssignmentExpression")}else if(r)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return l};E.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===n)&&this.eat(u.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(u.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};E.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return i;return i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};E.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==u._in)){if(o>r){var a=this.type===u.logicalOR||this.type===u.logicalAND,s=this.type===u.coalesce;if(s)o=u.logicalAND.binop;var p=this.value;this.next();var l=this.start,c=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,c,o,i),f=this.buildBinary(t,n,e,d,p,a||s);if(a&&this.type===u.coalesce||s&&(this.type===u.logicalOR||this.type===u.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(f,t,n,r,i)}}return e};E.buildBinary=function(e,t,n,r,i,o){if(r.type==="PrivateIdentifier")this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")};E.parseMaybeUnary=function(e,t,n,r){var i=this.start,o=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),p=this.type===u.incDec;if(s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,p,r),this.checkExpressionErrors(e,!0),p)this.checkLValSimple(s.argument);else if(this.strict&&s.operator==="delete"&&Ea(s.argument))this.raiseRecoverable(s.start,"Deleting local variable in strict mode");else if(s.operator==="delete"&&ri(s.argument))this.raiseRecoverable(s.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(s,p?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==u._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var l=this.startNodeAt(i,o);l.operator=this.value,l.prefix=!1,l.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(l,"UpdateExpression")}}if(!n&&!(a.type==="ArrowFunctionExpression"&&a.start===i)&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,a,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return a};function Ea(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ea(e.expression)}function ri(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ri(e.expression)||e.type==="ParenthesizedExpression"&&ri(e.expression)}E.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,n,r,!1,t);if(e&&o.type==="MemberExpression"){if(e.parenthesizedAssign>=o.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=o.start)e.parenthesizedBind=-1;if(e.trailingComma>=o.start)e.trailingComma=-1}return o};E.parseSubscripts=function(e,t,n,r,i){var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;while(!0){var s=this.parseSubscript(e,t,n,r,o,a,i);if(s.optional)a=!0;if(s===e||s.type==="ArrowFunctionExpression"){if(a){var p=this.startNodeAt(t,n);p.expression=s,s=this.finishNode(p,"ChainExpression")}return s}e=s}};E.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)};E.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};E.parseSubscript=function(e,t,n,r,i,o,a){var s=this.options.ecmaVersion>=11,p=s&&this.eat(u.questionDot);if(r&&p)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(u.bracketL);if(l||p&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var c=this.startNodeAt(t,n);if(c.object=e,l)c.property=this.parseExpression(),this.expect(u.bracketR);else if(this.type===u.privateId&&e.type!=="Super")c.property=this.parsePrivateIdent();else c.property=this.parseIdent(this.options.allowReserved!=="never");if(c.computed=!!l,s)c.optional=p;e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(u.parenL)){var d=new Nn,f=this.yieldPos,h=this.awaitPos,g=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!p&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=g,this.parseSubscriptAsyncArrow(t,n,m,a)}this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=g||this.awaitIdentPos;var y=this.startNodeAt(t,n);if(y.callee=e,y.arguments=m,s)y.optional=p;e=this.finishNode(y,"CallExpression")}else if(this.type===u.backQuote){if(p||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var T=this.startNodeAt(t,n);T.tag=e,T.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(T,"TaggedTemplateExpression")}return e};E.parseExprAtom=function(e,t,n){if(this.type===u.slash)this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case u._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL)this.unexpected();return this.finishNode(r,"Super");case u._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case u.name:var o=this.start,a=this.startLoc,s=this.containsEsc,p=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&p.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(I.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[p],!1,t);if(this.options.ecmaVersion>=8&&p.name==="async"&&this.type===u.name&&!s&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(p=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(u.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,a),[p],!0,t)}}return p;case u.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return r=this.startNode(),r.value=this.type===u._null?null:this.type===u._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case u.parenL:var c=this.start,d=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d))e.parenthesizedAssign=c;if(e.parenthesizedBind<0)e.parenthesizedBind=c}return d;case u.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case u.braceL:return this.overrideContext(I.b_expr),this.parseObj(!1,e);case u._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};E.parseExprAtomDefault=function(){this.unexpected()};E.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===u.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};E.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(u.parenR))if(this.expect(u.comma),!this.afterTrailingComma(u.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(u.parenR)){if(this.expect(u.comma),!this.afterTrailingComma(u.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(u.parenR)){var t=this.start;if(this.eat(u.comma)&&this.eat(u.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};E.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};E.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};E.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e};E.shouldParseArrow=function(e){return!this.canInsertSemicolon()};E.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,s=this.startLoc,p=[],l=!0,c=!1,d=new Nn,f=this.yieldPos,h=this.awaitPos,g;this.yieldPos=0,this.awaitPos=0;while(this.type!==u.parenR)if(l?l=!1:this.expect(u.comma),o&&this.afterTrailingComma(u.parenR,!0)){c=!0;break}else if(this.type===u.ellipsis){if(g=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else p.push(this.parseMaybeAssign(!1,d,this.parseParenItem));var m=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(p)&&this.eat(u.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(n,r,p,t);if(!p.length||c)this.unexpected(this.lastTokStart);if(g)this.unexpected(g);if(this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,p.length>1)i=this.startNodeAt(a,s),i.expressions=p,this.finishNodeAt(i,"SequenceExpression",m,y);else i=p[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var T=this.startNodeAt(n,r);return T.expression=i,this.finishNode(T,"ParenthesizedExpression")}else return i};E.parseParenItem=function(e){return e};E.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Yd=[];E.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===u.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(u.parenL))e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Yd;return this.finishNode(e,"NewExpression")};E.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===u.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
28
+ `),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
29
+ `),cooked:this.value};return this.next(),n.tail=this.type===u.backQuote,this.finishNode(n,"TemplateElement")};E.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});n.quasis=[r];while(!r.tail){if(this.type===u.eof)this.raise(this.pos,"Unterminated template literal");this.expect(u.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(u.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};E.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!J.test(this.input.slice(this.lastTokEnd,this.start))};E.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};n.properties=[],this.next();while(!this.eat(u.braceR)){if(!r){if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break}else r=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};E.parseProperty=function(e,t){var n=this.startNode(),r,i,o,a;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===u.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===u.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)o=this.start,a=this.startLoc;if(!e)r=this.eat(u.star)}var s=this.containsEsc;if(this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n))i=!0,r=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(n);else i=!1;return this.parsePropertyValue(n,e,r,i,o,a,t,s),this.finishNode(n,"Property")};E.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;if(e.kind==="get")this.raiseRecoverable(r,"getter should have no params");else this.raiseRecoverable(r,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};E.parsePropertyValue=function(e,t,n,r,i,o,a,s){if((n||r)&&this.type===u.colon)this.unexpected();if(this.eat(u.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===u.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"}else if(!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq)){if(n||r)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||r)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===u.eq&&a){if(a.shorthandAssign<0)a.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};E.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;else e.computed=!1;return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};E.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};E.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.initFunction(r),this.options.ecmaVersion>=6)r.generator=e;if(this.options.ecmaVersion>=8)r.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(pi(t,r.generator)|An|(n?ma:0)),this.expect(u.parenL),r.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")};E.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(pi(n,!1)|ai),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};E.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==u.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||s){if(a=this.strictDirective(this.end),a&&s)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var p=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!o&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,xa);e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=p}this.exitScope()};E.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.type!=="Identifier")return!1}return!0};E.checkParams=function(e,t){var n=Object.create(null);for(var r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,li,t?null:n)}};E.parseExprList=function(e,t,n,r){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(u.comma),t&&this.afterTrailingComma(e))break}else o=!1;var a=void 0;if(n&&this.type===u.comma)a=null;else if(this.type===u.ellipsis){if(a=this.parseSpread(r),r&&this.type===u.comma&&r.trailingComma<0)r.trailingComma=this.start}else a=this.parseMaybeAssign(!1,r);i.push(a)}return i};E.checkUnreserved=function(e){var{start:t,end:n,name:r}=e;if(this.inGenerator&&r==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Dn)&&r==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(r==="arguments"||r==="await"))this.raise(t,"Cannot use "+r+" in class static initialization block");if(this.keywords.test(r))this.raise(t,"Unexpected keyword '"+r+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var i=this.strict?this.reservedWordsStrict:this.reservedWords;if(i.test(r)){if(!this.inAsync&&r==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+r+"' is reserved")}};E.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};E.parseIdentNode=function(){var e=this.startNode();if(this.type===u.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=u.name}else this.unexpected();return e};E.parsePrivateIdent=function(){var e=this.startNode();if(this.type===u.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};E.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};E.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Cn=j.prototype;Cn.raise=function(e,t){var n=da(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};Cn.raiseRecoverable=Cn.raise;Cn.curPosition=function(){if(this.options.locations)return new Lt(this.curLine,this.pos-this.lineStart)};var _e=j.prototype,Qd=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};_e.enterScope=function(e){this.scopeStack.push(new Qd(e))};_e.exitScope=function(){this.scopeStack.pop()};_e.treatFunctionsAsVarInScope=function(e){return e.flags&Ve||!this.inModule&&e.flags&Fe};_e.declareName=function(e,t,n){var r=!1;if(t===ke){var i=this.currentScope();if(r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Fe)delete this.undefinedExports[e]}else if(t===ba){var o=this.currentScope();o.lexical.push(e)}else if(t===ya){var a=this.currentScope();if(this.treatFunctionsAsVar)r=a.lexical.indexOf(e)>-1;else r=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var s=this.scopeStack.length-1;s>=0;--s){var p=this.scopeStack[s];if(p.lexical.indexOf(e)>-1&&!(p.flags&ha&&p.lexical[0]===e)||!this.treatFunctionsAsVarInScope(p)&&p.functions.indexOf(e)>-1){r=!0;break}if(p.var.push(e),this.inModule&&p.flags&Fe)delete this.undefinedExports[e];if(p.flags&Dn)break}if(r)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};_e.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};_e.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};_e.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Dn|It|He))return t}};_e.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Dn|It|He)&&!(t.flags&ai))return t}};var $n=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new Pn(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},Rt=j.prototype;Rt.startNode=function(){return new $n(this,this.start,this.startLoc)};Rt.startNodeAt=function(e,t){return new $n(this,e,t)};function Ta(e,t,n,r){if(e.type=t,e.end=n,this.options.locations)e.loc.end=r;if(this.options.ranges)e.range[1]=n;return e}Rt.finishNode=function(e,t){return Ta.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Rt.finishNodeAt=function(e,t,n,r){return Ta.call(this,e,t,n,r)};Rt.copyNode=function(e){var t=new $n(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Sa=function(){};Sa.prototype.reset=function(){};j.prototype.validateRegExpFlags=function(){};j.prototype.validateRegExpPattern=function(){};var ui=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new Pn(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},k=j.prototype;k.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new ui(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};k.getToken=function(){return this.next(),new ui(this)};if(typeof Symbol<"u")k[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}};k.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(u.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};k.readToken=function(e){if(ce(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};k.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};k.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};k.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=ca(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};k.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!nt(r))r=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};k.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&ua.test(String.fromCharCode(e)))++this.pos;else break e}}};k.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var n=this.type;this.type=e,this.value=t,this.updateContext(n)};k.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(u.ellipsis);else return++this.pos,this.finishToken(u.dot)};k.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(u.assign,2);return this.finishOp(u.slash,1)};k.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?u.star:u.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,r=u.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(u.assign,n+1);return this.finishOp(r,n)};k.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)};k.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(u.assign,2);return this.finishOp(u.bitwiseXOR,1)};k.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||J.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(u.incDec,2)}if(t===61)return this.finishOp(u.assign,2);return this.finishOp(u.plusMin,1)};k.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(u.assign,n+1);return this.finishOp(u.bitShift,n)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(t===61)n=2;return this.finishOp(u.relational,n)};k.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(u.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(u.arrow);return this.finishOp(e===61?u.eq:u.prefix,1)};k.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(u.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)};k.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),ce(t,!0)||t===92)return this.finishToken(u.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+wn(t)+"'")};k.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+wn(e)+"'")};k.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};k.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(J.test(r))this.raise(n,"Unterminated regular expression");if(!e){if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}else e=!1;++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,a=this.readWord1();if(this.containsEsc)this.unexpected(o);var s=this.regexpState||(this.regexpState=new Sa(this));s.reset(n,i,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var p=null;try{p=new RegExp(i,a)}catch(l){}return this.finishToken(u.regexp,{pattern:i,flags:a,value:p})};k.readInt=function(e,t,n){var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,o=this.pos,a=0,s=0;for(var p=0,l=t==null?1/0:t;p<l;++p,++this.pos){var c=this.input.charCodeAt(this.pos),d=void 0;if(r&&c===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(s===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(p===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");s=c;continue}if(c>=97)d=c-97+10;else if(c>=65)d=c-65+10;else if(c>=48&&c<=57)d=c-48;else d=1/0;if(d>=e)break;s=c,a=a*e+d}if(r&&s===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===o||t!=null&&this.pos-o!==t)return null;return a};function Zd(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function ka(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}k.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)n=ka(this.input.slice(t,this.pos)),++this.pos;else if(ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.num,n)};k.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict)this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=ka(this.input.slice(t,this.pos));if(++this.pos,ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(u.num,i)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(r===46&&!n)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!n){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(ce(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Zd(this.input.slice(t,this.pos),n);return this.finishToken(u.num,o)};k.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var n=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};k.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;if(r===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(r===8232||r===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(nt(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(u.string,t)};var Ca={};k.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ca)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};k.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ca;else this.raise(e,t)};k.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===u.template||this.type===u.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(u.dollarBraceL);else return++this.pos,this.finishToken(u.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(u.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(nt(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
30
+ `;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};k.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(u.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
31
+ `)++this.pos;case`
32
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};k.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
33
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return wn(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);if(i>255)r=r.slice(0,-1),i=parseInt(r,8);if(this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(i)}if(nt(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};k.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};k.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var i=this.fullCharCodeAtPos();if(Se(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var a=this.readCodePoint();if(!(t?ce:Se)(a,r))this.invalidStringToken(o,"Invalid Unicode escape");e+=wn(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};k.readWord=function(){var e=this.readWord1(),t=u.name;if(this.keywords.test(e))t=si[e];return this.finishToken(t,e)};var ef="8.18.0";j.acorn={Parser:j,version:ef,defaultOptions:ti,Position:Lt,SourceLocation:Pn,getLineInfo:da,Node:$n,TokenType:A,tokTypes:u,keywordTypes:si,TokContext:le,tokContexts:I,isIdentifierChar:Se,isIdentifierStart:ce,Token:ui,isNewLine:nt,lineBreak:J,lineBreakG:Od,nonASCIIwhitespace:ua};function di(e){return(t)=>e(t)}function fi(...e){return j.extend(...e)}var Kr=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,tf=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"]]),nf=new Set("public private protected readonly declare abstract override static accessor".split(" ")),rf=new Set("public private protected readonly override".split(" ")),sf=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),of=new Set("var let const function class interface enum".split(" ")),Zo=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),ea=1,af=32,pf=256,lf=0,cf=1,Nt=2,uf=3,df=4,Xr=6,ta=7,wa=256,ii=1024,ff=8|ii,hf=Nt|wa,na=1,mf=2,ra=40,gf=41,yf=44,ia=46,sa=58,En=61,oa=60,Tn=123,bf=91,Yr=42,xf=35,Qr=34,Zr=39,vf=SyntaxError("speculative parse failed"),Ln=di((e)=>{let{tokTypes:t,keywordTypes:n,isIdentifierChar:r,isIdentifierStart:i}=e.acorn,o=new e.acorn.TokenType("@");class a extends e{inType=!1;$5=!1;$6=!1;$8=null;$o=null;$p=!1;$q=!1;$i=null;$b=[[]];$r=0;$12=0;constructor(s,p,l){super(s,p,l);let c=this.options.onComment;if(typeof c==="function")this.options.onComment=(d,f,h,g,m,y)=>{if(h<this.$12)return;this.$12=g,c.call(this,d,f,h,g,m,y)}}getTokenFromCode(s){if(s===64)return++this.pos,this.finishToken(o);return super.getTokenFromCode(s)}readToken_lt_gt(s){if(this.inType)return this.finishOp(t.relational,1);return super.readToken_lt_gt(s)}$9(s){let p=this.inType;this.inType=!0;let l=s();if(this.inType=p,!p&&this.type===t.relational)this.pos=this.start,this.nextToken();return l}$1(){return this.type===t.relational&&this.value==="<"}$k(){if(this.type===t.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(t.relational,"<");return this.$1()}$c(){return this.type===t.relational&&this.value===">"}$s(){return this.type===t.prefix&&this.value==="!"}hasPrecedingLineBreak(){return this.$13(this.lastTokEnd,this.start)}$13(s,p){for(let l=s;l<p;l++){let c=this.input.charCodeAt(l);if(c===10||c===13||c===8232||c===8233)return!0}return!1}$d(s=this.pos){return Kr.lastIndex=s,Kr.exec(this.input),Kr.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let s=this.$d(),p=s;while(p<this.input.length&&r(this.input.charCodeAt(p)))p++;return this.input.slice(s,p)}$a(){return!this.$13(this.pos,this.$d())}$14(){return this.$a()&&i(this.$2())&&!Object.hasOwn(n,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$5:this.$5,$6:this.$6,$8:this.$8,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(s){this.pos=s.pos,this.type=s.type,this.value=s.value,this.start=s.start,this.end=s.end,this.startLoc=s.startLoc,this.endLoc=s.endLoc,this.lastTokStart=s.lastTokStart,this.lastTokEnd=s.lastTokEnd,this.lastTokStartLoc=s.lastTokStartLoc,this.lastTokEndLoc=s.lastTokEndLoc,this.curLine=s.curLine,this.lineStart=s.lineStart,this.context=s.context,this.exprAllowed=s.exprAllowed,this.containsEsc=s.containsEsc,this.inType=s.inType,this.$5=s.$5,this.$6=s.$6,this.$8=s.$8,this.scopeStack.length=s.scopes,this.privateNameStack.length=s.privateNames,this.labels=s.labels,this.labels.length=s.labelCount,this.strict=s.strict,this.yieldPos=s.yieldPos,this.awaitPos=s.awaitPos,this.awaitIdentPos=s.awaitIdentPos,this.potentialArrowAt=s.potentialArrowAt,this.potentialArrowInForAwait=s.potentialArrowInForAwait}raise(s,p){if(this.$r>0)throw vf;return super.raise(s,p)}$1y(s,p){try{super.raise(s,p)}catch(l){if(l instanceof SyntaxError)l.$1z=!0;throw l}throw Error("unreachable")}$f(s,p=!1){let l=this.$15();this.$r++;try{let c=s();if(p||c===void 0)this.$16(l);return c}catch(c){if(!(c instanceof SyntaxError)||!p&&c.$1z)throw c;this.$16(l);return}finally{this.$r--}}$t(s){return this.$f(s,!0)===!0}$17(s){if(s.end=this.lastTokEnd,this.options.locations)s.loc.end=this.lastTokEndLoc}$l(s,p){if(s.start=p.start,this.options.locations)s.loc.start=p.loc.start}$4(s=!1){let p=this.startNode();return p.typeAnnotation=this.$9(()=>(this.next(),s?this.$20():this.$0())),this.finishNode(p,"TSTypeAnnotation")}$g(s,p){if(p&&this.eat(t.question))s.optional=!0,this.$17(s);if(this.type===t.colon)s.typeAnnotation=this.$4(),this.$17(s);return s}$20(){if(this.type!==t.name&&this.type!==t._this)return this.$0();if(this.isContextual("asserts")&&this.$a()&&i(this.$2())){let s=this.startNode();if(this.next(),s.parameterName=this.type===t._this?this.$u():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$v(s,!0);return s.asserts=!0,s.typeAnnotation=null,this.finishNode(s,"TSTypePredicate")}if(this.$3()==="is"&&this.$a()){let s=this.startNode();return s.parameterName=this.type===t._this?this.$u():this.parseIdent(!0),this.$v(s,!1)}return this.$0()}$v(s,p){this.next();let l=this.startNode();return l.typeAnnotation=this.$0(),s.typeAnnotation=this.finishNode(l,"TSTypeAnnotation"),s.asserts=p,this.finishNode(s,"TSTypePredicate")}$u(){let s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let s=this.$0();if(this.type!==t.eof)this.unexpected();return s}$0(){let s=this.$18();if(this.$5||this.type!==t._extends||this.hasPrecedingLineBreak())return s;let p=this.startNodeAt(s.start,s.loc?.start);return this.next(),p.checkType=s,p.extendsType=this.$h(!0,()=>this.$18()),this.expect(t.question),p.trueType=this.$h(!1,()=>this.$0()),this.expect(t.colon),p.falseType=this.$h(!1,()=>this.$0()),this.finishNode(p,"TSConditionalType")}$h(s,p){let l=this.$5;this.$5=s;let c=p();return this.$5=l,c}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===t._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",t.bitwiseOR,()=>this.$1a("TSIntersectionType",t.bitwiseAND,()=>this.$1b()))}$19(s){let p=this.startNode();if(s==="TSConstructorType"){if(p.abstract=this.isContextual("abstract"),p.abstract)this.next();this.next()}return this.$h(!1,()=>this.$m(p,t.arrow)),this.finishNode(p,s)}$m(s,p){if(this.$1())s.typeParameters=this.$7();if(this.expect(t.parenL),s.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===p)s.typeAnnotation=this.$4(!0);else if(p===t.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==t.parenL)return!1;return this.$t(()=>{if(this.next(),this.type===t.parenR||this.type===t.ellipsis)return!0;if(this.type===t.name||this.type===t._this)this.next();else if(this.type===t.braceL||this.type===t.bracketL)this.parseBindingAtom();else return!1;let s=this.type;if(s===t.colon||s===t.comma||s===t.question||s===t.eq)return!0;if(s!==t.parenR)return!1;return this.next(),this.type===t.arrow})}$1a(s,p,l){let c=this.startNode(),d=this.eat(p),f=[];do f.push(l());while(this.eat(p));if(f.length===1&&!d)return f[0];return c.types=f,this.finishNode(c,s)}$1b(){if(this.type===t.name&&!this.containsEsc){let s=this.value;if(s==="keyof"||s==="unique"||s==="readonly"){let p=this.startNode();return this.next(),p.operator=s,p.typeAnnotation=this.$1b(),this.finishNode(p,"TSTypeOperator")}if(s==="infer"){let p=this.startNode();this.next();let l=this.startNode();l.name=this.$w();let c=this.$f(()=>this.$22());if(c)l.constraint=c;return p.typeParameter=this.finishNode(l,"TSTypeParameter"),this.finishNode(p,"TSInferType")}}return this.$h(!1,()=>this.$23())}$22(){if(!this.eat(t._extends))return;let s=this.$h(!0,()=>this.$0());if(this.$5||this.type!==t.question)return s;return}$w(){if(this.type!==t.name&&!this.type.keyword)this.unexpected();let s=this.type===t.name?this.value:this.type.keyword;return this.next(),s}$23(){let s=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(t.bracketL)){let p=this.startNodeAt(s.start,s.loc?.start);if(this.eat(t.bracketR))p.elementType=s,s=this.finishNode(p,"TSArrayType");else p.objectType=s,p.indexType=this.$0(),this.expect(t.bracketR),s=this.finishNode(p,"TSIndexedAccessType")}return s}$24(){switch(this.type){case t.name:case t._void:case t._null:{let s=tf.get(this.value);if(s&&(this.type!==t.name||!this.containsEsc&&this.$2()!==ia)){let p=this.startNode();return this.next(),this.finishNode(p,s)}return this.$1c()}case t.string:case t.num:case t._true:case t._false:{let s=this.startNode();return s.literal=this.parseExprAtom(),this.finishNode(s,"TSLiteralType")}case t.plusMin:{if(this.value!=="-")break;let s=this.startNode(),p=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return p.operator="-",p.prefix=!0,p.argument=this.parseExprAtom(),s.literal=this.finishNode(p,"UnaryExpression"),this.finishNode(s,"TSLiteralType")}case t.backQuote:return this.$25();case t._this:{let s=this.$u();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let p=this.startNodeAt(s.start,s.loc?.start);return p.parameterName=s,this.$v(p,!1)}return s}case t._typeof:return this.$26();case t._import:return this.$1d();case t.braceL:return this.$27()?this.$28():this.$29();case t.bracketL:return this.$2a();case t.parenL:{let s=this.startNode();return this.next(),s.typeAnnotation=this.$0(),this.expect(t.parenR),this.finishNode(s,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let s=this.startNode();if(s.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSTypeReference")}$j(){let s=this.parseIdent(!0);while(this.eat(t.dot)){let p=this.startNodeAt(s.start,s.loc?.start);p.left=s,p.right=this.parseIdent(!0),s=this.finishNode(p,"TSQualifiedName")}return s}$26(){let s=this.startNode();if(this.next(),s.exprName=this.type===t._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSTypeQuery")}$1d(){let s=this.startNode();if(this.next(),s.argument=this.$1e(),this.eat(t.dot))s.qualifier=this.$j();if(this.$1())s.typeArguments=this.$e();return this.finishNode(s,"TSImportType")}$x(){if(this.type!==t.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(t.parenL);let s=this.$x();return this.expect(t.parenR),s}$25(){let s=this.startNode(),p=this.startNode();this.next(),p.expressions=[];let l=this.parseTemplateElement({isTagged:!1});p.quasis=[l];while(!l.tail){if(this.type===t.eof)this.raise(this.pos,"Unterminated template literal");this.expect(t.dollarBraceL),p.expressions.push(this.$0()),this.expect(t.braceR),l=this.parseTemplateElement({isTagged:!1}),p.quasis.push(l)}return this.next(),s.literal=this.finishNode(p,"TemplateLiteral"),this.finishNode(s,"TSLiteralType")}$27(){return this.$t(()=>{if(this.next(),this.type===t.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==t.bracketL)return!1;if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t._in})}$28(){let s=this.startNode();if(this.expect(t.braceL),this.type===t.plusMin)s.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))s.readonly=!0;this.expect(t.bracketL);let p=this.startNode();if(p.name=this.$w(),this.expect(t._in),p.constraint=this.$0(),s.typeParameter=this.finishNode(p,"TSTypeParameter"),s.nameType=this.eatContextual("as")?this.$0():null,this.expect(t.bracketR),this.type===t.plusMin)s.optional=this.value,this.next(),this.expect(t.question);else if(this.eat(t.question))s.optional=!0;if(this.eat(t.colon))s.typeAnnotation=this.$0();return this.semicolon(),this.expect(t.braceR),this.finishNode(s,"TSMappedType")}$29(){let s=this.startNode();return s.members=this.$1f(),this.finishNode(s,"TSTypeLiteral")}$1f(){this.expect(t.braceL);let s=[];while(!this.eat(t.braceR))s.push(this.$2b());return s}$2b(){let s=this.startNode(),p="TSPropertySignature",l=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())p="TSCallSignatureDeclaration",this.$m(s,t.colon);else if(l===ra||l===oa)p="TSConstructSignatureDeclaration",this.next(),this.$m(s,t.colon);else{let c=this.type===t._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$n(!0))this.next(),s.readonly=!0;if(this.type===t.bracketL&&this.$1g())return this.$1h(s);let d="method";if(c)s.key=c;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$n(!1))d=this.value,this.next();this.parsePropertyName(s)}if(this.eat(t.question))s.optional=!0;if(this.type===t.parenL||this.$1()){if(p="TSMethodSignature",d!=="method")s.kind=d;this.$m(s,t.colon),s.kind=d}else if(this.type===t.colon)s.typeAnnotation=this.$4()}return this.$1i(),this.finishNode(s,p)}$1i(){if(!this.eat(t.comma))this.semicolon()}$1g(){return this.$t(()=>{if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t.colon})}$1h(s){if(this.expect(t.bracketL),s.parameters=[this.$g(this.parseIdent(),!1)],this.expect(t.bracketR),this.type===t.colon)s.typeAnnotation=this.$4();return this.$1i(),this.finishNode(s,"TSIndexSignature")}$2a(){let s=this.startNode();this.expect(t.bracketL),s.elementTypes=[];while(!this.eat(t.bracketR))if(s.elementTypes.push(this.$2c()),this.type!==t.bracketR)this.expect(t.comma);return this.finishNode(s,"TSTupleType")}$2c(){let s=this.start,p=this.startLoc,l=this.eat(t.ellipsis),c;if((this.type===t.name||this.type.keyword)&&this.$2d()){let d=this.startNode();d.label=this.parseIdent(!0),d.optional=this.eat(t.question),this.expect(t.colon),d.elementType=this.$0(),c=this.finishNode(d,"TSNamedTupleMember")}else if(c=this.$0(),this.eat(t.question)){let d=this.startNodeAt(c.start,c.loc?.start);d.typeAnnotation=c,c=this.finishNode(d,"TSOptionalType")}if(l){let d=this.startNodeAt(s,p);d.typeAnnotation=c,c=this.finishNode(d,"TSRestType")}return c}$2d(){let s=this.$d();if(this.input.charCodeAt(s)===63)s=this.$d(s+1);return this.input.charCodeAt(s)===sa}$7(){return this.$9(()=>{let s=this.startNode();this.next(),s.params=[];while(!this.$c()){let p=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&i(this.$2()))p[this.value]=!0,this.next();if(p.name=this.$w(),this.eat(t._extends))p.constraint=this.$0();if(this.eat(t.eq))p.default=this.$0();if(s.params.push(this.finishNode(p,"TSTypeParameter")),!this.$c()){if(this.expect(t.comma),this.$c())s.extra={trailingComma:this.lastTokStart}}}if(this.next(),s.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(s,"TSTypeParameterDeclaration")})}$e(){return this.$9(()=>{let s=this.startNode();this.next(),s.params=[];while(!this.$c())if(s.params.push(this.$0()),!this.$c())this.expect(t.comma);if(s.params.length===0)this.unexpected();return this.next(),this.finishNode(s,"TSTypeParameterInstantiation")})}$1j(){let s=[];do{let p=this.startNode();if(p.expression=this.$j(),this.$1())p.typeParameters=this.$e();s.push(this.finishNode(p,"TSExpressionWithTypeArguments"))}while(this.eat(t.comma));return s}$1k(s=!1){if(this.type!==t.name||this.containsEsc){if(this.type===t._const&&this.$3()==="enum")return this.$y(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(s);return this.$1l(this.startNode(),this.value)}$2e(s){switch(s){case"interface":case"type":case"namespace":return this.$14();case"enum":return i(this.$2());case"abstract":return this.$a()&&this.$3()==="class";case"module":{let p=this.$2();return this.$a()&&(p===Qr||p===Zr||i(p))}case"declare":return this.$a()&&sf.has(this.$3());case"global":return this.$a()&&this.$2()===Tn}return!1}$1l(s,p){switch(p){case"interface":return this.$1m(s);case"type":return this.$2g(s);case"enum":return this.$y(s);case"abstract":return this.$1n(s,!0);case"global":return s.global=!0,s.id=this.parseIdent(),s.body=this.$z(),this.finishNode(s,"TSModuleDeclaration")}return this.$2h(s)}$2f(s){let p=this.$6;this.$6=!0;let l=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")l.const=!0;if(!s&&of.has(c))l.declare=!0;let d;if(l.const)d=this.$y(l);else if(c==="var"||c==="let"||c==="const")d=this.parseVarStatement(l,c,!0);else if(c==="function")this.next(),d=this.parseFunction(l,na,!1,!1);else if(c==="class")d=this.parseClass(l,!0);else d=this.$1l(l,c);return d.declare=!0,this.$6=p,d}$1n(s,p){return this.next(),s.abstract=!0,this.parseClass(s,p)}$1m(s){if(this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,ta),this.$1())s.typeParameters=this.$7();return this.$9(()=>{if(this.eat(t._extends))s.extends=this.$1j();let p=this.startNode();p.body=this.$1f(),s.body=this.finishNode(p,"TSInterfaceBody")}),this.finishNode(s,"TSInterfaceDeclaration")}$2g(s){if(this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,Xr),this.$1())s.typeParameters=this.$7();return s.typeAnnotation=this.$9(()=>(this.expect(t.eq),this.$0())),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}$y(s){if(this.type===t._const)s.const=!0,this.next();this.next(),s.id=this.parseIdent(),this.checkLValSimple(s.id,hf),this.expect(t.braceL),s.members=[];while(!this.eat(t.braceR)){let p=this.startNode();if(p.id=this.type===t.string?this.parseExprAtom():this.parseIdent(!0),this.eat(t.eq))p.initializer=this.parseMaybeAssign();if(s.members.push(this.finishNode(p,"TSEnumMember")),this.type!==t.braceR)this.expect(t.comma)}return this.finishNode(s,"TSEnumDeclaration")}$2h(s){if(this.next(),this.type===t.string){if(s.id=this.parseExprAtom(),this.type===t.braceL)s.body=this.$z();else this.semicolon();return this.finishNode(s,"TSModuleDeclaration")}return s.id=this.parseIdent(),this.checkLValSimple(s.id,ff),this.$1o(s)}$1o(s){if(this.eat(t.dot)){let p=this.startNode();p.id=this.parseIdent(),s.body=this.$1o(p)}else s.body=this.$z();return this.finishNode(s,"TSModuleDeclaration")}$z(){this.enterScope(pf);let s=this.startNode();this.enterScope(0),this.expect(t.braceL),s.body=[];while(!this.eat(t.braceR))s.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(s,"TSModuleBlock")}$1p(s,p){if(s.isExport=p,s.id=this.parseIdent(),this.checkLValSimple(s.id,Nt),this.expect(t.eq),this.isContextual("require")&&this.$2()===ra){let l=this.startNode();this.next(),l.expression=this.$1e(),s.moduleReference=this.finishNode(l,"TSExternalModuleReference")}else s.moduleReference=this.$j();return this.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}$2i(){let s=this.$d();if(this.input.charCodeAt(s)!==En)return!1;let p=this.input.charCodeAt(s+1);return p!==En&&p!==62}parseStatement(s,p,l){if(this.type===o)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(s,p,l)}parseVarStatement(s,p,l){return super.parseVarStatement(s,p,l||this.$6)}parseVarId(s,p){if(super.parseVarId(s,p),s.id.type==="Identifier"&&this.$s()&&!this.hasPrecedingLineBreak())this.next(),s.definite=!0;this.$g(s.id,!1)}parseCatchClauseParam(){let s=this.$g(this.parseBindingAtom(),!1),p=s.type==="Identifier";return this.enterScope(p?af:0),this.checkLValPattern(s,p?df:Nt),this.expect(t.parenR),s}parseImport(s){if(this.next(),s.importKind="value",this.type===t.string)s.specifiers=[],s.source=this.parseExprAtom();else{if(this.isContextual("type")){let p=this.$2();if(p===Tn||p===Yr||i(p)&&this.$3()!=="from")s.importKind="type",this.next()}if(this.type===t.name&&this.$2i())return this.$1p(s,!1);s.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),s.source=this.$x()}return this.$1r(s),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=t._with;return this.type===t._with?super.parseWithClause():void 0}$1r(s){let p=this.parseWithClause();if(p)s.attributes=p}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(s){return this.$1s("exportKind",()=>super.parseExportSpecifier(s))}$1s(s,p){let l=this.isContextual("type")?this.$2():-1;if(l===Qr||l===Zr||i(l)&&this.$3()!=="as"){let d=this.startNode();this.next();let f=p();return this.$l(f,d),f[s]="type",f}let c=p();return c[s]="value",c}parseExport(s,p){if(this.next(),this.eat(t._import)){if(s.importKind="value",this.isContextual("type")&&i(this.$2())&&this.$3()!=="from")s.importKind="type",this.next();return this.$1p(s,!0)}if(this.eat(t.eq))return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),s.id=this.parseIdent(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration");if(s.exportKind="value",this.isContextual("type")){let d=this.$2();if(d===Tn||d===Yr)s.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(s,p);if(this.eat(t._default)){if(this.isContextual("interface")&&this.$14())s.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")s.declaration=this.$1n(this.startNode(),"nullableID");else s.declaration=this.parseExportDefaultDeclaration();return this.finishNode(s,"ExportDefaultDeclaration")}let l=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(s.declaration=c??this.parseStatement(null),l||s.declaration.type==="TSInterfaceDeclaration"||s.declaration.type==="TSTypeAliasDeclaration")s.exportKind="type";return s.specifiers=[],s.source=null,this.finishNode(s,"ExportNamedDeclaration")}if(s.declaration=null,s.specifiers=this.parseExportSpecifiers(p),this.eatContextual("from"))s.source=this.$x(),this.$1r(s);else{for(let d of s.specifiers)if(this.checkUnreserved(d.local),this.checkLocalExport(d.local),d.local.type==="Literal")this.raise(d.local.start,"A string literal cannot be used as an exported binding without `from`.");s.source=null}return this.semicolon(),this.finishNode(s,"ExportNamedDeclaration")}parseFunction(s,p,l,c,d){let f=p&na;if(f)this.$i=s;super.parseFunction(s,p,l,c,d),this.$i=null;let h=!s.body;if(h)s.type="TSDeclareFunction";if(f&&s.id){if(h){if(this.$6&&this.currentScope().flags&ea)this.declareName(s.id.name,ii,s.id.start);this.checkLValSimple(s.id,lf)}else if(!(p&mf)){let g=uf;if(this.strict||s.generator||s.async)g=this.treatFunctionsAsVar?cf:Nt;this.checkLValSimple(s.id,g)}}return s}parseFunctionParams(s){if(this.$1())s.typeParameters=this.$7();if(super.parseFunctionParams(s),this.type===t.colon)s.returnType=this.$4(!0)}parseFunctionBody(s,p,l,c){if(l&&this.type===t.colon)s.returnType=this.$4(!0);if(p||this.type===t.braceL){super.parseFunctionBody(s,p,l,c);return}this.semicolon(),this.exitScope()}parseMethod(s,p,l){let c=this.$o;this.$o=null;let d=super.parseMethod(s,p,l);if(!d.body)d.type="TSDeclareMethod";if(c)d.typeParameters=c;return d}parseBindingList(s,p,l,c){let d=c===!0||this.$p;return this.$p=!1,super.parseBindingList(s,p,l,d)}$n(s){if(!s&&!this.$a())return!1;let p=this.$2();return p===bf||p===Tn||p===Yr||p===ia||p===xf||p===Qr||p===Zr||p>=48&&p<=57||i(p)}parseAssignableListItem(s){let p=this.$10(),l=this.start,c=this.startLoc,d,f=!1,h=!1;if(s)while(this.type===t.name&&rf.has(this.value)&&!this.containsEsc&&this.$n(!1)){if(this.value==="readonly")f=!0;else if(this.value==="override")h=!0;else d=this.value;this.next()}let g;if(this.type===t._this)g=this.startNode(),g.name="this",this.next(),this.finishNode(g,"Identifier");else g=this.parseBindingAtom();let m=this.type===t.eq?this.parseMaybeDefault(l,c,g):this.parseMaybeDefault(g.start,g.loc?.start,this.$g(g,!0));if(p.length>0)m.decorators=p;if(!d&&!f&&!h)return m;let y=this.startNodeAt(l,c);if(d)y.accessibility=d;if(f)y.readonly=!0;if(h)y.override=!0;return y.parameter=m,this.finishNode(y,"TSParameterProperty")}parseBindingListItem(s){if(s.type==="RestElement")this.$g(s,!0);return s}checkLValSimple(s,p,l){if(this.$i&&s===this.$i.id){this.$i=null;return}if(!p&&Zo.has(s.type)){this.checkLValSimple(s.expression,p,l);return}switch(s.type){case"TSParameterProperty":this.checkLValInnerPattern(s.parameter,p,l);return;case"Identifier":if(s.name==="this")return}super.checkLValSimple(s,p,l)}toAssignable(s,p,l){if(s&&!p&&Zo.has(s.type))return s;return super.toAssignable(s,p,l)}declareName(s,p,l){let c=this.currentScope();if(p&ii){this.$1t(c,s),c.$1u??=[],c.$1u.push(s);return}if(p===Xr||p===ta){if(c.$11??=[],p===Xr&&c.$11.includes(s))this.raise(l,`type '${s}' has already been declared.`);c.$11.push(s),this.$1t(c,s);return}if(p&wa){if(c.$1v??=[],c.$1v.includes(s))return;super.declareName(s,Nt,l),c.$1v.push(s);return}super.declareName(s,p,l)}$1t(s,p){if(this.inModule&&s.flags&ea)delete this.undefinedExports[p]}checkLocalExport(s){for(let p=this.scopeStack.length-1;p>=0;p--){let l=this.scopeStack[p];if(l.$11?.includes(s.name)||l.$1u?.includes(s.name))return}super.checkLocalExport(s)}checkExport(){}raiseRecoverable(s,p){if(p==="Duplicate constructor in the same class")return;super.raiseRecoverable(s,p)}$10(){let s=[];while(this.type===o)s.push(this.$1w());return s}$1q(s){let p=this.$b[this.$b.length-1];while(this.type===o)p.push(this.$1w());if(this.type===t._export){if(!s)this.unexpected()}else if(this.type!==t._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let s=this.startNode();this.next(),this.$b.push([]);let p=this.start,l=this.startLoc,c;if(this.type===t.parenL){if(this.next(),c=this.parseExpression(),this.expect(t.parenR),this.options.preserveParens){let f=this.startNodeAt(p,l);f.expression=c,c=this.finishNode(f,"ParenthesizedExpression")}}else{c=this.parseIdent(!1);while(this.eat(t.dot)){let f=this.startNodeAt(p,l);f.object=c,f.property=this.parseIdent(!0),f.computed=!1,c=this.finishNode(f,"MemberExpression")}}let d=this.$k()?this.$e():void 0;if(this.eat(t.parenL)){let f=this.startNodeAt(c.start,c.loc?.start);if(f.callee=c,f.arguments=this.parseExprList(t.parenR,!1,!1),d)f.typeArguments=d;c=this.finishNode(f,"CallExpression")}else if(d){let f=this.startNodeAt(c.start,c.loc?.start);f.expression=c,f.typeArguments=d,c=this.finishNode(f,"TSInstantiationExpression")}return s.expression=c,this.$b.pop(),this.finishNode(s,"Decorator")}shouldParseExportStatement(){return this.type===o||super.shouldParseExportStatement()}parseExprAtom(s,p,l){if(this.type===o)this.$1q(!1);return super.parseExprAtom(s,p,l)}parseProperty(s,p){if(s||this.type!==o)return super.parseProperty(s,p);let l=this.$10(),c=super.parseProperty(s,p);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=l,c}parseClassId(s,p){let l=this.$b.length-1,c=this.$b[l];if(c.length>0)s.decorators=c,this.$l(s,c[0]),this.$b[l]=[];if(!this.isContextual("implements")||p===!0)super.parseClassId(s,p);if(this.$1())s.typeParameters=this.$7()}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&this.$1())s.superTypeParameters=this.$e();if(this.eatContextual("implements"))s.implements=this.$9(()=>this.$1j())}parseClassElement(s){if(this.type===o){let h=this.$10();if(this.type===t.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let g=this.parseClassElement(s);return g.decorators=h,this.$l(g,h[0]),g}if(this.eat(t.semi))return null;let p=this.startNode();while(this.type===t.name&&nf.has(this.value)&&!this.containsEsc&&this.$n(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===t.braceL)return this.next(),this.parseClassStaticBlock(p),p;if(h==="public"||h==="private"||h==="protected")p.accessibility=h;else p[h]=!0}if(this.type===t.bracketL&&this.$1g())return this.$1h(p);p.static??=!1;let l="",c=!1,d=!1,f="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===t.star)&&!this.canInsertSemicolon())d=!0;else l="async";if(!l&&this.eat(t.star))c=!0;if(!l&&!d&&!c){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=h;else l=h}if(l)p.computed=!1,p.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),p.key.name=l,this.finishNode(p.key,"Identifier");else this.parseClassElementName(p);if(this.eat(t.question))p.optional=!0;if(this.type===t.parenL||this.$1()||f!=="method"||c||d){let h=p.key,g=!p.static&&!p.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(p.kind=g?"constructor":f,this.$1())p.typeParameters=this.$7();this.$p=g,this.parseClassMethod(p,c,d,g&&s)}else{if(!p.optional&&this.$s())this.next(),p.definite=!0;if(this.type===t.colon)p.typeAnnotation=this.$4();this.parseClassField(p)}return p}parseMaybeAssign(s,p,l){if(this.$k()){let c=this.$f(()=>{let d=this.$7(),f=super.parseMaybeAssign(s,p,l);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=d,this.$l(f,d),f});if(c)return c}return super.parseMaybeAssign(s,p,l)}parseMaybeUnary(s,p,l,c){if(this.$k()){let d=this.startNode();return d.typeAnnotation=this.$9(()=>{this.next();let f=this.$0();if(!this.$c())this.unexpected();return this.next(),f}),d.expression=this.parseMaybeUnary(null,!1,!1,c),this.finishNode(d,"TSTypeAssertion")}return super.parseMaybeUnary(s,p,l,c)}parseMaybeConditional(s,p){let l=this.start,c=this.startLoc,d=this.parseExprOps(s,p);if(this.checkExpressionErrors(p))return d;if(this.type===t.question&&!(d.type==="ArrowFunctionExpression"&&d.start===l)&&!this.$2j()){this.next();let f=this.startNodeAt(l,c);return f.test=d,f.consequent=this.parseMaybeAssign(),this.expect(t.colon),f.alternate=this.parseMaybeAssign(s),this.finishNode(f,"ConditionalExpression")}return d}$2j(){let s=this.$d(),p=this.input.charCodeAt(s);if(p===sa||p===yf||p===gf)return!0;return p===En&&this.input.charCodeAt(s+1)!==En}parseParenItem(s){return this.$g(s,!0)}$1x(){if(this.type!==t.colon)return!0;let s=this.$f(()=>{let p=this.$4(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?p:void 0});if(!s)return!1;return this.$8=s,!0}shouldParseArrow(s){return this.$1x()&&super.shouldParseArrow(s)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(s,p,l,c){if(this.$8)s.returnType=this.$8,this.$8=null;return super.parseArrowExpression(s,p,l,c)}parseExprList(s,p,l,c){if(!this.$q)return super.parseExprList(s,p,l,c);this.$q=!1;let d=[],f=!0;while(!this.eat(s)){if(f)f=!1;else if(this.expect(t.comma),p&&this.afterTrailingComma(s))break;if(this.type===t.ellipsis){let h=this.parseSpread(c);if(this.eat(t.question))h.optional=!0;if(this.type===t.colon)h.typeAnnotation=this.$4();d.push(h)}else d.push(this.parseMaybeAssign(!1,c,this.parseParenItem))}return d}parseSubscript(s,p,l,c,d,f,h){if(this.$s()&&!this.hasPrecedingLineBreak()){let m=this.startNodeAt(p,l);return this.exprAllowed=!1,this.next(),m.expression=s,this.finishNode(m,"TSNonNullExpression")}if(d&&this.$1()){let m=this.$f(()=>this.$2k(p,l,h));if(m)return m}let g=this.type===t.questionDot&&this.$2()===oa;if(this.$1()||g||this.type===t.bitShift&&this.value==="<<"){let m=this.$f(()=>{if(g)this.next();this.$k();let y=this.$e();if(this.type===t.parenL&&!c)return y;if(this.type===t.backQuote)return g?void 0:y;if(g)return;if(this.$c()||this.type===t.bitShift||this.type.startsExpr&&this.type!==t.parenL&&!this.hasPrecedingLineBreak())return;return y});if(m){let y=this.startNodeAt(p,l);if(this.type===t.parenL&&!c){if(this.next(),y.callee=s,y.arguments=this.parseExprList(t.parenR,!0,!1),y.typeArguments=m,g)s.optional=!0;if(g||f)y.optional=g;return this.finishNode(y,"CallExpression")}if(this.type===t.backQuote)return y.tag=s,y.quasi=this.parseTemplate({isTagged:!0}),y.typeArguments=m,this.finishNode(y,"TaggedTemplateExpression");return y.expression=s,y.typeArguments=m,this.finishNode(y,"TSInstantiationExpression")}}if(d&&this.type===t.parenL)this.$q=!0;return super.parseSubscript(s,p,l,c,d,f,h)}$2k(s,p,l){let c=this.startNodeAt(s,p);if(c.typeParameters=this.$7(),this.expect(t.parenL),c.params=this.parseBindingList(t.parenR,!1,!0),this.type===t.colon)c.returnType=this.$4(!0);if(this.type!==t.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(c,c.params,!0,l)}parseDynamicImport(s){if(this.next(),s.source=this.parseMaybeAssign(),this.eat(t.comma)&&this.type!==t.parenR)s.arguments=[this.parseExpression()];return this.expect(t.parenR),this.finishNode(s,"ImportExpression")}parseNew(){let s=super.parseNew();if(s.callee?.type!=="TSInstantiationExpression")return s;let p=this.startNodeAt(s.start,s.loc?.start);return p.callee=s.callee.expression,p.typeArguments=s.callee.typeArguments,p.arguments=s.arguments,this.finishNodeAt(p,"NewExpression",s.end,s.loc?.end)}parseExprOp(s,p,l,c,d){if(t._in.binop>c&&this.type===t.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let f=this.value==="satisfies",h=this.startNodeAt(p,l);return h.expression=s,h.typeAnnotation=this.$9(()=>{if(this.next(),!f&&this.type===t._const){let g=this.startNode();return g.typeName=this.parseIdent(!0),this.finishNode(g,"TSTypeReference")}return this.$0()}),this.finishNode(h,f?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,p,l,c,d)}return super.parseExprOp(s,p,l,c,d)}parseGetterSetter(s){s.kind=s.key.name,super.parseGetterSetter(s)}parsePropertyValue(s,p,l,c,d,f,h,g){if(!p&&this.$1()){if(this.$o=this.$7(),this.type!==t.parenL)this.unexpected();s.kind="init"}return super.parsePropertyValue(s,p,l,c,d,f,h,g)}}return a});var hi=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),Ef=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),Tf=new Set("get set new readonly static public private protected".split(" "));function Aa(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function _n(e){return e>=48&&e<=57}function Pa(e){return Aa(e)||_n(e)}class Da{text;pos=0;constructor(e){this.text=e}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let e=this.text,t=this.pos,n=e.charCodeAt(t);while(n===32||n===9)n=e.charCodeAt(++t);return this.pos=t,n}eat(e){if(this.peek()!==e.charCodeAt(0))return!1;return this.pos++,!0}word(){if(!Aa(this.peek()))return;let e=this.pos,t=e+1;while(Pa(this.text.charCodeAt(t)))t++;return this.pos=t,this.text.slice(e,t)}name(){let e=this.word();return e!==void 0&&!hi.has(e)}string(){let e=this.peek();if(e!==34&&e!==39)return!1;let t=this.text;for(let n=this.pos+1;n<t.length;n++){let r=t.charCodeAt(n);if(r===e)return this.pos=n+1,!0;if(r===92||r===10||r===13||r===8232||r===8233)return!1}return!1}number(){let e=this.text,t=this.pos;if(e.charCodeAt(t)===45)t++;let n=t;while(_n(e.charCodeAt(t)))t++;if(t===n||t-n>1&&e.charCodeAt(n)===48)return!1;if(e.charCodeAt(t)===46){let i=++t;while(_n(e.charCodeAt(t)))t++;if(t===i)return!1}let r=e.charCodeAt(t);if(Pa(r)||r===46)return!1;return this.pos=t,!0}type(){if(this.peek()===40){let e=this.pos;if(this.functionType())return!0;this.pos=e}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){let e=this.pos;if(this.word()==="keyof")return this.operatorType();if(this.pos=e,!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let e=this.peek();if(e===40)return this.pos++,this.type()&&this.eat(")");if(e===123)return this.objectType();if(e===91)return this.tupleType();if(e===34||e===39)return this.string();if(e===45||_n(e))return this.number();let t=this.word();if(t===void 0)return!1;if(t==="typeof")return this.typeQuery();if(t==="import")return this.importType(!0);if(Ef.has(t)){let n=this.peek();return n!==46&&n!==60}if(hi.has(t))return!1;while(this.eat("."))if(this.word()===void 0)return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){let e=this.pos;if(this.word()==="import")return this.importType(!1);this.pos=e;do if(!this.name())return!1;while(this.eat("."));return!0}importType(e){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!e||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let e=this.peek();if(this.eat("[")){let t=this.peek();if(t===34||t===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(e===34||e===39){if(!this.string())return!1}else{let t=this.word();if(t===void 0||Tf.has(t))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let e=new Set;for(;;){this.peek();let t=this.text.startsWith("...",this.pos);if(t)this.pos+=3;let n=this.word();if(n===void 0||hi.has(n)||e.has(n))return!1;if(e.add(n),!t)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(t||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Sf(e){return new Da(e).readAll()}var kf=j.extend(Ln);function Mt(e,t={}){return Sf(e)||Cf(e,t.inline??!1)}function Cf(e,t){let n=!1,r=new kf(t?{ecmaVersion:16,sourceType:"module",onComment:(i,o,a,s)=>{if(!i&&s===e.length)n=!0}}:{ecmaVersion:16,sourceType:"module"},e);try{return r.parseWholeType(),!n}catch(i){if(i instanceof SyntaxError)return!1;throw i}}var Rn="",Ce,jt=0;function La(e){Rn=e,Ce=void 0,jt=0}function Ie(e){if(!Ce){Ce=[0];let r=Rn.indexOf(`
34
+ `);while(r!==-1)Ce.push(r+1),r=Rn.indexOf(`
35
+ `,r+1)}let t=0,n=Ce.length-1;if(e>=Ce[jt])t=jt;else n=jt-1;if(t<n&&e<Ce[t+1])n=t;while(t<n){let r=t+n+1>>>1;if(Ce[r]<=e)t=r;else n=r-1}return jt=t,{line:t+1,column:e-Ce[t],character:e}}function qt(e){let{line:t,column:n}=Ie(e);return{line:t,column:n}}function wf(){return Rn.split(`
36
+ `)}var Pf=/^\t+/;class v extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(e,t,n){super(`${n}
37
+ https://svelte.dev/e/${t}`);this.code=t,this.reason=n;let r=typeof e==="number"?e:e?.start,i=typeof e==="number"?e:e?.end;if(r!==void 0)this.position=[r,i??r],this.start=Ie(this.position[0]),this.end=Ie(this.position[1]),this.frame=Af(this.start.line-1,this.end.column)}}var mi=(e)=>e.replace(Pf,(t)=>" ".repeat(t.length));function Af(e,t){let n=wf(),r=Math.max(0,e-2),i=Math.min(e+3,n.length),o=String(i+1).length;return n.slice(r,i).map((a,s)=>{let p=String(s+r+1).padStart(o," ");if(r+s!==e)return`${p}: ${mi(a)}`;let l=`${" ".repeat(o+2+mi(a.slice(0,t)).length)}^`;return`${p}: ${mi(a)}
38
+ ${l}`}).join(`
39
+ `)}function _a(e){throw new v(e,"attribute_duplicate","Attributes need to be unique")}function Ia(e){throw new v(e,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Ra(e,t){throw new v(e,"block_duplicate_clause",`${t} cannot appear more than once within a block`)}function Ma(e){throw new v(e,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function ja(e){throw new v(e,"block_invalid_elseif","'elseif' should be 'else if'")}function qa(e,t,n){throw new v(e,"block_invalid_placement",`{#${t} ...} block cannot be ${n}`)}function Ba(e){throw new v(e,"block_unclosed","Block was left open")}function Oa(e){throw new v(e,"block_unexpected_close","Unexpected block closing tag")}function Fa(e){throw new v(e,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function Va(e){throw new v(e,"css_empty_declaration","Declaration cannot be empty")}function bi(e){throw new v(e,"css_expected_identifier","Expected a valid CSS identifier")}function Ha(e){throw new v(e,"css_selector_invalid","Invalid selector")}function Ga(e){throw new v(e,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function xi(e){throw new v(e,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function za(e){throw new v(e,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Wa(e,t){throw new v(e,"directive_missing_name",`\`${t}\` name cannot be empty`)}function Ua(e,t){throw new v(e,"element_invalid_closing_tag",`\`</${t}>\` attempted to close an element that was not open`)}function Ja(e,t,n){throw new v(e,"element_invalid_closing_tag_autoclosed",`\`</${t}>\` attempted to close element that was already automatically closed by \`<${n}>\` (cannot nest \`<${n}>\` inside \`<${t}>\`)`)}function vi(e,t){throw new v(e,"element_unclosed",`\`<${t}>\` was left open`)}function Ei(e){throw new v(e,"expected_attribute_value","Expected attribute value")}function Ka(e){throw new v(e,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function Ti(e){throw new v(e,"expected_identifier","Expected an identifier")}function Xa(e){throw new v(e,"expected_pattern","Expected identifier or destructure pattern")}function Ya(e){throw new v(e,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function Re(e,t){throw new v(e,"expected_token",`Expected token ${t}`)}function Qa(e){throw new v(e,"expected_whitespace","Expected whitespace")}function Df(e,t){throw new v(e,"js_parse_error",`${t}`)}function Za(e){throw new v(e,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function ep(e){throw new v(e,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function tp(e,t){throw new v(e,"script_invalid_attribute_value",`If the \`${t}\` attribute is supplied, it must be a boolean attribute`)}function np(e){throw new v(e,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function rp(e,t){throw new v(e,"script_reserved_attribute",`The \`${t}\` attribute is reserved and cannot be used`)}function ip(e){throw new v(e,"style_duplicate","A component can have a single top-level `<style>` element")}function sp(e){throw new v(e,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function op(e){throw new v(e,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function Si(e){throw new v(e,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function ap(e,t){throw new v(e,"svelte_meta_duplicate",`A component can only have one \`<${t}>\` element`)}function pp(e,t){throw new v(e,"svelte_meta_invalid_content",`<${t}> cannot have children`)}function lp(e,t){throw new v(e,"svelte_meta_invalid_placement",`\`<${t}>\` tags cannot be inside elements or blocks`)}function cp(e,t){throw new v(e,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${t}`)}function up(e){throw new v(e,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function dp(e){throw new v(e,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function jn(e,t){throw new v(e,"svelte_options_invalid_attribute_value",`Value must be ${t}, if specified`)}function fp(e){throw new v(e,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function hp(e){throw new v(e,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function mp(e){throw new v(e,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function ki(e){throw new v(e,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function gp(e){throw new v(e,"svelte_options_reserved_tagname","Tag name is reserved")}function yp(e,t){throw new v(e,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${t}'`)}function bp(e){throw new v(e,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function xp(e,t,n){throw new v(e,"tag_invalid_placement",`{@${t} ...} tag cannot be ${n}`)}function oe(e){throw new v(e,"unexpected_eof","Unexpected end of input")}function vp(e,t){throw new v(e,"unexpected_reserved_word",`'${t}' is a reserved word in JavaScript and cannot be used here`)}function Ep(e){throw new v(e,"unterminated_string_constant","Unterminated string constant")}function Tp(e){throw new v(e,"void_element_invalid_content","Void elements cannot have children or closing tags")}function Mn(e){return typeof e==="object"&&e!==null&&"type"in e&&typeof e.type==="string"}function Sp(e){return e}function qn(e,t){let n=Sp(e);for(let r in n){let i=n[r];if(Array.isArray(i)){for(let o=0;o<i.length;o++)if(Mn(i[o]))i[o]=t(i[o])}else if(Mn(i))n[r]=t(i)}}function Bt(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}var it="",kp=[];function Nf(e,t){it=e,kp=t}function $f(e,t,n,r,i,o){let a=t;if(e&&a.includes(`
40
+ `)){let p=it.lastIndexOf(`
41
+ `,n-1)+1,l=p,c=it.charCodeAt(l);while(c===32||c===9)c=it.charCodeAt(++l);if(l>p)a=Lf(a,it.slice(p,l))}let s={type:e?"Block":"Line",value:a,start:n,end:r};if(i&&o)s.loc={start:i,end:o};kp.push(s)}function Lf(e,t){let n=e.startsWith(t)?t.length:0,r="",i=e.indexOf(`
42
+ `,n);while(i!==-1){if(r+=e.slice(n,i+1),n=i+1,e.startsWith(t,n))n+=t.length;i=e.indexOf(`
43
+ `,n)}return r+e.slice(n)}function _f(e,t,n){let r=0,i=t.length;while(r<i){let o=r+i>>>1;if(t[o].start<n)r=o+1;else i=o}if(r>=t.length)return;if(B=t.slice(r).map(({type:o,value:a,start:s,end:p})=>({type:o,value:a,start:s,end:p})),O=0,gi(e,void 0,!1),O<B.length&&(B[O].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(O<B.length)e.trailingComments.push(B[O++])}}var B=[],O=0,If=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function Na(e,t){for(let n=e;n<t;n++){let r=it.charCodeAt(n);if(r!==44&&r!==41&&r!==32&&r!==9)return!0}return!1}function gi(e,t,n){while(O<B.length&&B[O].start<e.start)e.leadingComments??=[],e.leadingComments.push(B[O++]);if(O>=B.length)return;let r=B[O].start;if(r<e.end||!Na(e.end,r)){let i=Sp(e),o=If.get(e.type),a=o===void 0?void 0:i[o],s=Array.isArray(a)&&a.length===0;for(let p in i){if(O>=B.length)return;if(p==="type")continue;let l=i[p];if(Array.isArray(l)){let c=p===o;for(let d=0;d<l.length;d++){let f=l[d];if(Mn(f))gi(f,e,c?d===l.length-1:s)}}else if(Mn(l))gi(l,e,s)}if(O>=B.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(O<B.length){if(t&&B[O].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(B[O++])}else if(e.end<=B[O].start&&!Na(e.end,B[O].start))e.trailingComments=[B[O++]]}var yi=!1,$a=new Map;function In(e){if(!(e instanceof RegExp))return e;let t=$a.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(r)=>n.has(r)},$a.set(e,t)}return t}var Cp=di((e)=>{let{keywordTypes:t,tokTypes:n}=e.acorn,r=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,t[i]]));return class extends e{constructor(i,o,a){super(i,o,a);this.keywords=In(this.keywords),this.reservedWords=In(this.reservedWords),this.reservedWordsStrict=In(this.reservedWordsStrict),this.reservedWordsStrictBind=In(this.reservedWordsStrictBind)}parseParenAndDistinguishExpression(i,o){let a=super.parseParenAndDistinguishExpression(i,o);if(a.type==="ParenthesizedExpression")yi=!0;return a}checkLocalExport(){}skipSpace(){let i=this.input,o=this.options.locations,a=this.pos,s=i.charCodeAt(a);for(;;)if(s===32||s===9)s=i.charCodeAt(++a);else if(s===10){if(s=i.charCodeAt(++a),o)this.curLine++,this.lineStart=a}else break;if(this.pos=a,s===47||s<33||s>=128)super.skipSpace()}readWord1(){let i=this.input,o=this.pos,a=o,s=i.charCodeAt(a);while(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===95||s===36)s=i.charCodeAt(++a);if(s>=128||s===92)return super.readWord1();return this.containsEsc=!1,this.pos=a,i.slice(o,a)}readWord(){let i=this.readWord1();return this.finishToken(r.get(i)??n.name,i)}}}),Rf=fi(Cp),Mf=fi(Ln,Cp),jf=/ \(\d+:\d+\)$/;function Bn(e){return e}function wp(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function Ci(e,t,n,r,i,o=e.root.comments.length){let a=e.root.comments;Nf(t,a);let s={onComment:$f,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:r};if(e.lfOnly)s.startLocation=Ie(n);let p;try{p=i(e.isTypeScript?Mf:Rf,s)}catch(l){if(!wp(l))throw l;Df(l.pos,l.message.replace(jf,""))}if(a.length>o)_f(Bn(p),a,n);return p}function Pp(e,t,n=0){return Bn(Ci(e,t,0,!1,(r,i)=>{if(n>0&&i.locations)i.startLocation=Ie(n);let o=new r(i,t,n).parse();return o.start=0,o},0))}var qf={count:0};function st(e,t,n,r=!1){qf.count+=1,yi=!1;let i=Bn(Ci(e,t,n,!0,(s,p)=>s.parseExpressionAt(t,n,p))),o=e.root.comments.at(-1),a=o&&o.end>i.end?o.end:i.end;return{node:yi&&!r?Dp(i):i,end:a}}function Ap(e,t,n){return Bn(Ci(e,t,n,!1,(r,i)=>{let o=new r(i,t,n);try{return o.nextToken(),o.parseStatement(null,!0,Object.create(null))}catch(a){if(wp(a)&&a.pos===t.length)oe(t.length);throw a}}))}function Dp(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return qn(t,Dp),t}var Np={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 Bf(e,t){return Object.hasOwn(Np,e)&&Np[e].includes(t)}var Xp=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),wi=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y,Of=/\r(?!\n)|[\u2028\u2029]/;function ze(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function Ft(e,t){let n=t;while(n<e.length&&ze(e.charCodeAt(n)))n++;return n}function Di(e,t){let n=e.codePointAt(t);if(n===void 0||!ce(n,!0))return t;let r=t+(n<=65535?1:2),i=e.codePointAt(r);while(i!==void 0&&Se(i,!0))r+=i<=65535?1:2,i=e.codePointAt(r);return r}function Ff(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){wi.lastIndex=t;let r=wi.exec(e);if(r){if(n===115)return r[2]==="ts";t=e.indexOf("<",wi.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}class Yp{source;index=0;loc;lfOnly;isTypeScript;css;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(e,t,n={}){this.source=e,this.loc=n.loc??!1,this.lfOnly=this.loc&&!Of.test(e),this.isTypeScript=Ff(e),this.css=n.css??!0,this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){return e.lastIndex=this.index,e.exec(this.source)?.[0]??null}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)Re(this.index,e);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)oe(this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,r=this.source.slice(this.index,n);return this.index=n,r}allowWhitespace(){this.index=Ft(this.source,this.index)}requireWhitespace(){if(!ze(this.source.charCodeAt(this.index)))Qa(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:Ie(e),end:Ie(t)}:void 0}readIdentifierName(){let e=this.index,t=Di(this.source,e),n=this.source.slice(e,t);if(this.index=t,Xp.has(n))vp(e,n);let r={type:"Identifier",name:n,start:e,end:t};if(this.loc)r.loc=this.sourceLocation(e,t);return r}current(){return this.stack[this.stack.length-1]}append(e){this.fragments[this.fragments.length-1].nodes.push(e)}open(e,t){this.append(e),this.stack.push(e),this.fragments.push(t)}setFragment(e){this.fragments[this.fragments.length-1]=e}close(){this.stack.pop(),this.fragments.pop()}}var Vf=["===","!==","==","!=","&&","||","??"];function Ni(e,t,n,r){return{type:"Literal",start:t,end:n,value:r,raw:e.slice(t,n)}}function $p(e,t){let n=e.charCodeAt(t);if(n===34||n===39){for(let i=t+1;i<e.length;i++){let o=e.charCodeAt(i);if(o===n)return Ni(e,t,i+1,e.slice(t+1,i));if(o===92||o===10||o===13)return null}return null}let r=t;for(;r<e.length;r++){let i=e.charCodeAt(r);if(i<48||i>57)break}if(r===t||n===48&&r-t>1)return null;return Ni(e,t,r,Number(e.slice(t,r)))}function Hf(e,t){let n=Di(e,t);if(n===t)return $p(e,t);let r=e.slice(t,n);if(r==="true"||r==="false"||r==="null")return Ni(e,t,n,r==="null"?null:r==="true");if(Xp.has(r))return null;let i={type:"Identifier",start:t,end:n,name:r};for(let o=n;;){let a=e.charCodeAt(o),s,p;if(a===46){if(p=Di(e,o+1),p===o+1)return null;s={type:"Identifier",start:o+1,end:p,name:e.slice(o+1,p)}}else if(a===91){if(s=$p(e,o+1),!s||e.charCodeAt(s.end)!==93)return null;p=s.end+1}else return i;i={type:"MemberExpression",start:t,end:p,object:i,property:s,computed:a===91,optional:!1},o=p}}function $i(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return Hf(e,t);let n=$i(e,Ft(e,t+1));if(!n)return null;return{type:"UnaryExpression",start:t,end:n.end,operator:"!",prefix:!0,argument:n}}function Lp(e,t){let n=Ft(e,t);if(n>=e.length)return!1;let r=e.charCodeAt(n);return r===125||r===41}function Gf(e,t){let n=$i(e,t);if(!n||Lp(e,n.end))return n;let r=Ft(e,n.end),i=Vf.find((s)=>e.startsWith(s,r));if(!i)return null;let o=$i(e,Ft(e,r+i.length));if(!o||!Lp(e,o.end))return null;let{end:a}=o;if(i==="&&"||i==="||"||i==="??")return{type:"LogicalExpression",start:n.start,end:a,left:n,operator:i,right:o};return{type:"BinaryExpression",start:n.start,end:a,left:n,operator:i,right:o}}function ot(e){if(e.loc={start:qt(e.start),end:qt(e.end)},e.type==="MemberExpression")ot(e.object),ot(e.property);else if(e.type==="UnaryExpression")ot(e.argument);else if(e.type==="BinaryExpression"||e.type==="LogicalExpression")ot(e.left),ot(e.right)}function K(e){let t=!e.loc||e.lfOnly?Gf(e.source,e.index):null;if(t){if(e.index=t.end,e.loc)ot(t);return t}let{node:n,end:r}=st(e,e.source,e.index);return e.index=r,n}var zf="AElig:5i AElig;:5i AMP:12 AMP;:12 Aacute:5d Aacute;:5d Abreve;:76 Acirc:5e Acirc;:5e Acy;:sw Afr;:2kn8 Agrave:5c Agrave;:5c Alpha;:pd Amacr;:74 And;:8cz Aogon;:78 Aopf;:2koo ApplyFunction;:6e9 Aring:5h Aring;:5h Ascr;:2kkc Assign;:6s4 Atilde:5f Atilde;:5f Auml:5g Auml;:5g Backslash;:6qe Barv;:8h3 Barwed;:6x2 Bcy;:sx Because;:6r9 Bernoullis;:6jw Beta;:pe Bfr;:2kn9 Bopf;:2kop Breve;:k8 Bscr;:6jw Bumpeq;:6ry CHcy;:tj COPY:4p COPY;:4p Cacute;:7a Cap;:6vm CapitalDifferentialD;:6kl Cayleys;:6jx Ccaron;:7g Ccedil:5j Ccedil;:5j Ccirc;:7c Cconint;:6r4 Cdot;:7e Cedilla;:54 CenterDot;:53 Cfr;:6jx Chi;:pz CircleDot;:6u1 CircleMinus;:6ty CirclePlus;:6tx CircleTimes;:6tz ClockwiseContourIntegral;:6r6 CloseCurlyDoubleQuote;:6cd CloseCurlyQuote;:6c9 Colon;:6rb Colone;:8dw Congruent;:6sh Conint;:6r3 ContourIntegral;:6r2 Copf;:6iq Coproduct;:6q8 CounterClockwiseContourIntegral;:6r7 Cross;:8bz Cscr;:2kke Cup;:6vn CupCap;:6rx DD;:6kl DDotrahd;:841 DJcy;:si DScy;:sl DZcy;:sv Dagger;:6ch Darr;:6n5 Dashv;:8h0 Dcaron;:7i Dcy;:t0 Del;:6pz Delta;:pg Dfr;:2knb DiacriticalAcute;:50 DiacriticalDot;:k9 DiacriticalDoubleAcute;:kd DiacriticalGrave;:2o DiacriticalTilde;:kc Diamond;:6v8 DifferentialD;:6km Dopf;:2kor Dot;:4o DotDot;:6ho DotEqual;:6s0 DoubleContourIntegral;:6r3 DoubleDot;:4o DoubleDownArrow;:6oj DoubleLeftArrow;:6og DoubleLeftRightArrow;:6ok DoubleLeftTee;:8h0 DoubleLongLeftArrow;:7w8 DoubleLongLeftRightArrow;:7wa DoubleLongRightArrow;:7w9 DoubleRightArrow;:6oi DoubleRightTee;:6ug DoubleUpArrow;:6oh DoubleUpDownArrow;:6ol DoubleVerticalBar;:6qt DownArrow;:6mr DownArrowBar;:843 DownArrowUpArrow;:6ph DownBreve;:lt DownLeftRightVector;:85s DownLeftTeeVector;:866 DownLeftVector;:6nx DownLeftVectorBar;:85y DownRightTeeVector;:867 DownRightVector;:6o1 DownRightVectorBar;:85z DownTee;:6uc DownTeeArrow;:6nb Downarrow;:6oj Dscr;:2kkf Dstrok;:7k ENG;:96 ETH:5s ETH;:5s Eacute:5l Eacute;:5l Ecaron;:7u Ecirc:5m Ecirc;:5m Ecy;:tp Edot;:7q Efr;:2knc Egrave:5k Egrave;:5k Element;:6q0 Emacr;:7m EmptySmallSquare;:7i3 EmptyVerySmallSquare;:7fv Eogon;:7s Eopf;:2kos Epsilon;:ph Equal;:8dx EqualTilde;:6rm Equilibrium;:6oc Escr;:6k0 Esim;:8dv Eta;:pj Euml:5n Euml;:5n Exists;:6pv ExponentialE;:6kn Fcy;:tg Ffr;:2knd FilledSmallSquare;:7i4 FilledVerySmallSquare;:7fu Fopf;:2kot ForAll;:6ps Fouriertrf;:6k1 Fscr;:6k1 GJcy;:sj GT:1q GT;:1q Gamma;:pf Gammad;:rg Gbreve;:7y Gcedil;:82 Gcirc;:7w Gcy;:sz Gdot;:80 Gfr;:2kne Gg;:6vt Gopf;:2kou GreaterEqual;:6sl GreaterEqualLess;:6vv GreaterFullEqual;:6sn GreaterGreater;:8f6 GreaterLess;:6t3 GreaterSlantEqual;:8e6 GreaterTilde;:6sz Gscr;:2kki Gt;:6sr HARDcy;:tm Hacek;:jr Hat;:2m Hcirc;:84 Hfr;:6j0 HilbertSpace;:6iz Hopf;:6j1 HorizontalLine;:7b4 Hscr;:6iz Hstrok;:86 HumpDownHump;:6ry HumpEqual;:6rz IEcy;:t1 IJlig;:8i IOcy;:sh Iacute:5p Iacute;:5p Icirc:5q Icirc;:5q Icy;:t4 Idot;:8g Ifr;:6j5 Igrave:5o Igrave;:5o Im;:6j5 Imacr;:8a ImaginaryI;:6ko Implies;:6oi Int;:6r0 Integral;:6qz Intersection;:6v6 InvisibleComma;:6eb InvisibleTimes;:6ea Iogon;:8e Iopf;:2kow Iota;:pl Iscr;:6j4 Itilde;:88 Iukcy;:sm Iuml:5r Iuml;:5r Jcirc;:8k Jcy;:t5 Jfr;:2knh Jopf;:2kox Jscr;:2kkl Jsercy;:so Jukcy;:sk KHcy;:th KJcy;:ss Kappa;:pm Kcedil;:8m Kcy;:t6 Kfr;:2kni Kopf;:2koy Kscr;:2kkm LJcy;:sp LT:1o LT;:1o Lacute;:8p Lambda;:pn Lang;:7vu Laplacetrf;:6j6 Larr;:6n2 Lcaron;:8t Lcedil;:8r Lcy;:t7 LeftAngleBracket;:7vs LeftArrow;:6mo LeftArrowBar;:6p0 LeftArrowRightArrow;:6o6 LeftCeiling;:6x4 LeftDoubleBracket;:7vq LeftDownTeeVector;:869 LeftDownVector;:6o3 LeftDownVectorBar;:861 LeftFloor;:6x6 LeftRightArrow;:6ms LeftRightVector;:85q LeftTee;:6ub LeftTeeArrow;:6n8 LeftTeeVector;:862 LeftTriangle;:6uq LeftTriangleBar;:89b LeftTriangleEqual;:6us LeftUpDownVector;:85t LeftUpTeeVector;:868 LeftUpVector;:6nz LeftUpVectorBar;:860 LeftVector;:6nw LeftVectorBar;:85u Leftarrow;:6og Leftrightarrow;:6ok LessEqualGreater;:6vu LessFullEqual;:6sm LessGreater;:6t2 LessLess;:8f5 LessSlantEqual;:8e5 LessTilde;:6sy Lfr;:2knj Ll;:6vs Lleftarrow;:6oq Lmidot;:8v LongLeftArrow;:7w5 LongLeftRightArrow;:7w7 LongRightArrow;:7w6 Longleftarrow;:7w8 Longleftrightarrow;:7wa Longrightarrow;:7w9 Lopf;:2koz LowerLeftArrow;:6mx LowerRightArrow;:6mw Lscr;:6j6 Lsh;:6nk Lstrok;:8x Lt;:6sq Map;:83p Mcy;:t8 MediumSpace;:6e7 Mellintrf;:6k3 Mfr;:2knk MinusPlus;:6qb Mopf;:2kp0 Mscr;:6k3 Mu;:po NJcy;:sq Nacute;:8z Ncaron;:93 Ncedil;:91 Ncy;:t9 NegativeMediumSpace;:6bv NegativeThickSpace;:6bv NegativeThinSpace;:6bv NegativeVeryThinSpace;:6bv NestedGreaterGreater;:6sr NestedLessLess;:6sq NewLine;:a Nfr;:2knl NoBreak;:6e8 NonBreakingSpace;:4g Nopf;:6j9 Not;:8h8 NotCongruent;:6si NotCupCap;:6st NotDoubleVerticalBar;:6qu NotElement;:6q1 NotEqual;:6sg NotEqualTilde;:6rm NotExists;:6pw NotGreater;:6sv NotGreaterEqual;:6sx NotGreaterFullEqual;:6sn NotGreaterGreater;:6sr NotGreaterLess;:6t5 NotGreaterSlantEqual;:8e6 NotGreaterTilde;:6t1 NotHumpDownHump;:6ry NotHumpEqual;:6rz NotLeftTriangle;:6wa NotLeftTriangleBar;:89b NotLeftTriangleEqual;:6wc NotLess;:6su NotLessEqual;:6sw NotLessGreater;:6t4 NotLessLess;:6sq NotLessSlantEqual;:8e5 NotLessTilde;:6t0 NotNestedGreaterGreater;:8f6 NotNestedLessLess;:8f5 NotPrecedes;:6tc NotPrecedesEqual;:8fj NotPrecedesSlantEqual;:6w0 NotReverseElement;:6q4 NotRightTriangle;:6wb NotRightTriangleBar;:89c NotRightTriangleEqual;:6wd NotSquareSubset;:6tr NotSquareSubsetEqual;:6w2 NotSquareSuperset;:6ts NotSquareSupersetEqual;:6w3 NotSubset;:6te NotSubsetEqual;:6tk NotSucceeds;:6td NotSucceedsEqual;:8fk NotSucceedsSlantEqual;:6w1 NotSucceedsTilde;:6tb NotSuperset;:6tf NotSupersetEqual;:6tl NotTilde;:6rl NotTildeEqual;:6ro NotTildeFullEqual;:6rr NotTildeTilde;:6rt NotVerticalBar;:6qs Nscr;:2kkp Ntilde:5t Ntilde;:5t Nu;:pp OElig;:9e Oacute:5v Oacute;:5v Ocirc:5w Ocirc;:5w Ocy;:ta Odblac;:9c Ofr;:2knm Ograve:5u Ograve;:5u Omacr;:98 Omega;:q1 Omicron;:pr Oopf;:2kp2 OpenCurlyDoubleQuote;:6cc OpenCurlyQuote;:6c8 Or;:8d0 Oscr;:2kkq Oslash:60 Oslash;:60 Otilde:5x Otilde;:5x Otimes;:8c7 Ouml:5y Ouml;:5y OverBar;:6da OverBrace;:732 OverBracket;:71w OverParenthesis;:730 PartialD;:6pu Pcy;:tb Pfr;:2knn Phi;:py Pi;:ps PlusMinus;:4x Poincareplane;:6j0 Popf;:6jd Pr;:8fv Precedes;:6t6 PrecedesEqual;:8fj PrecedesSlantEqual;:6t8 PrecedesTilde;:6ta Prime;:6cz Product;:6q7 Proportion;:6rb Proportional;:6ql Pscr;:2kkr Psi;:q0 QUOT:y QUOT;:y Qfr;:2kno Qopf;:6je Qscr;:2kks RBarr;:840 REG:4u REG;:4u Racute;:9g Rang;:7vv Rarr;:6n4 Rarrtl;:846 Rcaron;:9k Rcedil;:9i Rcy;:tc Re;:6jg ReverseElement;:6q3 ReverseEquilibrium;:6ob ReverseUpEquilibrium;:86n Rfr;:6jg Rho;:pt RightAngleBracket;:7vt RightArrow;:6mq RightArrowBar;:6p1 RightArrowLeftArrow;:6o4 RightCeiling;:6x5 RightDoubleBracket;:7vr RightDownTeeVector;:865 RightDownVector;:6o2 RightDownVectorBar;:85x RightFloor;:6x7 RightTee;:6ua RightTeeArrow;:6na RightTeeVector;:863 RightTriangle;:6ur RightTriangleBar;:89c RightTriangleEqual;:6ut RightUpDownVector;:85r RightUpTeeVector;:864 RightUpVector;:6ny RightUpVectorBar;:85w RightVector;:6o0 RightVectorBar;:85v Rightarrow;:6oi Ropf;:6jh RoundImplies;:86o Rrightarrow;:6or Rscr;:6jf Rsh;:6nl RuleDelayed;:8ac SHCHcy;:tl SHcy;:tk SOFTcy;:to Sacute;:9m Sc;:8fw Scaron;:9s Scedil;:9q Scirc;:9o Scy;:td Sfr;:2knq ShortDownArrow;:6mr ShortLeftArrow;:6mo ShortRightArrow;:6mq ShortUpArrow;:6mp Sigma;:pv SmallCircle;:6qg Sopf;:2kp6 Sqrt;:6qi Square;:7fl SquareIntersection;:6tv SquareSubset;:6tr SquareSubsetEqual;:6tt SquareSuperset;:6ts SquareSupersetEqual;:6tu SquareUnion;:6tw Sscr;:2kku Star;:6va Sub;:6vk Subset;:6vk SubsetEqual;:6ti Succeeds;:6t7 SucceedsEqual;:8fk SucceedsSlantEqual;:6t9 SucceedsTilde;:6tb SuchThat;:6q3 Sum;:6q9 Sup;:6vl Superset;:6tf SupersetEqual;:6tj Supset;:6vl THORN:66 THORN;:66 TRADE;:6jm TSHcy;:sr TScy;:ti Tab;:9 Tau;:pw Tcaron;:9w Tcedil;:9u Tcy;:te Tfr;:2knr Therefore;:6r8 Theta;:pk ThickSpace;:6e7 ThinSpace;:6bt Tilde;:6rg TildeEqual;:6rn TildeFullEqual;:6rp TildeTilde;:6rs Topf;:2kp7 TripleDot;:6hn Tscr;:2kkv Tstrok;:9y Uacute:62 Uacute;:62 Uarr;:6n3 Uarrocir;:85l Ubrcy;:su Ubreve;:a4 Ucirc:63 Ucirc;:63 Ucy;:tf Udblac;:a8 Ufr;:2kns Ugrave:61 Ugrave;:61 Umacr;:a2 UnderBar;:2n UnderBrace;:733 UnderBracket;:71x UnderParenthesis;:731 Union;:6v7 UnionPlus;:6tq Uogon;:aa Uopf;:2kp8 UpArrow;:6mp UpArrowBar;:842 UpArrowDownArrow;:6o5 UpDownArrow;:6mt UpEquilibrium;:86m UpTee;:6ud UpTeeArrow;:6n9 Uparrow;:6oh Updownarrow;:6ol UpperLeftArrow;:6mu UpperRightArrow;:6mv Upsi;:r6 Upsilon;:px Uring;:a6 Uscr;:2kkw Utilde;:a0 Uuml:64 Uuml;:64 VDash;:6uj Vbar;:8h7 Vcy;:sy Vdash;:6uh Vdashl;:8h2 Vee;:6v5 Verbar;:6c6 Vert;:6c6 VerticalBar;:6qr VerticalLine;:3g VerticalSeparator;:7rs VerticalTilde;:6rk VeryThinSpace;:6bu Vfr;:2knt Vopf;:2kp9 Vscr;:2kkx Vvdash;:6ui Wcirc;:ac Wedge;:6v4 Wfr;:2knu Wopf;:2kpa Wscr;:2kky Xfr;:2knv Xi;:pq Xopf;:2kpb Xscr;:2kkz YAcy;:tr YIcy;:sn YUcy;:tq Yacute:65 Yacute;:65 Ycirc;:ae Ycy;:tn Yfr;:2knw Yopf;:2kpc Yscr;:2kl0 Yuml;:ag ZHcy;:t2 Zacute;:ah Zcaron;:al Zcy;:t3 Zdot;:aj ZeroWidthSpace;:6bv Zeta;:pi Zfr;:6js Zopf;:6jo Zscr;:2kl1 aacute:69 aacute;:69 abreve;:77 ac;:6ri acE;:6ri acd;:6rj acirc:6a acirc;:6a acute:50 acute;:50 acy;:ts aelig:6e aelig;:6e af;:6e9 afr;:2kny agrave:68 agrave;:68 alefsym;:6k5 aleph;:6k5 alpha;:q9 amacr;:75 amalg;:8cf amp:12 amp;:12 and;:6qv andand;:8d1 andd;:8d8 andslope;:8d4 andv;:8d6 ang;:6qo ange;:884 angle;:6qo angmsd;:6qp angmsdaa;:888 angmsdab;:889 angmsdac;:88a angmsdad;:88b angmsdae;:88c angmsdaf;:88d angmsdag;:88e angmsdah;:88f angrt;:6qn angrtvb;:6v2 angrtvbd;:87x angsph;:6qq angst;:5h angzarr;:70c aogon;:79 aopf;:2kpe ap;:6rs apE;:8ds apacir;:8dr ape;:6ru apid;:6rv apos;:13 approx;:6rs approxeq;:6ru aring:6d aring;:6d ascr;:2kl2 ast;:16 asymp;:6rs asympeq;:6rx atilde:6b atilde;:6b auml:6c auml;:6c awconint;:6r7 awint;:8b5 bNot;:8h9 backcong;:6rw backepsilon;:s6 backprime;:6d1 backsim;:6rh backsimeq;:6vh barvee;:6v1 barwed;:6x1 barwedge;:6x1 bbrk;:71x bbrktbrk;:71y bcong;:6rw bcy;:tt bdquo;:6ce becaus;:6r9 because;:6r9 bemptyv;:88g bepsi;:s6 bernou;:6jw beta;:qa beth;:6k6 between;:6ss bfr;:2knz bigcap;:6v6 bigcirc;:7hr bigcup;:6v7 bigodot;:8ao bigoplus;:8ap bigotimes;:8aq bigsqcup;:8au bigstar;:7id bigtriangledown;:7gd bigtriangleup;:7g3 biguplus;:8as bigvee;:6v5 bigwedge;:6v4 bkarow;:83x blacklozenge;:8a3 blacksquare;:7fu blacktriangle;:7g4 blacktriangledown;:7ge blacktriangleleft;:7gi blacktriangleright;:7g8 blank;:74z blk12;:7f6 blk14;:7f5 blk34;:7f7 block;:7ew bne;:1p bnequiv;:6sh bnot;:6xc bopf;:2kpf bot;:6ud bottom;:6ud bowtie;:6vc boxDL;:7dj boxDR;:7dg boxDl;:7di boxDr;:7df boxH;:7dc boxHD;:7dy boxHU;:7e1 boxHd;:7dw boxHu;:7dz boxUL;:7dp boxUR;:7dm boxUl;:7do boxUr;:7dl boxV;:7dd boxVH;:7e4 boxVL;:7dv boxVR;:7ds boxVh;:7e3 boxVl;:7du boxVr;:7dr boxbox;:895 boxdL;:7dh boxdR;:7de boxdl;:7bk boxdr;:7bg boxh;:7b4 boxhD;:7dx boxhU;:7e0 boxhd;:7cc boxhu;:7ck boxminus;:6u7 boxplus;:6u6 boxtimes;:6u8 boxuL;:7dn boxuR;:7dk boxul;:7bs boxur;:7bo boxv;:7b6 boxvH;:7e2 boxvL;:7dt boxvR;:7dq boxvh;:7cs boxvl;:7c4 boxvr;:7bw bprime;:6d1 breve;:k8 brvbar:4m brvbar;:4m bscr;:2kl3 bsemi;:6dr bsim;:6rh bsime;:6vh bsol;:2k bsolb;:891 bsolhsub;:7uw bull;:6ci bullet;:6ci bump;:6ry bumpE;:8fi bumpe;:6rz bumpeq;:6rz cacute;:7b cap;:6qx capand;:8ck capbrcup;:8cp capcap;:8cr capcup;:8cn capdot;:8cg caps;:6qx caret;:6dd caron;:jr ccaps;:8ct ccaron;:7h ccedil:6f ccedil;:6f ccirc;:7d ccups;:8cs ccupssm;:8cw cdot;:7f cedil:54 cedil;:54 cemptyv;:88i cent:4i cent;:4i centerdot;:53 cfr;:2ko0 chcy;:uf check;:7pv checkmark;:7pv chi;:qv cir;:7gr cirE;:88z circ;:jq circeq;:6s7 circlearrowleft;:6nu circlearrowright;:6nv circledR;:4u circledS;:79k circledast;:6u3 circledcirc;:6u2 circleddash;:6u5 cire;:6s7 cirfnint;:8b4 cirmid;:8hb cirscir;:88y clubs;:7kz clubsuit;:7kz colon;:1m colone;:6s4 coloneq;:6s4 comma;:18 commat;:1s comp;:6pt compfn;:6qg complement;:6pt complexes;:6iq cong;:6rp congdot;:8dp conint;:6r2 copf;:2kpg coprod;:6q8 copy:4p copy;:4p copysr;:6jb crarr;:6np cross;:7pz cscr;:2kl4 csub;:8gf csube;:8gh csup;:8gg csupe;:8gi ctdot;:6wf cudarrl;:854 cudarrr;:851 cuepr;:6vy cuesc;:6vz cularr;:6nq cularrp;:859 cup;:6qy cupbrcap;:8co cupcap;:8cm cupcup;:8cq cupdot;:6tp cupor;:8cl cups;:6qy curarr;:6nr curarrm;:858 curlyeqprec;:6vy curlyeqsucc;:6vz curlyvee;:6vi curlywedge;:6vj curren:4k curren;:4k curvearrowleft;:6nq curvearrowright;:6nr cuvee;:6vi cuwed;:6vj cwconint;:6r6 cwint;:6r5 cylcty;:6y5 dArr;:6oj dHar;:86d dagger;:6cg daleth;:6k8 darr;:6mr dash;:6c0 dashv;:6ub dbkarow;:83z dblac;:kd dcaron;:7j dcy;:tw dd;:6km ddagger;:6ch ddarr;:6oa ddotseq;:8dz deg:4w deg;:4w delta;:qc demptyv;:88h dfisht;:873 dfr;:2ko1 dharl;:6o3 dharr;:6o2 diam;:6v8 diamond;:6v8 diamondsuit;:7l2 diams;:7l2 die;:4o digamma;:rh disin;:6wi div;:6v divide:6v divide;:6v divideontimes;:6vb divonx;:6vb djcy;:uq dlcorn;:6xq dlcrop;:6x9 dollar;:10 dopf;:2kph dot;:k9 doteq;:6s0 doteqdot;:6s1 dotminus;:6rc dotplus;:6qc dotsquare;:6u9 doublebarwedge;:6x2 downarrow;:6mr downdownarrows;:6oa downharpoonleft;:6o3 downharpoonright;:6o2 drbkarow;:840 drcorn;:6xr drcrop;:6x8 dscr;:2kl5 dscy;:ut dsol;:8ae dstrok;:7l dtdot;:6wh dtri;:7gf dtrif;:7ge duarr;:6ph duhar;:86n dwangle;:886 dzcy;:v3 dzigrarr;:7wf eDDot;:8dz eDot;:6s1 eacute:6h eacute;:6h easter;:8dq ecaron;:7v ecir;:6s6 ecirc:6i ecirc;:6i ecolon;:6s5 ecy;:ul edot;:7r ee;:6kn efDot;:6s2 efr;:2ko2 eg;:8ey egrave:6g egrave;:6g egs;:8eu egsdot;:8ew el;:8ex elinters;:73b ell;:6j7 els;:8et elsdot;:8ev emacr;:7n empty;:6px emptyset;:6px emptyv;:6px emsp13;:6bo emsp14;:6bp emsp;:6bn eng;:97 ensp;:6bm eogon;:7t eopf;:2kpi epar;:6vp eparsl;:89v eplus;:8dt epsi;:qd epsilon;:qd epsiv;:s5 eqcirc;:6s6 eqcolon;:6s5 eqsim;:6rm eqslantgtr;:8eu eqslantless;:8et equals;:1p equest;:6sf equiv;:6sh equivDD;:8e0 eqvparsl;:89x erDot;:6s3 erarr;:86p escr;:6jz esdot;:6s0 esim;:6rm eta;:qf eth:6o eth;:6o euml:6j euml;:6j euro;:6gc excl;:x exist;:6pv expectation;:6k0 exponentiale;:6kn fallingdotseq;:6s2 fcy;:uc female;:7k0 ffilig;:1dkz fflig;:1dkw ffllig;:1dl0 ffr;:2ko3 filig;:1dkx fjlig;:2u flat;:7l9 fllig;:1dky fltns;:7g1 fnof;:b6 fopf;:2kpj forall;:6ps fork;:6vo forkv;:8gp fpartint;:8b1 frac12:59 frac12;:59 frac13;:6kz frac14:58 frac14;:58 frac15;:6l1 frac16;:6l5 frac18;:6l7 frac23;:6l0 frac25;:6l2 frac34:5a frac34;:5a frac35;:6l3 frac38;:6l8 frac45;:6l4 frac56;:6l6 frac58;:6l9 frac78;:6la frasl;:6dg frown;:6xu fscr;:2kl7 gE;:6sn gEl;:8ek gacute;:dx gamma;:qb gammad;:rh gap;:8ee gbreve;:7z gcirc;:7x gcy;:tv gdot;:81 ge;:6sl gel;:6vv geq;:6sl geqq;:6sn geqslant;:8e6 ges;:8e6 gescc;:8fd gesdot;:8e8 gesdoto;:8ea gesdotol;:8ec gesl;:6vv gesles;:8es gfr;:2ko4 gg;:6sr ggg;:6vt gimel;:6k7 gjcy;:ur gl;:6t3 glE;:8eq gla;:8f9 glj;:8f8 gnE;:6sp gnap;:8ei gnapprox;:8ei gne;:8eg gneq;:8eg gneqq;:6sp gnsim;:6w7 gopf;:2kpk grave;:2o gscr;:6iy gsim;:6sz gsime;:8em gsiml;:8eo gt:1q gt;:1q gtcc;:8fb gtcir;:8e2 gtdot;:6vr gtlPar;:87p gtquest;:8e4 gtrapprox;:8ee gtrarr;:86w gtrdot;:6vr gtreqless;:6vv gtreqqless;:8ek gtrless;:6t3 gtrsim;:6sz gvertneqq;:6sp gvnE;:6sp hArr;:6ok hairsp;:6bu half;:59 hamilt;:6iz hardcy;:ui harr;:6ms harrcir;:85k harrw;:6nh hbar;:6j3 hcirc;:85 hearts;:7l1 heartsuit;:7l1 hellip;:6cm hercon;:6ux hfr;:2ko5 hksearow;:84l hkswarow;:84m hoarr;:6pr homtht;:6rf hookleftarrow;:6nd hookrightarrow;:6ne hopf;:2kpl horbar;:6c5 hscr;:2kl9 hslash;:6j3 hstrok;:87 hybull;:6df hyphen;:6c0 iacute:6l iacute;:6l ic;:6eb icirc:6m icirc;:6m icy;:u0 iecy;:tx iexcl:4h iexcl;:4h iff;:6ok ifr;:2ko6 igrave:6k igrave;:6k ii;:6ko iiiint;:8b0 iiint;:6r1 iinfin;:89o iiota;:6jt ijlig;:8j imacr;:8b image;:6j5 imagline;:6j4 imagpart;:6j5 imath;:8h imof;:6uv imped;:c5 in;:6q0 incare;:6it infin;:6qm infintie;:89p inodot;:8h int;:6qz intcal;:6uy integers;:6jo intercal;:6uy intlarhk;:8bb intprod;:8cc iocy;:up iogon;:8f iopf;:2kpm iota;:qh iprod;:8cc iquest:5b iquest;:5b iscr;:2kla isin;:6q0 isinE;:6wp isindot;:6wl isins;:6wk isinsv;:6wj isinv;:6q0 it;:6ea itilde;:89 iukcy;:uu iuml:6n iuml;:6n jcirc;:8l jcy;:u1 jfr;:2ko7 jmath;:fr jopf;:2kpn jscr;:2klb jsercy;:uw jukcy;:us kappa;:qi kappav;:s0 kcedil;:8n kcy;:u2 kfr;:2ko8 kgreen;:8o khcy;:ud kjcy;:v0 kopf;:2kpo kscr;:2klc lAarr;:6oq lArr;:6og lAtail;:84b lBarr;:83y lE;:6sm lEg;:8ej lHar;:86a lacute;:8q laemptyv;:88k lagran;:6j6 lambda;:qj lang;:7vs langd;:87l langle;:7vs lap;:8ed laquo:4r laquo;:4r larr;:6mo larrb;:6p0 larrbfs;:84f larrfs;:84d larrhk;:6nd larrlp;:6nf larrpl;:855 larrsim;:86r larrtl;:6n6 lat;:8ff latail;:849 late;:8fh lates;:8fh lbarr;:83w lbbrk;:7si lbrace;:3f lbrack;:2j lbrke;:87f lbrksld;:87j lbrkslu;:87h lcaron;:8u lcedil;:8s lceil;:6x4 lcub;:3f lcy;:u3 ldca;:852 ldquo;:6cc ldquor;:6ce ldrdhar;:86f ldrushar;:85n ldsh;:6nm le;:6sk leftarrow;:6mo leftarrowtail;:6n6 leftharpoondown;:6nx leftharpoonup;:6nw leftleftarrows;:6o7 leftrightarrow;:6ms leftrightarrows;:6o6 leftrightharpoons;:6ob leftrightsquigarrow;:6nh leftthreetimes;:6vf leg;:6vu leq;:6sk leqq;:6sm leqslant;:8e5 les;:8e5 lescc;:8fc lesdot;:8e7 lesdoto;:8e9 lesdotor;:8eb lesg;:6vu lesges;:8er lessapprox;:8ed lessdot;:6vq lesseqgtr;:6vu lesseqqgtr;:8ej lessgtr;:6t2 lesssim;:6sy lfisht;:870 lfloor;:6x6 lfr;:2ko9 lg;:6t2 lgE;:8ep lhard;:6nx lharu;:6nw lharul;:86i lhblk;:7es ljcy;:ux ll;:6sq llarr;:6o7 llcorner;:6xq llhard;:86j lltri;:7i2 lmidot;:8w lmoust;:71s lmoustache;:71s lnE;:6so lnap;:8eh lnapprox;:8eh lne;:8ef lneq;:8ef lneqq;:6so lnsim;:6w6 loang;:7vw loarr;:6pp lobrk;:7vq longleftarrow;:7w5 longleftrightarrow;:7w7 longmapsto;:7wc longrightarrow;:7w6 looparrowleft;:6nf looparrowright;:6ng lopar;:879 lopf;:2kpp loplus;:8bx lotimes;:8c4 lowast;:6qf lowbar;:2n loz;:7gq lozenge;:7gq lozf;:8a3 lpar;:14 lparlt;:87n lrarr;:6o6 lrcorner;:6xr lrhar;:6ob lrhard;:86l lrm;:6by lrtri;:6v3 lsaquo;:6d5 lscr;:2kld lsh;:6nk lsim;:6sy lsime;:8el lsimg;:8en lsqb;:2j lsquo;:6c8 lsquor;:6ca lstrok;:8y lt:1o lt;:1o ltcc;:8fa ltcir;:8e1 ltdot;:6vq lthree;:6vf ltimes;:6vd ltlarr;:86u ltquest;:8e3 ltrPar;:87q ltri;:7gj ltrie;:6us ltrif;:7gi lurdshar;:85m luruhar;:86e lvertneqq;:6so lvnE;:6so mDDot;:6re macr:4v macr;:4v male;:7k2 malt;:7q8 maltese;:7q8 map;:6na mapsto;:6na mapstodown;:6nb mapstoleft;:6n8 mapstoup;:6n9 marker;:7fy mcomma;:8bt mcy;:u4 mdash;:6c4 measuredangle;:6qp mfr;:2koa mho;:6jr micro:51 micro;:51 mid;:6qr midast;:16 midcir;:8hc middot:53 middot;:53 minus;:6qa minusb;:6u7 minusd;:6rc minusdu;:8bu mlcp;:8gr mldr;:6cm mnplus;:6qb models;:6uf mopf;:2kpq mp;:6qb mscr;:2kle mstpos;:6ri mu;:qk multimap;:6uw mumap;:6uw nGg;:6vt nGt;:6sr nGtv;:6sr nLeftarrow;:6od nLeftrightarrow;:6oe nLl;:6vs nLt;:6sq nLtv;:6sq nRightarrow;:6of nVDash;:6un nVdash;:6um nabla;:6pz nacute;:90 nang;:6qo nap;:6rt napE;:8ds napid;:6rv napos;:95 napprox;:6rt natur;:7la natural;:7la naturals;:6j9 nbsp:4g nbsp;:4g nbump;:6ry nbumpe;:6rz ncap;:8cj ncaron;:94 ncedil;:92 ncong;:6rr ncongdot;:8dp ncup;:8ci ncy;:u5 ndash;:6c3 ne;:6sg neArr;:6on nearhk;:84k nearr;:6mv nearrow;:6mv nedot;:6s0 nequiv;:6si nesear;:84o nesim;:6rm nexist;:6pw nexists;:6pw nfr;:2kob ngE;:6sn nge;:6sx ngeq;:6sx ngeqq;:6sn ngeqslant;:8e6 nges;:8e6 ngsim;:6t1 ngt;:6sv ngtr;:6sv nhArr;:6oe nharr;:6ni nhpar;:8he ni;:6q3 nis;:6ws nisd;:6wq niv;:6q3 njcy;:uy nlArr;:6od nlE;:6sm nlarr;:6my nldr;:6cl nle;:6sw nleftarrow;:6my nleftrightarrow;:6ni nleq;:6sw nleqq;:6sm nleqslant;:8e5 nles;:8e5 nless;:6su nlsim;:6t0 nlt;:6su nltri;:6wa nltrie;:6wc nmid;:6qs nopf;:2kpr not:4s not;:4s notin;:6q1 notinE;:6wp notindot;:6wl notinva;:6q1 notinvb;:6wn notinvc;:6wm notni;:6q4 notniva;:6q4 notnivb;:6wu notnivc;:6wt npar;:6qu nparallel;:6qu nparsl;:8hp npart;:6pu npolint;:8b8 npr;:6tc nprcue;:6w0 npre;:8fj nprec;:6tc npreceq;:8fj nrArr;:6of nrarr;:6mz nrarrc;:84z nrarrw;:6n1 nrightarrow;:6mz nrtri;:6wb nrtrie;:6wd nsc;:6td nsccue;:6w1 nsce;:8fk nscr;:2klf nshortmid;:6qs nshortparallel;:6qu nsim;:6rl nsime;:6ro nsimeq;:6ro nsmid;:6qs nspar;:6qu nsqsube;:6w2 nsqsupe;:6w3 nsub;:6tg nsubE;:8g5 nsube;:6tk nsubset;:6te nsubseteq;:6tk nsubseteqq;:8g5 nsucc;:6td nsucceq;:8fk nsup;:6th nsupE;:8g6 nsupe;:6tl nsupset;:6tf nsupseteq;:6tl nsupseteqq;:8g6 ntgl;:6t5 ntilde:6p ntilde;:6p ntlg;:6t4 ntriangleleft;:6wa ntrianglelefteq;:6wc ntriangleright;:6wb ntrianglerighteq;:6wd nu;:ql num;:z numero;:6ja numsp;:6br nvDash;:6ul nvHarr;:83o nvap;:6rx nvdash;:6uk nvge;:6sl nvgt;:1q nvinfin;:89q nvlArr;:83m nvle;:6sk nvlt;:1o nvltrie;:6us nvrArr;:83n nvrtrie;:6ut nvsim;:6rg nwArr;:6om nwarhk;:84j nwarr;:6mu nwarrow;:6mu nwnear;:84n oS;:79k oacute:6r oacute;:6r oast;:6u3 ocir;:6u2 ocirc:6s ocirc;:6s ocy;:u6 odash;:6u5 odblac;:9d odiv;:8c8 odot;:6u1 odsold;:88s oelig;:9f ofcir;:88v ofr;:2koc ogon;:kb ograve:6q ograve;:6q ogt;:88x ohbar;:88l ohm;:q1 oint;:6r2 olarr;:6nu olcir;:88u olcross;:88r oline;:6da olt;:88w omacr;:99 omega;:qx omicron;:qn omid;:88m ominus;:6ty oopf;:2kps opar;:88n operp;:88p oplus;:6tx or;:6qw orarr;:6nv ord;:8d9 order;:6k4 orderof;:6k4 ordf:4q ordf;:4q ordm:56 ordm;:56 origof;:6uu oror;:8d2 orslope;:8d3 orv;:8d7 oscr;:6k4 oslash:6w oslash;:6w osol;:6u0 otilde:6t otilde;:6t otimes;:6tz otimesas;:8c6 ouml:6u ouml;:6u ovbar;:6yl par;:6qt para:52 para;:52 parallel;:6qt parsim;:8hf parsl;:8hp part;:6pu pcy;:u7 percnt;:11 period;:1a permil;:6cw perp;:6ud pertenk;:6cx pfr;:2kod phi;:qu phiv;:r9 phmmat;:6k3 phone;:7im pi;:qo pitchfork;:6vo piv;:ra planck;:6j3 planckh;:6j2 plankv;:6j3 plus;:17 plusacir;:8bn plusb;:6u6 pluscir;:8bm plusdo;:6qc plusdu;:8bp pluse;:8du plusmn:4x plusmn;:4x plussim;:8bq plustwo;:8br pm;:4x pointint;:8b9 popf;:2kpt pound:4j pound;:4j pr;:6t6 prE;:8fn prap;:8fr prcue;:6t8 pre;:8fj prec;:6t6 precapprox;:8fr preccurlyeq;:6t8 preceq;:8fj precnapprox;:8ft precneqq;:8fp precnsim;:6w8 precsim;:6ta prime;:6cy primes;:6jd prnE;:8fp prnap;:8ft prnsim;:6w8 prod;:6q7 profalar;:6y6 profline;:6xe profsurf;:6xf prop;:6ql propto;:6ql prsim;:6ta prurel;:6uo pscr;:2klh psi;:qw puncsp;:6bs qfr;:2koe qint;:8b0 qopf;:2kpu qprime;:6dz qscr;:2kli quaternions;:6j1 quatint;:8ba quest;:1r questeq;:6sf quot:y quot;:y rAarr;:6or rArr;:6oi rAtail;:84c rBarr;:83z rHar;:86c race;:6rh racute;:9h radic;:6qi raemptyv;:88j rang;:7vt rangd;:87m range;:885 rangle;:7vt raquo:57 raquo;:57 rarr;:6mq rarrap;:86t rarrb;:6p1 rarrbfs;:84g rarrc;:84z rarrfs;:84e rarrhk;:6ne rarrlp;:6ng rarrpl;:85h rarrsim;:86s rarrtl;:6n7 rarrw;:6n1 ratail;:84a ratio;:6ra rationals;:6je rbarr;:83x rbbrk;:7sj rbrace;:3h rbrack;:2l rbrke;:87g rbrksld;:87i rbrkslu;:87k rcaron;:9l rcedil;:9j rceil;:6x5 rcub;:3h rcy;:u8 rdca;:853 rdldhar;:86h rdquo;:6cd rdquor;:6cd rdsh;:6nn real;:6jg realine;:6jf realpart;:6jg reals;:6jh rect;:7fx reg:4u reg;:4u rfisht;:871 rfloor;:6x7 rfr;:2kof rhard;:6o1 rharu;:6o0 rharul;:86k rho;:qp rhov;:s1 rightarrow;:6mq rightarrowtail;:6n7 rightharpoondown;:6o1 rightharpoonup;:6o0 rightleftarrows;:6o4 rightleftharpoons;:6oc rightrightarrows;:6o9 rightsquigarrow;:6n1 rightthreetimes;:6vg ring;:ka risingdotseq;:6s3 rlarr;:6o4 rlhar;:6oc rlm;:6bz rmoust;:71t rmoustache;:71t rnmid;:8ha roang;:7vx roarr;:6pq robrk;:7vr ropar;:87a ropf;:2kpv roplus;:8by rotimes;:8c5 rpar;:15 rpargt;:87o rppolint;:8b6 rrarr;:6o9 rsaquo;:6d6 rscr;:2klj rsh;:6nl rsqb;:2l rsquo;:6c9 rsquor;:6c9 rthree;:6vg rtimes;:6ve rtri;:7g9 rtrie;:6ut rtrif;:7g8 rtriltri;:89a ruluhar;:86g rx;:6ji sacute;:9n sbquo;:6ca sc;:6t7 scE;:8fo scap;:8fs scaron;:9t sccue;:6t9 sce;:8fk scedil;:9r scirc;:9p scnE;:8fq scnap;:8fu scnsim;:6w9 scpolint;:8b7 scsim;:6tb scy;:u9 sdot;:6v9 sdotb;:6u9 sdote;:8di seArr;:6oo searhk;:84l searr;:6mw searrow;:6mw sect:4n sect;:4n semi;:1n seswar;:84p setminus;:6qe setmn;:6qe sext;:7qu sfr;:2kog sfrown;:6xu sharp;:7lb shchcy;:uh shcy;:ug shortmid;:6qr shortparallel;:6qt shy:4t shy;:4t sigma;:qr sigmaf;:qq sigmav;:qq sim;:6rg simdot;:8dm sime;:6rn simeq;:6rn simg;:8f2 simgE;:8f4 siml;:8f1 simlE;:8f3 simne;:6rq simplus;:8bo simrarr;:86q slarr;:6mo smallsetminus;:6qe smashp;:8c3 smeparsl;:89w smid;:6qr smile;:6xv smt;:8fe smte;:8fg smtes;:8fg softcy;:uk sol;:1b solb;:890 solbar;:6yn sopf;:2kpw spades;:7kw spadesuit;:7kw spar;:6qt sqcap;:6tv sqcaps;:6tv sqcup;:6tw sqcups;:6tw sqsub;:6tr sqsube;:6tt sqsubset;:6tr sqsubseteq;:6tt sqsup;:6ts sqsupe;:6tu sqsupset;:6ts sqsupseteq;:6tu squ;:7fl square;:7fl squarf;:7fu squf;:7fu srarr;:6mq sscr;:2klk ssetmn;:6qe ssmile;:6xv sstarf;:6va star;:7ie starf;:7id straightepsilon;:s5 straightphi;:r9 strns;:4v sub;:6te subE;:8g5 subdot;:8fx sube;:6ti subedot;:8g3 submult;:8g1 subnE;:8gb subne;:6tm subplus;:8fz subrarr;:86x subset;:6te subseteq;:6ti subseteqq;:8g5 subsetneq;:6tm subsetneqq;:8gb subsim;:8g7 subsub;:8gl subsup;:8gj succ;:6t7 succapprox;:8fs succcurlyeq;:6t9 succeq;:8fk succnapprox;:8fu succneqq;:8fq succnsim;:6w9 succsim;:6tb sum;:6q9 sung;:7l6 sup1:55 sup1;:55 sup2:4y sup2;:4y sup3:4z sup3;:4z sup;:6tf supE;:8g6 supdot;:8fy supdsub;:8go supe;:6tj supedot;:8g4 suphsol;:7ux suphsub;:8gn suplarr;:86z supmult;:8g2 supnE;:8gc supne;:6tn supplus;:8g0 supset;:6tf supseteq;:6tj supseteqq;:8g6 supsetneq;:6tn supsetneqq;:8gc supsim;:8g8 supsub;:8gk supsup;:8gm swArr;:6op swarhk;:84m swarr;:6mx swarrow;:6mx swnwar;:84q szlig:67 szlig;:67 target;:6xi tau;:qs tbrk;:71w tcaron;:9x tcedil;:9v tcy;:ua tdot;:6hn telrec;:6xh tfr;:2koh there4;:6r8 therefore;:6r8 theta;:qg thetasym;:r5 thetav;:r5 thickapprox;:6rs thicksim;:6rg thinsp;:6bt thkap;:6rs thksim;:6rg thorn:72 thorn;:72 tilde;:kc times:5z times;:5z timesb;:6u8 timesbar;:8c1 timesd;:8c0 tint;:6r1 toea;:84o top;:6uc topbot;:6ye topcir;:8hd topf;:2kpx topfork;:8gq tosa;:84p tprime;:6d0 trade;:6jm triangle;:7g5 triangledown;:7gf triangleleft;:7gj trianglelefteq;:6us triangleq;:6sc triangleright;:7g9 trianglerighteq;:6ut tridot;:7ho trie;:6sc triminus;:8ca triplus;:8c9 trisb;:899 tritime;:8cb trpezium;:736 tscr;:2kll tscy;:ue tshcy;:uz tstrok;:9z twixt;:6ss twoheadleftarrow;:6n2 twoheadrightarrow;:6n4 uArr;:6oh uHar;:86b uacute:6y uacute;:6y uarr;:6mp ubrcy;:v2 ubreve;:a5 ucirc:6z ucirc;:6z ucy;:ub udarr;:6o5 udblac;:a9 udhar;:86m ufisht;:872 ufr;:2koi ugrave:6x ugrave;:6x uharl;:6nz uharr;:6ny uhblk;:7eo ulcorn;:6xo ulcorner;:6xo ulcrop;:6xb ultri;:7i0 umacr;:a3 uml:4o uml;:4o uogon;:ab uopf;:2kpy uparrow;:6mp updownarrow;:6mt upharpoonleft;:6nz upharpoonright;:6ny uplus;:6tq upsi;:qt upsih;:r6 upsilon;:qt upuparrows;:6o8 urcorn;:6xp urcorner;:6xp urcrop;:6xa uring;:a7 urtri;:7i1 uscr;:2klm utdot;:6wg utilde;:a1 utri;:7g5 utrif;:7g4 uuarr;:6o8 uuml:70 uuml;:70 uwangle;:887 vArr;:6ol vBar;:8h4 vBarv;:8h5 vDash;:6ug vangrt;:87w varepsilon;:s5 varkappa;:s0 varnothing;:6px varphi;:r9 varpi;:ra varpropto;:6ql varr;:6mt varrho;:s1 varsigma;:qq varsubsetneq;:6tm varsubsetneqq;:8gb varsupsetneq;:6tn varsupsetneqq;:8gc vartheta;:r5 vartriangleleft;:6uq vartriangleright;:6ur vcy;:tu vdash;:6ua vee;:6qw veebar;:6uz veeeq;:6sa vellip;:6we verbar;:3g vert;:3g vfr;:2koj vltri;:6uq vnsub;:6te vnsup;:6tf vopf;:2kpz vprop;:6ql vrtri;:6ur vscr;:2kln vsubnE;:8gb vsubne;:6tm vsupnE;:8gc vsupne;:6tn vzigzag;:87u wcirc;:ad wedbar;:8db wedge;:6qv wedgeq;:6s9 weierp;:6jc wfr;:2kok wopf;:2kq0 wp;:6jc wr;:6rk wreath;:6rk wscr;:2klo xcap;:6v6 xcirc;:7hr xcup;:6v7 xdtri;:7gd xfr;:2kol xhArr;:7wa xharr;:7w7 xi;:qm xlArr;:7w8 xlarr;:7w5 xmap;:7wc xnis;:6wr xodot;:8ao xopf;:2kq1 xoplus;:8ap xotime;:8aq xrArr;:7w9 xrarr;:7w6 xscr;:2klp xsqcup;:8au xuplus;:8as xutri;:7g3 xvee;:6v5 xwedge;:6v4 yacute:71 yacute;:71 yacy;:un ycirc;:af ycy;:uj yen:4l yen;:4l yfr;:2kom yicy;:uv yopf;:2kq2 yscr;:2klq yucy;:um yuml:73 yuml;:73 zacute;:ai zcaron;:am zcy;:tz zdot;:ak zeetrf;:6js zeta;:qe zfr;:2kon zhcy;:ty zigrarr;:6ot zopf;:2kq3 zscr;:2klr zwj;:6bx zwnj;:6bw",Wf=[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],Ot,Li=0;function Uf(){if(Ot)return Ot;Ot=new Map;for(let e of zf.split(" ")){let t=e.indexOf(":");Ot.set(e.slice(0,t),Number.parseInt(e.slice(t+1),36)),Li=Math.max(Li,t)}return Ot}var Ri=(e)=>e>=48&&e<=57,Jf=(e)=>Ri(e)||e>=65&&e<=70||e>=97&&e<=102,_p=(e)=>Ri(e)||e>=65&&e<=90||e>=97&&e<=122,Fn=0;function Kf(e,t,n){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,a=t+(o?2:1),s=a;while(s<e.length&&(o?Jf:Ri)(e.charCodeAt(s)))s++;if(s===a)return 0;return Fn=e.charCodeAt(s)===59?s+1:s,Number.parseInt(e.slice(a,s),o?16:10)}let r=Uf(),i=t;while(i-t<Li&&_p(e.charCodeAt(i)))i++;if(e.charCodeAt(i)===59){let o=r.get(e.slice(t,i+1));if(o!==void 0)return Fn=i+1,o}for(let o=i;o>t;o--){let a=r.get(e.slice(t,o));if(a===void 0)continue;if(n){let s=e.charCodeAt(o);if(_p(s)||s===95||s===61)continue}return Fn=o,a}return 0}function Xf(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return Wf[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 Mi(e,t){let n=e.indexOf("&");if(n===-1)return e;let r="",i=0;while(n!==-1){let o=Kf(e,n+1,t);if(o)r+=e.slice(i,n)+String.fromCodePoint(Xf(o,t)),i=Fn;n=e.indexOf("&",o?i:n+1)}return r+e.slice(i)}var Ip=/<\/script\s*>/g,Yf=new Set(["server","client","worker","test","default"]);function Qf(e,t,n){let{source:r,index:i}=e;if(i>=r.length)oe(r.length);Ip.lastIndex=i;let o=Ip.exec(r);if(!o)vi(r.length,"script");e.index=o.index+o[0].length;let a=Pp(e,r.slice(0,o.index),i);if(a.start=i,a.loc)Object.assign(a.loc.start,qt(t)),Object.assign(a.loc.end,qt(e.index));let s="default";for(let p of n){if(Yf.has(p.name))rp(p,p.name);if(p.name==="module"){if(p.value!==!0)tp(p,p.name);s="module"}if(p.name==="context"){let l=p.value;if(l===!0||!Array.isArray(l)||l.length!==1||l[0].type!=="Text"||l[0].data!=="module")np(p);s="module"}}return{type:"Script",start:t,end:e.index,context:s,content:a,attributes:n}}var Zf=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,eh=/\d+(\.\d+)?%/y,th=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,nh=/\s*>/y,Me=-1,ji=34,rh=35,ih=36,sh=38,qi=39,oh=40,ah=41,Vt=42,ph=43,lh=45,ch=46,Bi=47,_i=58,uh=59,Qp=60,Rp=61,dh=62,fh=91,Wn=92,hh=93,mh=94,Zp=123,Ii=124,gh=125,el=126,Vn=[];function yh(e,t,n){let r=e.index;Vn=[];let i=e.css?xh(e):bh(e),o=e.index;return e.eat("</style",!0),e.read(nh),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:i,comments:Vn,content:{start:r,end:o,styles:e.source.slice(r,o),comment:null}}}function bh(e){let{source:t,index:n}=e;while(n<t.length){let r=t.charCodeAt(n);if(r===Bi&&t.charCodeAt(n+1)===Vt){let i=t.indexOf("*/",n+2);n=i===-1?t.length:i+2}else if(r===ji||r===qi){n++;while(n<t.length){let i=t.charCodeAt(n);if(i===r||i===10)break;n+=i===Wn?2:1}n++}else if(r===Qp&&t.startsWith("</style",n))break;else n++}return e.index=Math.min(n,t.length),[]}function xh(e){let t=[];for(;;){if(at(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?tl(e):nl(e))}return t}function tl(e){let t=e.index;e.eat("@",!0);let n=Ge(e),r=Oi(e,!0),i=null;if(e.match("{"))i=sl(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:r,block:i}}function nl(e){let t=e.index;return{type:"Rule",prelude:rl(e,!1),block:sl(e),start:t,end:e.index}}function rl(e,t){let n=[];at(e,!0);let r=e.index;while(e.index<e.source.length){n.push(vh(e,t));let i=e.index;if(at(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:r,end:i,children:n};e.eat(",",!0),at(e,!0)}return oe(e.source.length)}function Mp(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function vh(e,t){let{source:n,index:r}=e,i=[],o=Mp(null,e.index);while(e.index<n.length){let a=e.index,s=n.charCodeAt(a),p=o.selectors;if(s===sh)e.index++,p.push({type:"NestingSelector",name:"&",start:a,end:e.index});else if(s===Vt)e.index++,p.push(jp(e,a,"*"));else if(s===rh)e.index++,p.push({type:"IdSelector",name:Ge(e),start:a,end:e.index});else if(s===ch)e.index++,p.push({type:"ClassSelector",name:Ge(e),start:a,end:e.index});else if(s===_i){let f=n.charCodeAt(a+1)===_i;e.index+=f?2:1;let h=Ge(e),g=null;if(e.eat("("))g=rl(e,!0),e.eat(")",!0);if(f)p.push({type:"PseudoElementSelector",name:h,start:a,end:e.index,...g&&{args:g}});else p.push({type:"PseudoClassSelector",name:h,args:g,start:a,end:e.index})}else if(s===fh)e.index++,p.push(Eh(e,a));else{let f=t?e.read(Zf):null,h=!f&&Hn(s)?e.read(eh):null;if(f)p.push({type:"Nth",value:f,start:a,end:e.index});else if(h)p.push({type:"Percentage",value:h,start:a,end:e.index});else if(il(n,a)===0){let g=Ge(e);p.push(jp(e,a,g))}}let l=e.index;at(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=l,c)return o.end=l,i.push(o),{type:"ComplexSelector",start:r,end:l,children:i};let d=Th(e);if(d){if(o.selectors.length>0)o.end=l,i.push(o);if(o=Mp(d,d.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))Ha(e.index)}}return oe(n.length)}function jp(e,t,n){let r=n,i;if(e.eat("|"))i=r,r=e.eat("*")?"*":Ge(e);return{type:"TypeSelector",name:r,...i!==void 0&&{namespace:i},start:t,end:e.index}}function Eh(e,t){let n=e.source;e.allowWhitespace();let r=Ge(e);e.allowWhitespace();let i=null,o=null,a=n.charCodeAt(e.index);if(a===Rp)o="=";else if((a===el||a===mh||a===ih||a===Vt||a===Ii)&&n.charCodeAt(e.index+1)===Rp)o=n.slice(e.index,e.index+2);if(o)e.index+=o.length,e.allowWhitespace(),i=wh(e);e.allowWhitespace();let s=e.index;while(al(n.charCodeAt(e.index)))e.index++;let p=e.index>s?n.slice(s,e.index):null;return e.allowWhitespace(),e.eat("]",!0),{type:"AttributeSelector",start:t,end:e.index,name:r,matcher:o,value:i,flags:p}}function il(e,t){let n=e.charCodeAt(t);if(n===ph||n===el||n===dh)return 1;if(n===Ii&&e.charCodeAt(t+1)===Ii)return 2;return 0}function Th(e){let t=e.index;e.allowWhitespace();let n=e.index,r=il(e.source,n);if(r>0){e.index+=r;let i=e.index;return e.allowWhitespace(),{type:"Combinator",name:e.source.slice(n,i),start:n,end:i}}if(e.index!==t)return{type:"Combinator",name:" ",start:t,end:e.index};return null}function sl(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(at(e,!0),e.match("}"))break;n.push(Sh(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function Sh(e){if(e.match("@"))return tl(e);let t=e.index;Oi(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===Zp?nl(e):kh(e)}function kh(e){let{source:t,index:n}=e;if(n>=t.length)oe(t.length);let r=n;while(r<t.length){let p=t.charCodeAt(r);if(p===_i||ze(p))break;r++}let i=t.slice(n,r);e.index=r,e.allowWhitespace(),e.eat(":");let o=e.index;e.allowWhitespace();let a=Oi(e,!0);if(!a&&!i.startsWith("--"))Va({start:n,end:o});let s=e.index;if(!e.match("}"))e.eat(";",!0);return{type:"Declaration",start:n,end:s,property:i,value:a}}function Oi(e,t){let n=e.source,r=n.length,i="",o=e.index,a=null,s=!1,p=!1,l=Me,c=e.index;while(c<r){let d=n.charCodeAt(c);if(s){s=!1,c++;continue}if(d===Wn){s=!0,c++;continue}if(d===l)l=Me;else if(d===ah)p=!1;else if(l===Me&&(d===ji||d===qi))l=d;else if(d===oh){if(Ch(n,i,o,c))p=!0}else if((d===uh||d===Zp||d===gh)&&!p&&l===Me){if(e.index=c,!t)return"";if(i+=n.slice(o,c),a){let f=i.length-i.trimStart().length;for(let h of a)h.position=Math.max(0,(h.position??0)-f)}return i.trim()}else if(d===Bi&&!p&&l===Me&&n.charCodeAt(c+1)===Vt){i+=n.slice(o,c),e.index=c;let f=ol(e);if(t)f.position=i.length,Vn.push(f),a??=[],a.push(f);c=e.index,o=c;continue}c++}return e.index=r,oe(r)}function Ch(e,t,n,r){if(r-n>=3)return e.charCodeAt(r-3)===117&&e.charCodeAt(r-2)===114&&e.charCodeAt(r-1)===108;return(t+e.slice(n,r)).endsWith("url")}function wh(e){let t=e.source,n=Me;if(e.eat('"'))n=ji;else if(e.eat("'"))n=qi;let r=e.index,i=!1,o=r;while(o<t.length){let a=t.charCodeAt(o);if(i)i=!1;else if(a===Wn)i=!0;else if(n===Me?a===hh||ze(a):a===n)return e.index=n===Me?o:o+1,t.slice(r,o).trim();o++}return e.index=o,oe(t.length)}function Ge(e){let{source:t,index:n}=e,r=t.charCodeAt(n);if(Hn(r)||r===lh&&Hn(t.charCodeAt(n+1)))bi(n);let i="",o=n,a=n;while(a<t.length){let s=t.charCodeAt(a);if(s===Wn){i+=t.slice(o,a),e.index=a;let p=e.matchRegex(th);if(p){let l=String.fromCodePoint(Number.parseInt(p.slice(1),16));i+=l==="\\"?"\\\\":l,a+=p.length}else i+=`\\${t[a+1]}`,a+=2;o=a}else if(s>=160||Ph(s))a++;else break}if(i+=t.slice(o,a),e.index=a,i==="")bi(n);return i}function at(e,t){let n=e.source;e.allowWhitespace();for(;;){let r=n.charCodeAt(e.index);if(r===Bi&&n.charCodeAt(e.index+1)===Vt){let i=ol(e);if(t)Vn.push(i)}else if(r===Qp&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function ol(e){let t=e.index;e.eat("/*",!0);let n=e.readUntil("*/");return e.eat("*/",!0),{type:"CSSComment",value:n,start:t,end:e.index}}function Hn(e){return e>=48&&e<=57}function al(e){return e>=65&&e<=90||e>=97&&e<=122}function Ph(e){return al(e)||Hn(e)||e===95||e===45}var Pi=/<\/textarea(\s[^>]*)?>/iy,Ah=/^![a-zA-Z]+$/,Dh=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Nh=/^[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,Ai="\\u200C\\u200D",$h=new RegExp(`^(?:\\p{Lu}[$${Ai}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Ai}\\p{ID_Continue}]*(?:\\.[$${Ai}\\p{ID_Continue}]+)+)$`,"u"),Lh=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),_h=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Fi=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]]]),qp=[...Fi.keys()],Ih=`${qp.slice(0,-1).join(", ")} or ${qp.at(-1)}`,pl=47,Gn=62,ll=61,Rh=34,Mh=39,Bp=123,pt=(e)=>e===Rh||e===Mh;function jh(e,t,n){let r=t;for(;r<e.length;r++){let i=e.charCodeAt(r);if(ze(i)||i===pl||i===Gn)break;if(n&&(pt(i)||i===ll))break}return r}function Un(e,t){let n=e.index;if(n>=e.source.length)oe(e.source.length);let r=jh(e.source,n,t);return e.index=r,{name:e.source.slice(n,r),start:n,end:r,loc:e.sourceLocation(n,r)}}var Ht=(e,t,n,r=n)=>({start:e,end:t,type:"Text",raw:n,data:r});function cl(e){return Lh.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function qh(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return $h.test(e)}function Bh(e){let t=!0;for(let n=0;n<e.length&&t;n++){let r=e.charCodeAt(n);t=r>=97&&r<=122||n>0&&r>=48&&r<=57}return t&&e.length>0||Ah.test(e)||Dh.test(e)||Nh.test(e)}function Op(e,t){for(let n=e.length-1;n>=0;n--){let r=t(e[n]);if(r!==void 0)return r}return!1}function Oh(e,t,n){let r=Fi.get(t);if(r)return r[0];if(n)return"Component";if(t==="title"){if(Op(e.stack,({type:i})=>{if(i==="SvelteHead")return!0;return i==="RegularElement"||i==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!Op(e.stack,(i)=>i.type==="RegularElement"&&i.attributes.some((o)=>o.type==="Attribute"&&o.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function Fh(e){let t=e.index++;if(e.eat("!--")){let n=e.readUntil("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:n})}else if(e.eat("/"))Vh(e,t);else Gh(e,t)}function Vh(e,t){let{name:n}=Un(e,!1);if(e.allowWhitespace(),e.eat(">",!0),cl(n))Tp(t);let r=e.current();while(!("name"in r)||r.name!==n){if(r.type!=="RegularElement"){let i=e.lastAutoClosedTag;if(i?.tag===n)Ja(t,n,i.reason);Ua(t,n)}r.end=t,e.close(),r=e.current()}if(r.end=e.index,e.close(),e.stack.length<(e.lastAutoClosedTag?.depth??0))e.lastAutoClosedTag=void 0}function Hh(e,t,n){return{type:e,start:t,end:-1,name:n}}function Gh(e,t){let n=Un(e,!1),{name:r}=n,i=Fi.get(r);if(!i&&r.startsWith("svelte:"))cp(n,Ih);let o=qh(r);if(!o&&!Bh(r))bp(n);if(i?.[1]){if(e.metaTags.has(r))ap(t,r);if(e.current().type!=="Root")lp(t,r);e.metaTags.add(r)}let a=Hh(Oh(e,r,o),t,r);if(e.loc)a.name_loc=n.loc;a.attributes=[],a.fragment={type:"Fragment",nodes:[]},e.allowWhitespace();let s=e.current();if(s.type==="RegularElement"&&Bf(s.name,r))s.end=t,e.close(),e.lastAutoClosedTag={tag:s.name,reason:r,depth:e.stack.length};if((r==="script"||r==="style")&&e.current().type==="Root"){let p=[];a.attributes=p,Gp(e,p,Xh),Wh(e,a,t,p);return}if(Gp(e,a.attributes,Qh),a.type==="SvelteComponent"){let p=Fp(a);if(!p)op(t);if(!Vp(p.value))sp(p.start);a.expression=Hp(p.value)}else if(a.type==="SvelteElement"){let p=Fp(a);if(!p)Si(t);if(p.value===!0)Si(p);a.tag=Vp(p.value)?Hp(p.value):Kh(p.value[0])}if(!e.eat("/")&&!cl(r))if(e.eat(">",!0),r==="textarea")a.fragment.nodes=dl(e,(p,l)=>(Pi.lastIndex=l,Pi.test(p)),"inside <textarea>"),e.read(Pi);else if(r==="script"||r==="style")a.fragment.nodes.push(zh(e,`</${r}>`));else{e.open(a,a.fragment);return}else e.eat(">",!0);a.end=e.index,e.append(a)}function zh(e,t){let n=e.index,r=e.source.indexOf(t,n);e.index=r===-1?e.source.length:r;let i=Ht(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),i}function Wh(e,t,n,r){e.eat(">",!0);let i=Uh(e.root.fragment.nodes,n);if(t.name==="style"){let s=yh(e,n,r);if(s.content.comment=i,e.root.css)ip(n);e.root.css=s;return}let o=Qf(e,n,r);if(i)o.content.leadingComments=[{type:"Line",value:i.data}];let a=o.context==="module"?"module":"instance";if(e.root[a])ep(n);e.root[a]=o}function Uh(e,t){let n=e.length-1;if(n<0||e[n].end!==t)return null;for(let r=n;r>=0;r--){let i=e[r];if(i.type==="Comment")return i;if(i.type!=="Text"||i.data.trim())return null}return null}var Jh=(e)=>e.type==="Attribute"&&e.name==="this";function Fp(e){let t=e.attributes.find(Jh);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function Vp(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function Hp(e){return(Array.isArray(e)?e[0]:e).expression}function Kh(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function Gp(e,t,n){let r=new Set;for(;;){let i=n(e);if(!i)return;let{type:o}=i;if(o==="Attribute"||o==="BindDirective"||o==="StyleDirective"||o==="ClassDirective"){let a=`${o==="BindDirective"?"Attribute":o}${i.name}`;if(r.has(a))_a(i);if(i.name!=="this")r.add(a)}t.push(i),e.allowWhitespace()}}function Vi(e,t,n,r,i){return e.loc?{type:"Attribute",start:n,end:r,name:t.name,name_loc:t.loc,value:i}:{type:"Attribute",start:n,end:r,name:t.name,value:i}}function ul(e){if(pt(e.source.charCodeAt(e.index)))Re(e.index,"=")}function Xh(e){let t=e.index,n=Un(e,!0);if(!n.name)return null;let r=!0;if(e.eat("=")){e.allowWhitespace();let{source:i}=e,o=e.index,a=-1;if(pt(i.charCodeAt(o))){let l=i.indexOf(i[o],o+1);if(l!==-1)a=l+1}if(a===-1){a=o;while(a<i.length&&i.charCodeAt(a)!==Gn&&!ze(i.charCodeAt(a)))a++;if(a===o)Ei(o)}e.index=a;let s=pt(i.charCodeAt(o))?1:0,p=i.slice(o+s,a-s);r=[Ht(a-p.length-s,a-s,p,Mi(p,!0))]}return ul(e),Vi(e,n,t,e.index,r)}function Yh(e){let t=e.index,n=e.match("/*");if(!n&&!e.match("//"))return!1;e.index+=2;let r=e.readUntil(n?"*/":`
44
+ `);if(n)e.eat("*/");let i={type:n?"Block":"Line",start:t,end:e.index,value:r},o=e.sourceLocation(t,e.index);if(o)i.loc=o;return e.root.comments.push(i),!0}function Qh(e){while(Yh(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return Zh(e,t);let n=Un(e,!0);if(!n.name)return null;let r=e.index;e.allowWhitespace();let i=!0;if(e.eat("=")){if(e.allowWhitespace(),e.match("/>"))i=[Ht(e.index,e.index+1,"/")],e.index++;else i=nm(e);r=e.index}else ul(e);let o=n.name.indexOf(":"),a=o>0?_h.get(n.name.slice(0,o)):void 0;return a?tm(e,a,n,o,t,r,i):Vi(e,n,t,r,i)}function Zh(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let i=K(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:i}}if(e.eat("...")){let i=K(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:i}}let n=e.readIdentifierName();if(n.name==="")Ia(t);e.eatClosingBrace();let r={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return Vi(e,n,t,e.index,r)}function em(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function tm(e,t,n,r,i,o,a){let[s,...p]=n.name.slice(r+1).split("|");if(s==="")Wa({start:i,end:i+r+1},n.name);let l={start:i,end:o,type:t,name:s};if(e.loc)l.name_loc=n.loc;if(t==="StyleDirective")return l.modifiers=p,l.value=a,l;let c=em(a);if(c&&(Array.isArray(a)&&a.length>1||c.type==="Text"))za(c.start);if(l.expression=c?.expression??null,l.modifiers=p,t==="TransitionDirective"){let d=n.name.slice(0,r);l.intro=d!=="out",l.outro=d!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!l.expression)l.expression={start:i+r+1,end:o,type:"Identifier",name:s};return l}function nm(e){let t=e.source.charCodeAt(e.index),n=pt(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[Ht(e.index-1,e.index-1,"")]}let r;try{r=dl(e,n?(i,o)=>i.charCodeAt(o)===t:rm,"in attribute value",n?t:void 0)}catch(i){let o=i instanceof v?i.position?.[0]:void 0;if(i instanceof v&&i.code==="js_parse_error"&&o!==void 0&&e.source.startsWith("/>",o-1))e.index=o,Re(o,n?String.fromCharCode(t):"}");throw i}if(n)e.index++;else if(r.length===0)Ei(e.index);return n||r.length>1||r[0].type==="Text"?r:r[0]}function rm(e,t){let n=e.charCodeAt(t);return ze(n)||pt(n)||n===ll||n===60||n===Gn||n===96||n===pl&&e.charCodeAt(t+1)===Gn}function dl(e,t,n,r){let{source:i}=e,o=[],a=e.index,s=(p)=>{if(p<=a)return;let l=i.slice(a,p);o.push(Ht(a,p,l,Mi(l,!0)))};while(e.index<i.length){let p=e.index;if(t(i,p))return s(p),o;if(i.charCodeAt(p)!==Bp){if(e.index++,r!==void 0)while(e.index<i.length&&i.charCodeAt(e.index)!==Bp&&i.charCodeAt(e.index)!==r)e.index++;continue}e.index++;let l=i.charCodeAt(e.index);if(l===35||l===64){e.index++;let d=e.index;while(e.index<i.length&&i.charCodeAt(e.index)>=97&&i.charCodeAt(e.index)<=122)e.index++;let f=i.slice(d,e.index);(l===35?qa:xp)(p,f,n)}s(p),e.allowWhitespace();let c=K(e);e.eatClosingBrace(),o.push({type:"ExpressionTag",start:p,end:e.index,expression:c}),a=e.index}oe(i.length)}var im=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),sm=new Map([["type",(e,t)=>{if(t!=="String"&&t!=="Number"&&t!=="Boolean"&&t!=="Array"&&t!=="Object")return!1;return e.type=t,!0}],["reflect",(e,t)=>{if(typeof t!=="boolean")return!1;return e.reflect=t,!0}],["attribute",(e,t)=>{if(typeof t!=="string")return!1;return e.attribute=t,!0}]]),zp="[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}-]",om=new RegExp(`^[a-z]${zp}*-${zp}*$`,"u"),am=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),On=(e)=>(t,n)=>{let r=zn(n);if(typeof r!=="boolean")jn(n,"true or false");t[e]=r},pm=new Map([["runes",On("runes")],["immutable",On("immutable")],["preserveWhitespace",On("preserveWhitespace")],["accessors",On("accessors")],["namespace",(e,t)=>{let n=im.get(zn(t));if(!n)jn(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(zn(t)!=="injected")jn(t,'"injected"');e.css="injected"}],["tag",(e,t)=>up(t)],["customElement",(e,t)=>{let n=um(t);if(n)e.customElement=n}]]);function lm(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let r of e.attributes){if(r.type!=="Attribute")dp(r);t.push(r);let i=pm.get(r.name);if(!i)yp(r,r.name);i(n,r)}return n}function zn({value:e}){if(e===!0)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;if(t.length>1)return null;let[n]=t;if(n.type==="Text")return n.data;return n.expression.type==="Literal"?n.expression.value:null}function Wp(e,t){if(typeof t!=="string")ki(e);if(!t)return;if(!om.test(t))ki(e);if(am.has(t))gp(e)}function cm(e,t){let n=new Map;for(let r of e.properties){if(r.type!=="Property"||r.computed||r.key.type!=="Identifier")t();if(!n.has(r.key.name))n.set(r.key.name,r.value)}return n}function um(e){let t=()=>fp(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=zn(e);return Wp(e,c),{tag:c}}let{expression:r}=n;if(r.type!=="ObjectExpression"){if(r.type==="Literal"&&r.value===null)return;t()}let i=cm(r,t),o={},a=i.get("tag");if(a){let c=a.type==="Literal"?a.value:void 0;Wp(null,c),o.tag=c}let s=i.get("props");if(s){let c=()=>hp(e);if(s.type!=="ObjectExpression")c();o.props={};for(let d of s.properties){if(d.type!=="Property"||d.computed||d.key.type!=="Identifier"||d.value.type!=="ObjectExpression")c();let f={};o.props[d.key.name]=f;for(let h of d.value.properties){if(h.type!=="Property"||h.computed||h.key.type!=="Identifier"||h.value.type!=="Literal")c();if(!sm.get(h.key.name)?.(f,h.value.value))c()}}}let p=i.get("shadow");if(p)if(p.type==="ObjectExpression")o.shadow=p;else if(p.type==="Literal"&&(p.value==="open"||p.value==="none"))o.shadow=p.value;else mp(e);let l=i.get("extend");if(l)o.extend=l;return o}var dm={"{":"}","(":")","[":"]"};function Hi(e,t,n=dm){let r=Object.values(n),i=[],o=t;while(o<e.length){let a=e[o++];if(a==="'"||a==='"'||a==="`")o=fm(e,o,a);else if(Object.hasOwn(n,a))i.push(a);else if(r.includes(a)){let s=n[i.pop()??""];if(a!==s)Re(o-1,s);if(i.length===0)return o}}oe(e.length)}function fm(e,t,n){let r=t;while(r<e.length){let i=e[r++];if(i===n)return r;if(i==="\\")r++;else if(n==="`"&&i==="$"&&e[r]==="{")r=Hi(e,r)}Ep(t)}var hm=/\?\s*:/g;function Jn(e){let t=e.index,n=e.readIdentifierName();if(n.name!==""){let s=Up(e);return{...n,typeAnnotation:s}}let r=e.source[e.index];if(r!=="{"&&r!=="[")Xa(e.index);e.index=Hi(e.source,t);let{node:i}=st(e,`${e.source.slice(0,e.index)} = 1`,t);Bt(i,"AssignmentExpression");let o=i.left;Bt(o,"ObjectPattern","ArrayPattern");let a=Up(e);if(o.typeAnnotation=a,a)o.end=a.end;return o}function Up(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",r=e.index-n.length,i=e.source.slice(0,r)+n+e.source.slice(e.index).replace(hm,":"),o=st(e,i,r).node;if(o.type==="AssignmentExpression"){let a=o.right.start;while(i[a]!=="=")a-=1;o=st(e,i.slice(0,a),r).node}if(o.type==="SequenceExpression")o=o.expressions[0];return Bt(o,"TSAsExpression"),e.index=o.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:o.typeAnnotation}}var mm=/\s*}/y,gm={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},we=()=>({type:"Fragment",nodes:[]});function ym(e,t){if(e.eat("if")){e.requireWhitespace();let n=K(e);e.eatClosingBrace();let r=we();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:r,alternate:null},r)}else if(e.eat("each"))xm(e,t);else if(e.eat("await")){e.requireWhitespace();let n=K(e);e.allowWhitespace();let r={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},i=we();if(e.eat("then"))r.value=Jp(e),r.then=i;else if(e.eat("catch"))r.error=Jp(e),r.catch=i;else r.pending=i;e.eat("}",!0),e.open(r,i)}else if(e.eat("key")){e.requireWhitespace();let n=K(e);e.eatClosingBrace();let r=we();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:r},r)}else if(e.eat("snippet"))vm(e,t);else Ka(e.index)}function Jp(e){if(e.matchRegex(mm))return e.allowWhitespace(),null;e.requireWhitespace();let t=Jn(e);return e.allowWhitespace(),t}function bm(e){let t={assertion:null},n=e.end,r=(o)=>{if(o.type==="TSAsExpression"&&o.end===e.end)return t.assertion=o,n=o.expression.end,o.expression;return qn(o,r),o},i=e;if(e.type==="TSAsExpression")t.assertion=e,i=e.expression,n=i.end;else qn(e,r);return i.end=n,{expression:i,assertion:t.assertion}}function xm(e,t){e.requireWhitespace();let n=e.source,r;while(!r)try{r=K(e)}catch(p){let l=((p instanceof v?p.position:void 0)?.[0]??t)-2;while(l>t&&e.source.slice(l,l+2)!=="as")l-=1;if(l<=t)throw e.source=n,p;e.source=n.slice(0,l)}if(e.source=n,e.allowWhitespace(),!e.match("as")){if(r.type==="SequenceExpression")r=r.expressions[0];let p=bm(r);if(r=p.expression,p.assertion){let l=p.assertion.typeAnnotation.start-2;while(e.source.slice(l,l+2)!=="as")l-=1;e.index=l}}let i=null,o,a;if(e.eat("as"))e.requireWhitespace(),i=Jn(e);else e.index=r.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),o=e.readIdentifierName().name,!o)Ti(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),a=K(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let s=we();e.open({type:"EachBlock",start:t,end:-1,expression:r,body:s,context:i,index:o,key:a},s)}function vm(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")Ti(e.index);e.allowWhitespace();let r=e.index,i;if(e.isTypeScript&&e.match("<")){let p=Hi(e.source,r,{"<":">"});i=e.source.slice(r+1,p-1),e.index=p}e.allowWhitespace(),e.eat("(",!0);let o=1;while(e.index<e.source.length&&(!e.match(")")||o!==1)){if(e.match("("))o++;if(e.match(")"))o--;e.index+=1}e.eat(")",!0);let{node:a}=st(e,`${e.source.slice(0,e.index)} => {}`,r,!0);Bt(a,"ArrowFunctionExpression"),e.eatClosingBrace();let s=we();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:i,parameters:a.params,body:s},s)}function Em(e,t){let n=e.index-1,r=e.current();if(r.type==="IfBlock"){if(!e.eat("else"))Re(n,"{:else} or {:else if}");if(e.eat("if"))ja(n);if(e.allowWhitespace(),r.alternate=we(),e.setFragment(r.alternate),e.eat("if")){e.requireWhitespace();let i=K(e);e.eatClosingBrace();let o=we();e.open({start:t,end:-1,type:"IfBlock",elseif:!0,test:i,consequent:o,alternate:null},o)}else e.eatClosingBrace()}else if(r.type==="EachBlock"){if(!e.eat("else"))Re(n,"{:else}");e.eatClosingBrace(),r.fallback=we(),e.setFragment(r.fallback)}else if(r.type==="AwaitBlock"){let i;if(e.eat("then"))i="then";else if(e.eat("catch"))i="catch";else Re(n,"{:then ...} or {:catch ...}");if(r[i])Ra(n,`{:${i}}`);if(!e.eat("}")){e.requireWhitespace();let a=Jn(e);if(i==="then")r.value=a;else r.error=a;e.eatClosingBrace()}let o=we();r[i]=o,e.setFragment(o)}else Ma(n)}function Tm(e){let t=e.current(),n=gm[t.type];if(!n)Oa(e.index-1);e.eat(n,!0),e.eatClosingBrace();while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.close(),t=e.current();t.end=e.index,e.close()}var Sm=/\s*}/y;function km(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function Cm(e,t){if(e.eat("html")){e.requireWhitespace();let n=K(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(Sm)){let r=K(e),i=r.type==="SequenceExpression"?r.expressions:[r];for(let o of i){if(o.type!=="Identifier")Ga(o.start);n.push(o)}e.eatClosingBrace()}e.append({type:"DebugTag",start:t,end:e.index,identifiers:n})}else if(e.eat("const")){e.requireWhitespace();let n=Jn(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let r=e.index,i=K(e),o=e.index;if(i.type==="SequenceExpression"&&!e.source.slice(r,i.start).includes("("))Fa(i);e.eatClosingBrace();let a={type:"VariableDeclarator",id:n,init:i,start:n.start,end:o};e.append({type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[a],start:t+2,end:e.index-1}})}else if(e.eat("render")){e.requireWhitespace();let n=K(e);if(!km(n))Za(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else Ya(e.index)}var wm=/(?:var|interface|enum)\b/y,Pm=/(?:let|const|type)\b/y;function Am(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))ym(e,t);else if(e.eat(":"))Em(e,t);else if(e.eat("@"))Cm(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,Tm(e);else if(!Dm(e,t)){let n=K(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function Dm(e,t){let n=e.index,r=e.matchRegex(wm);if(r)xi({start:n,end:n+r.length});if(!e.matchRegex(Pm))return!1;let i=e.root.comments.length,o=Ap(e,e.source,n);if(o.type==="ExpressionStatement")return e.root.comments.length=i,!1;if(o.type!=="VariableDeclaration"||o.kind!=="let"&&o.kind!=="const")xi(o);return e.index=o.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:o}),!0}function Nm(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=Kp(t,"<",n);if(e.nextBrace<n)e.nextBrace=Kp(t,"{",n);let r=Math.min(e.nextAngle,e.nextBrace);e.index=r;let i=t.slice(n,r);e.append({type:"Text",start:n,end:r,raw:i,data:Mi(i,!1)})}function Kp(e,t,n){let r=e.indexOf(t,n);return r===-1?e.length:r}function Gi(e,t){let n=e.charCodeAt(0)===65279?e.slice(1):e;La(n);let r=new Yp(n.trimEnd(),n.length,t);while(r.index<r.source.length)if(r.match("<"))Fh(r);else if(r.match("{"))Am(r);else Nm(r);if(r.stack.length>1){let s=r.current();if(s.end=s.start+1,s.type==="RegularElement")vi(s,s.name);Ba(s)}let{nodes:i}=r.root.fragment,o=i.findIndex((s)=>s.type==="SvelteOptions"),a=i[o];if(a?.type==="SvelteOptions"){i.splice(o,1),r.root.options=lm(a);let{nodes:s}=a.fragment;if(s.length>0)pp({start:s[0].start,end:s[s.length-1].end},a.name)}return r.root}var fl={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",kbd:"HTMLElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};function $m(e){return e in fl}function hl(e){if($m(e))return fl[e];return"HTMLElement"}var ml=new Map;function gl(e){let t=ml.get(e);if(t!==void 0)return t;let n=Mt(e,{inline:!0});return ml.set(e,n),n}function yl(e,t){let n=be(e.name,t.name);if(n!==0)return n;let r=be(e.type,t.type);if(r!==0)return r;if(e.type==="forwarded"&&t.type==="forwarded"){let i=be(e.element,t.element);if(i!==0)return i}return be(e.detail??"",t.detail??"")}var Lm=/^\{\s*\}$/;function lt(e){return Array.from(e,([t,n])=>n)}function _m(e,t){let{dispatcherName:n,callees:r}=t;for(let o of t.hostDispatches)No(e,o);if(n!==void 0){Go(e,t.dispatcherTypeArgument,n,C(e,t.dispatcherDeclaratorNode));for(let o of r)if(o.name===n){let a=o.arguments[0],s=a&&typeof a==="object"&&"value"in a?a.value:void 0,p=o.arguments[1],l=Mr(Rr(e,o.nestedBoundDetailNames),p),c=l===void 0&&p&&typeof p==="object"&&"value"in p?p.value:void 0,d=c===null&&p.raw==="null";if(s!=null)Le(e,{name:String(s),detail:l??(d?"null":c==null?"":jr(c)),has_argument:Boolean(p),source:C(e,o.node)})}}let i=new Set(t.hostDispatchedEventNames);if(n!==void 0){for(let o of r)if(o.name===n){let a=o.arguments[0],s=a&&typeof a==="object"&&"value"in a?a.value:void 0;if(s!=null)i.add(String(s))}}return e.forwardedEvents.forEach((o,a)=>{let s=e.events.get(a);if(s&&s.type==="dispatched"&&!i.has(a)){let p=e.eventDescriptions.get(a),l={type:"forwarded",name:a,element:o,description:p,deprecated:s.deprecated,tags:s.tags,source:s.source};if(s.internal)l.internal=!0;if(s.detail!==void 0&&s.detail!=="undefined")l.detail=s.detail;e.events.set(a,l)}}),i}function Im(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>dr(e,n))):new Set;return lt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?At:n.name))).map((n)=>{if(e.bindings.has(n.name)){let r=e.bindings.get(n.name)?.elements.sort().map((i)=>hl(i)).join(" | ");return{...n,type:`null | ${r}`,typeSource:"inferred",reactive:n.reactive||e.reactive_vars.has(n.name)}}return{...n,reactive:n.reactive||e.reactive_vars.has(n.name)}})}function Rm(e){return lt(e.slots).map((t)=>{let{slot_props_unresolved_spread:n,...r}=t;if(!t.slot_props)return r;if(typeof t.slot_props==="string")return Lm.test(t.slot_props)?{...r,slot_props:"Record<string, never>"}:r;let i=t.slot_props,o=[];for(let p of Object.keys(i)){if(i[p].replace&&i[p].value!==void 0)i[p].value=mt(e,i[p].value);if(i[p].value===void 0)i[p].value="any";o.push(`${p}: ${i[p].value}`)}let a=n?" & Record<string, any>":"",s=o.length===0?n?"Record<string, any>":"Record<string, never>":o.length===1?`{ ${o[0]} }${a}`:`{
45
+ ${o.join(`;
46
+ `)};
47
+ }${a}`;return{...r,slot_props:s}}).sort((t,n)=>{let r=t.name??"",i=n.name??"";if(r<i)return-1;if(r>i)return 1;return 0})}function Mm(e,t,n){if(e.deferredSlotBlockGenerics.length>0){let r=[...t.map((i)=>i.type??""),...n.map((i)=>i.slot_props??"")].join(`
48
+ `);for(let{name:i,constraint:o}of e.deferredSlotBlockGenerics){let a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${a}\\b`).test(r))continue;bn(e,i,o)}}if(e.scriptGenericsAttribute){if(e.generics)P(e,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',e.scriptGenericsAttribute.source);e.generics=Mo(e.scriptGenericsAttribute.value)}}function jm(e){return lt(e.events).map((t)=>{switch(t.type){case"forwarded":return{...t,element:t.element.name};case"dispatched":return t;default:return t}}).sort(yl)}function qm(e,t,n){let r={props:new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="props").map((i)=>[i.propName,i])),moduleExports:new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="moduleExports").map((i)=>[i.propName,i]))};for(let i of t)if(i.typeSource==="unknown"){let o=r.props.get(i.name);if(o)i.type="any";let a=o?o.importSource?`Prop "${i.name}" default calls "${o.calleeName}()" imported from "${o.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${i.name}" default calls "${o.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${i.name}" type could not be inferred; falling back to "${i.type??"any"}".`;P(e,"prop-unknown-type",i.name,a,i.source)}for(let i of n)if(i.typeSource==="unknown"&&r.moduleExports.has(i.name))i.type="any"}function Kn(e,t,n,r){if(t===void 0||gl(t))return!0;let i=Mt(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return P(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${i}; falling back to "any".`,r),!1}function Bm(e,t,n,r,i){for(let o of t)if(o.typeSource==="jsdoc"&&!Kn(e,o.type,o.name,o.source))o.type="any";for(let o of n)if(o.type==="dispatched"&&!Kn(e,o.detail,o.name,o.source))o.detail="any";for(let o of r)if(!Kn(e,o.slot_props,o.name??"default",o.source))o.slot_props="any";for(let o of i)if(!Kn(e,o.type,o.name,o.source))o.type="any",o.ts=`type ${o.name} = any;`}function Om(e,t){let{dispatcherName:n}=t,r=[];if(n===void 0)return r;let i=[];for(let a of t.callsWithArguments){let s=Ao(a,n);if(s)i.push({call:a,...s})}if(i.length>0)me(e,"dispatch-escapes",n,$e(e,n)?.sveldIgnore);let o=gr(e,"dispatch-escapes",n);for(let{call:a,argumentIndex:s,property:p}of i){let l=t.locallyBoundCalls.has(a)?void 0:Pr(e,a.callee);if(!l){r.push(a);continue}let c=C(e,a);e.pendingDispatchEscapeCandidates.push({importSource:l.source,importedName:l.importedName,...l.members?{members:l.members}:{},calleeText:Q(e,a.callee)??l.importedName,dispatcherName:n,argumentIndex:s,...p===void 0?{}:{property:p},...c?{source:c}:{},...o?{ignored:o}:{}})}return r}function Fm(e,t,n){for(let r of e.jsDocEventNames){if(t.has(r))continue;if(e.forwardedEvents.has(r))continue;if(e.props.has(`on${r}`))continue;if(n.length>0)continue;let i=mr(e,"event-no-source",r,`@event "${r}" has no matching dispatch or callback prop.`,e.jsDocEventSources.get(r));if(e.pendingDispatchEscapeCandidates.length>0)e.deferredEventNoSourceDiagnostics.push(i);else e.diagnosticRecords.push(i)}}function Vm(e,t){let n=t.typedefs.filter((o)=>o.internal).map((o)=>o.name.split("<")[0]);if(n.length===0)return;let r=n.map((o)=>({name:o,regex:new RegExp(`\\b${o}\\b`)})),i=(o,a,s)=>{if(!a)return;for(let{name:p,regex:l}of r){if(!l.test(a))continue;P(e,"internal-typedef-referenced",o,`"${o}" references "${p}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,s)}};for(let o of t.props){if(o.internal)continue;i(o.name,o.type,o.source)}for(let o of t.moduleExports){if(o.internal)continue;i(o.name,o.type,o.source)}for(let o of t.typedefs){if(o.internal)continue;i(o.name,o.ts)}for(let o of t.events){if(o.internal||o.type!=="dispatched")continue;i(o.name,o.detail,o.source)}for(let o of t.slots){if(o.internal)continue;i(o.name??"default",o.slot_props,o.source)}for(let o of t.contexts){if(o.internal)continue;if(o.type!==void 0)i(o.typeName,o.type,o.source);for(let a of o.properties)i(a.name,a.type)}}function bl(e,t){let n=_m(e,t);zo(e,n);let r=Im(e);e.activeScopes.length=0;let i=Rm(e);Mm(e,r,i);let o=lt(e.moduleExports),a=jm(e),s=lt(e.typedefs),p=lt(e.contexts);qm(e,r,o),Bm(e,r,a,i,s);let l=Om(e,t);Fm(e,n,l);let{dispatcherName:c}=t;for(let g of l){let m=Q(e,g.callee)??"";P(e,"dispatch-escapes",c??"",`\`${c}\` is passed to \`${m}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,C(e,g))}if(e.rest_props?.type==="InlineComponent")P(e,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${e.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);Vm(e,{props:r,moduleExports:o,typedefs:s,events:a,slots:i,contexts:p});let d={source:an(e,0,e.source?.length),syntaxMode:e.syntaxMode,...e.scriptLanguage?{scriptLanguage:e.scriptLanguage}:{},props:r,moduleExports:o,slots:i,events:a,typedefs:s,generics:e.generics,rest_props:e.rest_props,extends:e.extends,componentComment:e.componentComment,componentCommentSource:e.componentCommentSource,contexts:p,customElementTag:e.customElementTag,customElement:e.customElement,...e.cssParts.length>0?{cssParts:e.cssParts.slice()}:{},...e.cssProperties.length>0?{cssProperties:e.cssProperties.slice()}:{},diagnostics:e.diagnosticRecords.slice()},f=to(e);if(f)d[ge]=f;let h=eo(e);return h?{component:d,pending:h}:{component:d}}function Hm(e){if(e.computed)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function xl(e){return e==="private"||e==="protected"}function ct(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function El(e){return e?.slice(1,-1).trim()||void 0}function zi(e,t,n){let r=wr(e,t),i=new Map((n?.params??[]).map((p)=>[p.name,p])),o=r.params.map(({name:p,type:l,optional:c,rest:d})=>{let f=i.get(p);return{name:d?`...${p}`:p,type:l??f?.type??(d?"any[]":"any"),...f?.description?{description:f.description}:{},...!d&&(c||f?.optional)?{optional:!0}:{}}}),a=r.returnType??n?.returnType??(t.async?"Promise<any>":void 0),s=El(r.typeParameters)??n?.typeParameters;return{...o.length>0?{params:o}:{},...a?{returnType:a}:{},...s?{typeParameters:s}:{}}}function Tl(e,t){let n=[],r=new Map,i=new Set,o=new Set,a,s=-1;for(let c of t.body.body){if(c.type!=="MethodDefinition"&&c.type!=="PropertyDefinition")continue;if(xl(c.accessibility))continue;let d=Hm(c);if(d===void 0)continue;let f=V(e,c);if(f?.internal)continue;let h=`${c.static?"static ":""}${d}`,g={...c.static?{static:!0}:{},...c.optional?{optional:!0}:{},...c.abstract?{abstract:!0}:{}};if(c.type!=="MethodDefinition"){if(F(e,c.typeAnnotation?.typeAnnotation),!c.static)o.add(d);n.push({kind:"property",name:d,type:Ee(e,c.typeAnnotation)??f?.type??"any",...g,...c.readonly?{readonly:!0}:{},...ct(f)});continue}let m=c.value,y=c.typeParameters?{...m,typeParameters:c.typeParameters}:m;if(c.kind==="constructor"){let T=zi(e,y,f);n.push({kind:"constructor",name:"constructor",params:T.params,...ct(f)}),s=n.length,a=y.type==="FunctionExpression"?y.body.body:void 0,y.params.forEach((S,D)=>{if(S.type!=="TSParameterProperty"||xl(S.accessibility))return;let b=T.params?.[D];if(!b)return;o.add(b.name),n.push({kind:"property",name:b.name,type:b.type,...S.readonly?{readonly:!0}:{},...b.description?{description:b.description}:{}})});continue}if(c.kind==="get"||c.kind==="set"){let T=zi(e,y,f),S=c.kind==="get"?T.returnType??f?.type:T.params?.[0]?.type??f?.type,D=r.get(h);if(D){if(c.kind==="set")D.readonly=void 0;if(S&&S!=="any"&&(D.type==="any"||c.kind==="get"))D.type=S;if(!D.description&&!D.deprecated)Object.assign(D,ct(f));continue}let b={kind:"property",name:d,type:S??"any",...g,...c.kind==="get"?{readonly:!0}:{},...ct(f)};r.set(h,b),n.push(b);continue}if(y.type==="TSDeclareMethod"&&!c.abstract)i.add(h);else if(y.type!=="TSDeclareMethod"&&i.has(h))continue;n.push({kind:"method",name:d,...g,...zi(e,y,f),...ct(f)})}if(e.scriptLanguage!=="ts"&&a)n.splice(s,0,...zm(e,a,o));for(let c of t.typeParameters?.params??[])F(e,c.constraint),F(e,c.default);let p=El(Oe(e,t.typeParameters)),l=Gm(e,t);return{members:n,...p?{typeParameters:p}:{},...l}}function Gm(e,t){let n={},r=t.superClass;if(r){if(n.extends=Oe(e,{start:r.start,end:t.superTypeParameters?.end??r.end}),r.type==="Identifier")vl(e,r,t.superTypeParameters)}let i=(t.implements??[]).map((o)=>(vl(e,o.expression,o.typeParameters),Oe(e,o))).filter((o)=>Boolean(o));if(i.length>0)n.implements=i;return n}function vl(e,t,n){F(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function zm(e,t,n){let r=[];for(let i of t){let o=i.type==="ExpressionStatement"?i.expression:void 0;if(o?.type!=="AssignmentExpression"||o.operator!=="=")continue;let a=o.left;if(a.type!=="MemberExpression"||a.computed||a.object.type!=="ThisExpression")continue;let s=a.property.type==="Identifier"?a.property.name:void 0;if(!s||n.has(s))continue;n.add(s);let p=V(e,i);if(p?.internal)continue;r.push({kind:"property",name:s,type:p?.type??"any",...ct(p)})}return r}var Wm=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function Wi(e,t,n){if(X(t)===void 0)return;if(e.moduleExports.has(t)){let r=e.moduleExports.get(t);e.moduleExports.set(t,{...r,...n})}else e.moduleExports.set(t,n)}function Sl(e,t,n,r){let i=V(e,t);Wi(e,n==="*"?`* from ${r.from}`:n,{name:n,kind:"re-export",description:i?.description,deprecated:i?.deprecated,tags:i?.tags,...i?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:r,source:C(e,t)})}function kl(e,t){P(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,C(e,t))}function Um(e,t,n,r){let i=n.id?.name;if(!i)return;let o=r?.exportedName??i,a=yn(e,t,r),{members:s,typeParameters:p,extends:l,implements:c}=Tl(e,n),d=p??a?.typeParameters;Wi(e,o,{name:o,...i===o?{}:{localName:i},kind:"class",description:a?.description,deprecated:a?.deprecated,tags:a?.tags,...a?.internal?{internal:!0}:{},type:`typeof ${i}`,...d?{typeParameters:d}:{},members:s,...n.abstract?{abstract:!0}:{},...l?{extends:l}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:C(e,t)})}function Cl(e,t,n,r){if(n.type==="ClassDeclaration"){Um(e,t,n,r);return}let i=Or(e,n,r,"moduleExports");if(i.length===0)return;let o=yn(e,t,r);for(let a of i){let{prop_name:s,kind:p}=a,{type:l,typeSource:c,description:d,params:f,returnType:h,isFunction:g,typeParameters:m}=Fr(e,a,o);Wi(e,s,{name:s,kind:p,description:d,deprecated:o?.deprecated,tags:o?.tags,...o?.internal?{internal:!0}:{},type:l,typeSource:c,value:a.value,defaultValue:a.defaultValue,params:f,returnType:h,typeParameters:m,isFunction:g,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:!1,constant:p==="const",reactive:!1,source:C(e,t)})}}function Jm(e){let t=Array.from(e.moduleExports.values()).filter((r)=>r.kind==="class"),n=new Set(t.map((r)=>r.localName??r.name));for(let r of t){if(!r.extends)continue;let i=Wm.exec(r.extends)?.[0];if(i&&(n.has(i)||e.valueImportBindingsByLocalName.has(i)||e.typeImportBindingsByLocalName.has(i)))continue;P(e,"export-unresolved",r.name,`class "${r.name}" extends \`${r.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,r.source),r.extends=void 0}}function wl(e){let t=e.parsed?.module;if(!t)return;let n=no(t);xn(t,(r,i)=>{if(r.type==="ImportDeclaration")bt(e,r);if(r.type==="FunctionDeclaration"&&r.id?.name)e.funcDecls.set(r.id.name,r);if(r.type==="VariableDeclaration")e.vars.add(r);if(r.type==="ExportNamedDeclaration"){if(r.declaration!=null){Cl(e,r,r.declaration);return}let o=r.source?.value,a=i?.type==="Program"?i:null;for(let s of r.specifiers){let p=qr(e,r,s,a,"module");if(!p)continue;if(p.exportedName==="default"){kl(e,r);continue}let l=typeof o==="string"?{from:o,imported:p.localName}:n.get(p.localName);if(p.declaration)Cl(e,r,p.declaration,p);else if(l)Sl(e,r,p.exportedName,l);else if(!e.localTypeDeclarationsByName.get(p.localName)?.exported)Br(e,r,p.localName,p.exportedName)}}if(r.type==="ExportAllDeclaration"&&typeof r.source.value==="string"){let o=(r.exported&&gn(r.exported))??"*";if(o==="default"){kl(e,r);return}Sl(e,r,o,{from:r.source.value,imported:"*"})}}),Jm(e)}function Pl(e){return Gi(e,{css:!1})}function Km(e,t){let n=e.length+1,r=t.length+1,i=Array.from({length:n},()=>Array(r).fill(0));for(let o=0;o<n;o++)i[o][0]=o;for(let o=0;o<r;o++)i[0][o]=o;for(let o=1;o<n;o++)for(let a=1;a<r;a++){let s=e[o-1]===t[a-1]?0:1;if(i[o][a]=Math.min(i[o-1][a]+1,i[o][a-1]+1,i[o-1][a-1]+s),o>1&&a>1&&e[o-1]===t[a-2]&&e[o-2]===t[a-1])i[o][a]=Math.min(i[o][a],i[o-2][a-2]+1)}return i[n-1][r-1]}function Al(e,t,n=3){let r,i=Number.POSITIVE_INFINITY;for(let o of t){let a=Km(e,o);if(a<i)r=o,i=a}if(r===void 0||i>n)return;return r}var Xm=/\s*=\s*/;function Ym(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),r=e.slice(t+1,-1),i=z(r,",").map((o)=>o.trim().replace(Xm," = ")).join(", ");return`${n}<${i}>`}var Qm=new Set(["restProps","slot","snippet","event","typedef","callback"]),Ui=new Set(["property","type"]),Zm=new Set(["slot","snippet","typedef","callback"]);function Xn(e){if(!e||e.length===0)return;return e[vr(e)].content}function Dl(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function eg(e){return e.text.split(`
49
+ `).length===e.lines.length}function Ji(e,t){if(t<=0)return e;return e.split(`
50
+ `).slice(0,-t).join(`
51
+ `).trimEnd()}var tg=new Set(["abstract","access","alias","alpha","arg","argument","async","augments","author","beta","borrows","const","constructs","copyright","defaultValue","description","emits","experimental","exports","external","fires","function","global","import","inner","instance","kind","lends","license","link","listens","member","name","override","package","private","prop","protected","public","readonly","remarks","requires","satisfies","sealed","static","summary","throws","todo","tutorial","typeParam","version","virtual","yields"]),ng=[...tn,...Er,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],rg=/;$/;function ig(e){let t=e.trim().replace(rg,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;return Qe(t,0)===t.length-1}var sg=/[\w$]+/g,og=new Set(["property","param","returns","return"]);function ag(e,t,n){let r=[e[t].type];for(let o=t+1;og.has(e[o]?.tag);o++)r.push(e[o].type);let i=new Set(r.join(" ").match(sg));return n.some(({name:o})=>i.has(o))}function pg(e){let t=e?.trim();return!t||t==="object"||t==="Object"}function Nl(e,t){if(t.usedGenericsTag&&t.usedTemplateTag&&!t.warnedMixedGenericsTags){t.warnedMixedGenericsTags=!0;let n=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${n}; their declarations are combined in the order encountered.`)}}function $l(e,t,n,r){if(t.seenGenericNames.has(n))P(e,"generics-conflict",n,`Duplicate generic name "${n}".`,r);else t.seenGenericNames.add(n)}function Ll(e,t,n){if(e.generics){let i=z(e.generics[0],",").map((o)=>o.trim()).indexOf(t.trim());if(i!==-1){let o=z(e.generics[1],",").map((a)=>a.trim());o[i]=n,e.generics=[e.generics[0],o.join(", ")];return}}bn(e,t,n)}function _l(e,t,n){if(e.typedefs.has(t))P(e,"typedef-duplicate",t,`Duplicate typedef/callback name "${t}"; the later declaration overwrites the earlier one.`,n)}function Il(e,t,n,r,i){let o=t.findIndex((a)=>a.name===n.name);if(o===-1)t.push(n);else{let a=r?` of "${r}"`:"";P(e,"property-duplicate",n.name,`Duplicate property "${n.name}"${a}; the later declaration overwrites the earlier one.`,i),t[o]=n}}class Rl{tags;lines;commentDescription;commentDescriptionUsed=!1;isFirstTag=!0;eventName;eventType;eventDescription;eventDeprecated;eventInternal=!1;eventSource;eventTagLine;eventTags=[];eventIgnores=[];eventProperties=[];typedefName;typedefType;typedefDescription;typedefSource;typedefTags=[];typedefInternal=!1;typedefProperties=[];callbackName;callbackDescription;callbackSource;callbackTags=[];callbackInternal=!1;callbackParams=[];callbackReturnType;attachTrailingTag;pendingTags=[];pendingDeprecated;pendingInternal=!1;pendingTypeParameters=[];lineDescriptions=new Map;tagLineNumbers=new Set;consumedDescriptionLines=new Set;indentedContinuationLines=new Set;trimBodyAbove;trimThisBody;hasSlotOrSnippetTag;hasExtendsTag;ctx;generics;documentsFunction;constructor(e,t,n,r){this.ctx=e,this.generics=t,this.documentsFunction=r;let{tags:i,lines:o}=n;this.tags=i,this.lines=o,this.commentDescription=n.description,this.hasSlotOrSnippetTag=i.some((p)=>p.tag==="slot"||p.tag==="snippet"),this.hasExtendsTag=i.some((p)=>p.tag==="extends"||p.tag==="extendProps");for(let p of i)if(p.lines.length>0)this.tagLineNumbers.add(p.lines[0].number);for(let p of o)if(p.continuesType)this.tagLineNumbers.add(p.number);let a=!1,s=!1;for(let p of o){if(!p.tag&&!p.continuesType&&p.content&&(s||p.content.trim()!=="}"))this.lineDescriptions.set(p.number,p.content);if(p.tag!==void 0||p.continuesType)a=!0;else if(!p.content.trim());else if(a&&(p.indent||s))this.indentedContinuationLines.add(p.number);else a=!1;if(yt(p.content))s=!s}}orCommentDescription(e){if(e||!this.isFirstTag||this.commentDescriptionUsed||!this.commentDescription)return e;return this.commentDescriptionUsed=!0,this.commentDescription}typeDeclarationName(e){if(this.pendingTypeParameters.length===0)return Ym(e);let t=`${e}<${this.pendingTypeParameters.join(", ")}>`;return this.pendingTypeParameters.length=0,t}joinBlockLines(e,t){let n=t?t.text.split(`
52
+ `):[],r=t?.line;for(let i of e){if(r!==void 0&&i-r>1){let a=r+1;while(a<i&&Dl(this.lines[a]))a++;if(a===i)for(let s=r+1;s<i;s++)n.push("")}let o=this.lines[i];n.push(o.indent+o.content),r=i}return en(n)}getPrecedingDescription(e){if(e.length===0)return;let t=e[0].number,n=[],r=!1;for(let i=t-1;i>=0;i--){if(this.tagLineNumbers.has(i)||this.indentedContinuationLines.has(i)||this.consumedDescriptionLines.has(i))break;if(this.lineDescriptions.has(i))n.unshift(i),r=!0;else if(r&&!Dl(this.lines[i]))break}if(n.length===0)return;for(let i of n)this.consumedDescriptionLines.add(i);return this.trimBodyAbove?.(n[0]),this.joinBlockLines(n)}claimBodyLines(e,t){if(!eg(e)){for(let r=1;r<e.lines.length;r++)this.consumedDescriptionLines.add(e.lines[r].number);return}let n=e.lines[e.lines.length-1].number;this.trimThisBody=(r)=>t(n-r+1)}getTagDescription(e,t,n=!1){let r=xe(Xn(e)),i=t!==void 0&&Qm.has(t.tag)&&!xe(Xn(t.lines)),o=n&&(t===void 0||!Ui.has(t.tag)),a=[];for(let s=1;s<e.length;s++){let p=e[s];if((i||o)&&!this.indentedContinuationLines.has(p.number))continue;if(!this.lineDescriptions.get(p.number)?.trim()||this.consumedDescriptionLines.has(p.number))continue;a.push(p.number),this.consumedDescriptionLines.add(p.number)}if(a.length===0)return r;return this.joinBlockLines(a,{text:r??"",line:e[vr(e)].number})}flagDescriptionAfterEvent(e,t,n,r){if(this.eventName===void 0||this.eventDescription)return;if(this.eventTagLine!==void 0&&this.indentedContinuationLines.has(this.eventTagLine+1))return;if(r?.tag!=="event"&&!Ui.has(r?.tag??""))return;if(xe(Xn(n)))return;let i=t?`@${e} "${t}"`:`@${e}`;P(this.ctx,"event-description-ambiguous",this.eventName,`Text after @event "${this.eventName}" was used as the description of ${i}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Y(this.ctx,n))}takePrecedingDescription(e){let{tag:t,name:n,lines:r}=this.tags[e],i=this.getPrecedingDescription(r);if(i)this.flagDescriptionAfterEvent(t,n,r,this.tags[e-1]);return i}finalizeEvent(){if(this.eventName===void 0)return;let{ctx:e}=this,t=this.eventType&&this.eventType!=="object"&&this.eventType!=="Object"?this.eventType:void 0,n;if(t)n=t;else if(this.eventProperties.length>0)n=Pt(this.eventProperties,this.eventName,!0);else n=this.eventType||"";if(this.eventTagLine!==void 0){let i;for(let s of this.tags){let p=s.lines[0]?.number;if(typeof p!=="number")continue;if(p<=this.eventTagLine)continue;if(Ui.has(s.tag))continue;i=p;break}let o=[],a=Array.from(this.lineDescriptions.keys()).sort((s,p)=>s-p);for(let s of a){if(s<=this.eventTagLine)continue;if(i!==void 0&&s>=i)continue;if(this.consumedDescriptionLines.has(s))continue;if(this.lineDescriptions.get(s)?.trim())o.push(s),this.consumedDescriptionLines.add(s)}if(o.length>0)this.eventDescription=this.joinBlockLines(o,this.eventDescription?{text:this.eventDescription,line:this.eventTagLine}:void 0)}let r=n===""&&(!e.events.has(this.eventName)||e.untypedJsDocEventNames.has(this.eventName));if(Le(e,{name:this.eventName,detail:n,has_argument:!1,description:this.eventDescription,deprecated:this.eventDeprecated,tags:this.eventTags.length>0?this.eventTags:void 0,internal:this.eventInternal||void 0,source:this.eventSource}),r)e.untypedJsDocEventNames.add(this.eventName);e.eventDescriptions.set(this.eventName,this.eventDescription),e.jsDocEventNames.add(this.eventName),e.jsDocEventSources.set(this.eventName,this.eventSource),me(e,"event-no-source",this.eventName,this.eventIgnores),this.eventProperties.length=0,this.eventName=void 0,this.eventType=void 0,this.eventDescription=void 0,this.eventDeprecated=void 0,this.eventInternal=!1,this.eventSource=void 0,this.eventTagLine=void 0,this.eventTags=[],this.eventIgnores=[]}finalizeTypedef(){if(this.typedefName===void 0)return;let{ctx:e}=this,t,n;if(this.typedefProperties.length>0)t=Pt(this.typedefProperties,void 0,!0),n=`type ${this.typedefName} = ${t};`;else if(this.typedefType)t=this.typedefType,n=ig(t)?`interface ${this.typedefName} ${t}`:`type ${this.typedefName} = ${t};`;else t="{}",n=`type ${this.typedefName} = ${t};`;let r=this.typedefProperties.length>0?this.typedefProperties.filter(({name:i})=>!i.includes(".")&&!i.startsWith("[")).map(({name:i,type:o,optional:a,description:s})=>({name:i,type:o,optional:a===!0,...s?{description:s}:{}})):ve(t);if(r)e.typedefMembersByName.set(this.typedefName,r);_l(e,this.typedefName,this.typedefSource),e.typedefs.set(this.typedefName,{type:t,name:this.typedefName,description:X(this.typedefDescription),ts:n,tags:this.typedefTags.length>0?this.typedefTags:void 0,...this.typedefInternal?{internal:!0}:{},source:this.typedefSource}),this.typedefProperties.length=0,this.typedefName=void 0,this.typedefType=void 0,this.typedefDescription=void 0,this.typedefSource=void 0,this.typedefTags=[],this.typedefInternal=!1}finalizeCallback(){if(this.callbackName===void 0)return;let e=this.callbackParams.map(({name:i,type:o,optional:a})=>`${i}${a?"?":""}: ${o}`).join(", "),t=this.callbackReturnType||"void",n=`(${e}) => ${t}`,r=`type ${this.callbackName} = ${n};`;_l(this.ctx,this.callbackName,this.callbackSource),this.ctx.typedefs.set(this.callbackName,{type:n,name:this.callbackName,description:X(this.callbackDescription),ts:r,tags:this.callbackTags.length>0?this.callbackTags:void 0,...this.callbackInternal?{internal:!0}:{},source:this.callbackSource}),this.callbackParams.length=0,this.callbackReturnType=void 0,this.callbackName=void 0,this.callbackDescription=void 0,this.callbackSource=void 0,this.callbackTags=[],this.callbackInternal=!1}readExtends(e,t){let{name:n,lines:r}=this.tags[e];if(this.ctx.extends!==void 0)P(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,Y(this.ctx,r));this.ctx.extends={interface:n,import:t},this.isFirstTag=!1}readRestProps(e,t){let{name:n,description:r}=this.tags[e],i=n?r?`${n} ${r}`:n:r,o=xe(i),a=this.orCommentDescription(o||this.takePrecedingDescription(e)),s={type:"Element",name:t,description:a||void 0};if(this.ctx.rest_props=s,o)this.claimBodyLines(this.tags[e],(p)=>{s.description=xe(Ji(i,p))||void 0});this.isFirstTag=!1}readSlot(e,t){let{tag:n,name:r,lines:i}=this.tags[e],o=this.orCommentDescription(this.getTagDescription(i,this.tags[e+1]));if(!o&&this.pendingTags.length===0)o=this.takePrecedingDescription(e);this.isFirstTag=!1;let a=t;if(!a)a="Record<string, never>",P(this.ctx,"slot-missing-type",r||"default",`@${n}${r?` "${r}"`:""} is missing a required {Type} annotation; falling back to "${a}".`,Y(this.ctx,i));Dt(this.ctx,{slot_name:r,slot_props:a,slot_description:o||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:this.pendingTags.length>0?[...this.pendingTags]:void 0,slot_internal:this.pendingInternal||void 0,source:Y(this.ctx,i)}),this.pendingTags.length=0,this.pendingDeprecated=void 0,this.pendingInternal=!1;let s=r===void 0||r===""?null:r;this.attachTrailingTag=(p)=>{let l=this.ctx.slots.get(s);if(l)l.tags=[...l.tags??[],p]}}readEvent(e,t){let{name:n,lines:r}=this.tags[e],i=xe(Xn(r))||this.takePrecedingDescription(e);if(this.finalizeEvent(),this.eventName=n,this.eventType=t,this.eventTagLine=r.length>0?r[0].number:void 0,this.eventDescription=this.orCommentDescription(i),this.eventSource=Y(this.ctx,r),this.pendingTags.length>0)this.eventTags.push(...this.pendingTags),this.pendingTags.length=0;this.attachTrailingTag=(o)=>this.eventTags.push(o),this.isFirstTag=!1}readProperty(e,t){let{name:n,optional:r,default:i,lines:o}=this.tags[e],a={name:n,type:t,description:this.getTagDescription(o,this.tags[e+1],this.eventName!==void 0),optional:r||!1,default:i};if(this.eventName!==void 0)Il(this.ctx,this.eventProperties,a,this.eventName,Y(this.ctx,o));else if(this.typedefName!==void 0&&pg(this.typedefType))Il(this.ctx,this.typedefProperties,a,this.typedefName,Y(this.ctx,o))}readTypedef(e,t){let{name:n,lines:r}=this.tags[e];if(this.finalizeTypedef(),this.typedefName=this.typeDeclarationName(n),this.typedefType=t,this.typedefSource=Y(this.ctx,r),this.typedefDescription=this.orCommentDescription(this.getTagDescription(r,this.tags[e+1])||this.takePrecedingDescription(e)),this.pendingTags.length>0)this.typedefTags.push(...this.pendingTags),this.pendingTags.length=0;this.typedefInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(i)=>this.typedefTags.push(i),this.isFirstTag=!1}readCallback(e){let{name:t,lines:n}=this.tags[e];if(this.finalizeCallback(),this.callbackName=this.typeDeclarationName(t),this.callbackSource=Y(this.ctx,n),this.callbackDescription=this.orCommentDescription(this.getTagDescription(n,this.tags[e+1])||this.takePrecedingDescription(e)),this.pendingTags.length>0)this.callbackTags.push(...this.pendingTags),this.pendingTags.length=0;this.callbackInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(r)=>this.callbackTags.push(r),this.isFirstTag=!1}readGenerics(e,t){let{name:n,lines:r}=this.tags[e],i=t||n;for(let o of z(n,","))$l(this.ctx,this.generics,o.trim(),Y(this.ctx,r));this.generics.usedGenericsTag=!0,Nl(this.ctx,this.generics),Ll(this.ctx,n,i),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,r=Cr(n[e],t),i=e+1;while(n[i]?.tag==="template")i++;let o=n[i];if((o?.tag==="typedef"||o?.tag==="callback")&&!o.name.includes("<")&&ag(n,i,r)){this.pendingTypeParameters.push(...r.map(({constraint:a})=>a));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...r);return}if(this.documentsFunction)return;for(let a of r)$l(this.ctx,this.generics,a.name,Y(this.ctx,n[e].lines)),Ll(this.ctx,a.name,a.constraint);this.generics.usedTemplateTag=!0,Nl(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(e){let{text:t}=this.tags[e],n=this.eventName!==void 0;if(n?this.eventDeprecated!==void 0:this.pendingDeprecated!==void 0)return;let r=(i)=>{if(n)this.eventDeprecated=i;else this.pendingDeprecated=i};r(nn(t)),this.claimBodyLines(this.tags[e],(i)=>{r(nn(Ji(t,i)))})}readPassthrough(e){let{tag:t,text:n,lines:r}=this.tags[e],i={name:t,body:n};if(this.claimBodyLines(this.tags[e],(o)=>{i.body=Ji(n,o)}),!tn.has(t)&&!Er.has(t)){let o=tg.has(t)?void 0:Al(t,ng,t.length<=4?1:2);P(this.ctx,"jsdoc-unknown-tag",t,o?`Unknown JSDoc tag "@${t}"; did you mean "@${o}"? Passed through unchanged.`:`Unknown JSDoc tag "@${t}"; passed through unchanged. If this is a typo, fix the tag name.`,Y(this.ctx,r))}if(this.attachTrailingTag)this.attachTrailingTag(i);else this.pendingTags.push(i)}read(){let{tags:e}=this;for(let n=0;n<e.length;n++){let{tag:r,type:i,name:o,optional:a}=e[n],s=De(i);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,r){case"extends":case"extendProps":this.readExtends(n,s);break;case"restProps":this.readRestProps(n,s);break;case"slot":case"snippet":this.readSlot(n,s);break;case"csspart":{let p=this.getTagDescription(e[n].lines,e[n+1]);this.ctx.cssParts.push({name:o,...p?{description:p}:{}});break}case"cssprop":case"cssproperty":{let p=this.getTagDescription(e[n].lines,e[n+1]),l=e[n].default;this.ctx.cssProperties.push({name:o,...s?{type:s}:{},...l===void 0?{}:{default:l},...p?{description:p}:{}});break}case"event":this.readEvent(n,s);break;case"type":if(this.eventName!==void 0)this.eventType=s;break;case"param":if(this.callbackName!==void 0)this.callbackParams.push({name:o,type:s,optional:a||!1});break;case"returns":case"return":if(this.callbackName!==void 0)this.callbackReturnType=s;break;case"property":this.readProperty(n,s);break;case"typedef":this.readTypedef(n,s);break;case"callback":this.readCallback(n);break;case"generics":this.readGenerics(n,s);break;case"template":this.readTemplate(n,s);break;case"deprecated":this.readDeprecated(n);break;case"ignore":case"internal":if(this.eventName===void 0)this.pendingInternal=!0;else this.eventInternal=!0;break;case"sveld-ignore":if(this.eventName!==void 0)this.eventIgnores.push(o);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(n);break}if(Zm.has(r))this.finalizeEvent()}if(this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback(),e.some((n)=>n.tag==="slot"||n.tag==="snippet"||n.tag==="event"||n.tag==="typedef"||n.tag==="callback")&&this.pendingTags.length>0){for(let n of this.pendingTags)P(this.ctx,"jsdoc-tag-dropped",n.name,`@${n.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);this.pendingTags.length=0}}}function Ml(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},r=t.includes("@template")?Vs(e):new Set;e.functionDocCommentStarts=r;let i=Zt(t);for(let o of i)e.jsDocBlocksByStart.set(o.start,o);for(let o of i)new Rl(e,n,o,r.has(o.start)).read()}var ql=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function lg(e,t){switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return!!t.computed;case"MetaProperty":return e===t.meta;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}var cg=Array.from(ql);function jl(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function ug(e){if(e.includes("\\u"))return!0;for(let t of cg){let n=e.indexOf(t);while(n!==-1){if(!jl(e.charCodeAt(n-1))&&!jl(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function dg(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function fg(e){let t=new Set;if(!e||typeof e!=="object"||!("type"in e))return t;switch(String(e.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let n=e;if(n.id?.name)t.add(n.id.name);for(let r of n.params??[])M(r,t);break}case"BlockStatement":Yn(e.body,t);break;case"CatchClause":M(e.param,t);break;case"EachBlock":{let n=e;if(M(n.context,t),typeof n.index==="string")t.add(n.index);else if(n.index?.name)t.add(n.index.name);break}case"AwaitBlock":{let n=e;M(n.value,t),M(n.error,t);break}}return t}function Yn(e,t){if(!Array.isArray(e))return;for(let n of e){if(!n||typeof n!=="object"||!("type"in n))continue;switch(String(n.type)){case"ImportDeclaration":for(let r of n.specifiers??[])if(r.local?.name)t.add(r.local.name);break;case"VariableDeclaration":for(let r of n.declarations??[])M(r.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":{let r=n.id?.name;if(r)t.add(r);break}case"ExportNamedDeclaration":{let r=n.declaration;if(r&&typeof r==="object"&&"type"in r)Yn([r],t);break}}}}function Ki(e,t){if(!e||typeof e!=="object")return!1;return Xi(e,void 0,[...t])}function Xi(e,t,n){if(Wr(e.type))return!1;let r=St(e);if(r)n.push(fg(e));let i=!1;if(t&&e.type==="Identifier"&&e.name!==void 0&&ql.has(e.name)&&!t.type.startsWith("TS")&&lg(e,t)&&!dg(e.name,n))i=!0;else for(let o in e){if(o==="leadingComments")continue;let a=e[o];if(!a||typeof a!=="object")continue;if(Array.isArray(a)){for(let s=0;s<a.length;s++){let p=a[s];if(p&&typeof p==="object"&&typeof p.type==="string"){if(Xi(p,e,n)){i=!0;break}}}if(i)break}else if(typeof a.type==="string"){if(Xi(a,e,n)){i=!0;break}}}if(r)n.pop();return i}function Bl(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!ug(e.source))return"legacy";let n=new Set;Yn(t.module?.content.body,n);let r=new Set;return Yn(t.instance?.content.body,r),Ki(t.module,[n])||Ki(t.instance,[n,r])||Ki(t.fragment,[n,r])?"runes":"legacy"}var Ol=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Yi(e){return e!==null&&typeof e==="object"&&typeof e.type==="string"}function Fl(e){if(!Ol.has(e.type))return e;let t=e.expression;while(t&&Ol.has(t.type))t=t.expression;return t??e}function Qn(e){if(!Yi(e))return;Qi(e)}function Qi(e){for(let t in e){if(t==="leadingComments")continue;let n=e[t];if(!n||typeof n!=="object")continue;if(Array.isArray(n))for(let r=0;r<n.length;r++){let i=n[r];if(!Yi(i))continue;let o=Fl(i);if(o!==i)n[r]=o;Qi(o)}else if(Yi(n)){let r=Fl(n);if(r!==n)e[t]=r;Qi(r)}}}var Vl=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,Hl=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function hg(e){if(!e.includes("@ts-"))return e;return Vl.lastIndex=0,e.replace(Vl,(t,n,r,i)=>{Hl.lastIndex=0;let o=r.replace(Hl,"");return n+o+i})}function Gl(e,t,n){e.componentFilePath=n;let r=hg(t);e.source=r;let i=Pl(r);if(Vo(e,i),e.parsed=i,e.scriptLanguage==="ts")Qn(i.module),Qn(i.instance),Qn(i.fragment);e.syntaxMode=Bl(e);let o=i.css,a=o?r.slice(0,o.start)+" ".repeat(o.end-o.start)+r.slice(o.end):r;Ar(e,i.module),Ar(e,i.instance),Ml(e,a)}class Zi{ctx=ur();cleanup(){this.ctx=ur()}parseSvelteComponent(e,t){let{component:n,pending:r}=this.parse(e,t);if(r)n[ge]={...n[ge]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...r};return n}parse(e,t){this.cleanup();let n=this.ctx;Gl(n,e,t.filePath),wl(n);let r=Ko(n);return bl(n,r)}}var mg=/\.$/,es="resolving it needs file access (generateBundle or the CLI)";function gg(e,t={}){let n=e[ge];if(!n)return e;let{pendingCallDefaultCandidates:r,pendingConstDefaultCandidates:i,pendingContextKeyCandidates:o,pendingDispatchEscapeCandidates:a,deferredEventNoSourceDiagnostics:s,untypedJsDocEventNames:p,...l}=n,c=(r??[]).filter((b)=>b.importSource!==void 0);if(c.length===0&&!i&&!o&&!a&&!s)return e;let d=e.filePath,f=t.filePath??(typeof d==="string"?d:""),h=[],g=(b,L,R,qe)=>{h.push(Yt({component:f,kind:"cross-file-unresolved",name:b,message:L,...R?{source:R}:{},...qe?{ignored:qe}:{}}))},m=(b,L)=>(b==="props"?e.props:e.moduleExports).find((R)=>R.name===L)?.source,y=(b)=>b==="props"?"Prop":"Module export";for(let b of o??[]){let L=xt(b);g(L,`setContext key \`${L}\` is imported from "${b.importSource}"; ${es}, so the context is omitted.`,b.source)}for(let b of i??[])g(b.propName,`${y(b.location)} "${b.propName}" defaults to \`${xt(b)}\` imported from "${b.importSource}"; ${es}, so the default shows the identifier and its type isn't read.`,m(b.location,b.propName));for(let b of c)g(b.propName,`${y(b.location)} "${b.propName}" defaults to \`${b.calleeName}()\` imported from "${b.importSource}"; ${es}, so its return type isn't read and the prop falls back to "any".`,m(b.location,b.propName));for(let b of a??[])g(b.calleeText,`\`${b.dispatcherName}\` is passed to \`${b.calleeText}\`, imported from "${b.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,b.source,b.ignored);let T=Array.from(new Set((a??[]).map((b)=>`\`${b.calleeText}\``))).join(", "),S=(s??[]).map((b)=>T?{...b,message:`${b.message.replace(mg,"")} in this file; ${T} may dispatch it, but imported helpers aren't read without file access.`}:b),D={...e,diagnostics:[...e.diagnostics??[],...S,...h]};return D[ge]=l,D}var Wl="sveld",Ul="0.38.1";var ts="5.57.1";var Jl=1;function je(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function bg(e){return{...e,props:je(e.props),moduleExports:je(e.moduleExports),slots:je(e.slots),events:je(e.events),typedefs:je(e.typedefs),...e.contexts?{contexts:je(e.contexts).map((t)=>({...t,properties:je(t.properties)}))}:{}}}function ns(e,t={}){let n=Array.from(e,([,o])=>{let{diagnostics:a,...s}=o;return bg(s)}).sort((o,a)=>be(o.moduleName,a.moduleName)),r={schemaVersion:Jl,generator:{name:Wl,version:Ul,svelteVersion:ts},total:n.length,components:n},i=t.entryExports?je(t.entryExports):void 0;if(i&&i.length>0)r.totalExports=i.length,r.exports=i;return r}var xg=" ",vg=120,Eg=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,Tg=200,Ql=/\s/,Sg=/\s{2}|[^\S ]/,kg=/["'`{}/]/g,Cg=/["'`{};/]/g,Zl=9,rs=10,wg=13,Gt=32,er=34,Pg=38,tr=39,Ag=40,Dg=41,Zn=42,Kl=46,ss=47,ec=59,Ng=62,$g=91,os=92,Lg=93,nr=96,as=123,_g=124,ps=125;function Ig(e){return Eg.test(e.slice(-200))}var Xl=[""];function Rg(e){let t=Xl[e];if(t===void 0)t=xg.repeat(e),Xl[e]=t;return t}function Mg(e,t){let n="";for(let r=e.length-1;r>=0&&n.length<t;r--)n=e[r]+n;return n.length>t?n.slice(-t):n}function jg(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===rs}function qg(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let r=t.charCodeAt(n-1);if(r!==Gt&&r!==Zl)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function Bg(e){while(e.length>0){let t=e[e.length-1];if(!Ql.test(t[t.length-1]))return;let n=t.trimEnd();if(n.length===t.length)return;if(n.length===0){e.pop();continue}e[e.length-1]=n;return}}function Og(e){if(e.includes("{"))return!1;let t=0,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(t!==0){if(i===t&&e.charCodeAt(r-1)!==os)t=0;continue}if(i===er||i===tr||i===nr){t=i;continue}if(i===ec&&++n>=2)return!0}return!1}function Fg(e){if(!Sg.test(e))return e.trimEnd();let t="",n=null,r=!1;for(let i=0;i<e.length;i++){let o=e[i],a=e[i-1];if(n){if(t+=o,n==="double"&&o==='"'&&a!=="\\"||n==="single"&&o==="'"&&a!=="\\"||n==="template"&&o==="`"&&a!=="\\")n=null;r=!1;continue}if(o==='"'||o==="'"||o==="`"){n=o==='"'?"double":o==="'"?"single":"template",t+=o,r=!1;continue}if(Ql.test(o)){if(!r&&t.length>0)t+=" ",r=!0;continue}t+=o,r=!1}return t.trimEnd()}function tc(e,t){let n=e[t],r=e.indexOf(n,t+1);while(r!==-1&&e.charCodeAt(r-1)===os)r=e.indexOf(n,r+1);return r}function nc(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function Vg(e){let t=new Map,n=[],r=kg,i=0;while(i<e.length){if(r.lastIndex=i,!r.test(e))break;i=r.lastIndex-1;let o=e.charCodeAt(i);if(o===ss){if(e.charCodeAt(i+1)===Zn){let a=nc(e,i);if(a===-1)break;i=a}}else if(o===er||o===tr||o===nr){let a=tc(e,i);if(a===-1)break;i=a}else if(o===as)n.push(i);else if(o===ps&&n.length>0)t.set(n.pop(),i);i++}return t}function Hg(e,t,n){for(let r=t;r<n;r++)if(!is(e.charCodeAt(r)))return!1;return!0}function is(e){if(e<=Gt)return e===Gt||e>=Zl&&e<=wg;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function rc(e,t,n,r){let i=[],o=Cg,a=t,s=t;while(s<n){if(o.lastIndex=s,!o.test(e))break;if(s=o.lastIndex-1,s>=n)break;let p=e.charCodeAt(s);if(p===ss){if(e.charCodeAt(s+1)===Zn){let l=nc(e,s);if(l===-1)break;s=l}s++;continue}if(p===er||p===tr||p===nr){let l=tc(e,s);if(l===-1)break;s=l+1;continue}if(p===as){let l=r.get(s);if(l===void 0||l>=n){s++;continue}if(a<s)i.push(e.slice(a,s));let c=s+1;if(Hg(e,c,l)){i.push("{}"),s=l+1,a=s;continue}let d=e.slice(c,l),f=e.charCodeAt(c)===rs;if(!f&&!d.includes("/*")&&!Og(d)&&!Ig(Mg(i,Tg))){let h=rc(e,c,l,r),g=h.trim();if(!g.includes(`
53
+ `)){let m=g.endsWith(";")?g.slice(0,-1):g,y=`{ ${Fg(m)} }`;if(y.length<=vg){i.push(y),s=l+1,a=s;continue}}if(i.push("{"),h.charCodeAt(0)!==ec)i.push(`
54
+ `);if(h.length>0)i.push(h);s=l,a=l;continue}if(i.push("{"),!f)i.push(`
55
+ `);s=c,a=c;continue}if(p===ps){if(a<s)i.push(e.slice(a,s));if(qg(i),!jg(i))i.push(`
56
+ `);i.push("}"),s++,a=s;continue}if(a<s)i.push(e.slice(a,s));if(Bg(i),i.push(";"),e.charCodeAt(s+1)!==rs)i.push(`
57
+ `);s++,a=s}if(a<n)i.push(e.slice(a,n));return i.join("")}function Gg(e){return rc(e,0,e.length,Vg(e))}function zg(e){if(!e.includes(" "))return e;let t="",n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(n!==0){if(t+=e[r],i===n&&e.charCodeAt(r-1)!==os)n=0;continue}if(i===er||i===tr||i===nr){n=i,t+=e[r];continue}if(i===Gt&&t.charCodeAt(t.length-1)===Gt)continue;t+=e[r]}return t}function Wg(e){return e===ps||e===Lg||e===Dg||e===Ng}function Ug(e,t,n){return n-t>=3&&e.charCodeAt(t)===ss&&e.charCodeAt(t+1)===Zn&&e.charCodeAt(t+2)===Zn}function Yl(e,t,n){let r=e.indexOf("*/",t);return r!==-1&&r+2<=n}function Jg(e,t,n){let r=e.charCodeAt(t);if(r===_g||r===Pg)return!0;return r===Kl&&t+1<n&&e.charCodeAt(t+1)!==Kl}function Kg(e){let t=[],n=[],r=e.length,i=0,o=!1,a=0,s=0;while(s<=r){let c=e.indexOf(`
58
+ `,s);if(c===-1)c=r;let d=c+1,f=s,h=c;while(f<h&&is(e.charCodeAt(f)))f++;while(h>f&&is(e.charCodeAt(h-1)))h--;if(f===h){let S=n.length>0?n[n.length-1]:void 0;if(S!==void 0&&S!==""){let D=S.charCodeAt(S.length-1);if(D!==as&&D!==Ag&&D!==$g)t.push(0),n.push("")}s=d;continue}if(o){if(t.push(a),n.push(` ${e.slice(f,h)}`),Yl(e,f,h))o=!1;s=d;continue}let g=Ug(e,f,h),m=g&&Yl(e,f,h);if(g&&!m){t.push(i),n.push(e.slice(f,h)),o=!0,a=i,s=d;continue}let y=Wg(e.charCodeAt(f)),T=Math.max(0,i-(y?1:0))+(Jg(e,f,h)?1:0);if(y&&T===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(T),n.push(zg(e.slice(f,h))),s=d,m)continue;i=Ye(e,void 0,f,h,i)}let p=n.length;while(p>0&&n[p-1]==="")p--;let l=[];for(let c=0;c<p;c++){if(c>0)l.push(`
59
+ `);let d=t[c];if(d>0)l.push(Rg(d));l.push(n[c])}return l.join("")}function ic(e){return`${Kg(Gg(e))}
60
+ `}var ue="any",ae="",Xg="Record<string, any>",ds="Record<string, never>",fs=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Yg=/CustomEvent/,Qg=/^[A-Z]/,Zg=/\n/,lc=/=>/,ey=/(?:^|\n)@default\b/,hs=/\n/g,ty=/^([ \t]*\*) +$/gm,ny=/\s+/g,ut=/(^|[^.\w])Snippet(?:\s*<|\b)/,ry=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,iy=/[.*+?^${}()|[\]\\]/g,sy=/^const\s+/,oy=/^export /,ay=/[^\w$]/g;function ms(e){return e.replace(sy,"")}function py(e){if(!e)return;return e.replace(hs,`
61
+ * `)}function ir(e){if(!e)return"";return`/** ${ye(e)} */`}function sr(e){if(!e)return"";return`/**
62
+ * ${ye(e).replace(hs,`
63
+ * `)}
64
+ */`}function cc(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function ly(e){let t=cc(e);if(t===void 0)return;return`* ${t.replace(hs,`
65
+ * `)}
66
+ `}function cy(e,t){if(!t)return[`@${e}`];if(!t.includes(`
67
+ `))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
68
+ `)]}function gs(e){let t=[];for(let{name:n,body:r}of e??[])t.push(...cy(n,r));return t}function rr(e,t,n){let r=cc(n),i=gs(t),o=i.length>0;if(!e&&!o&&!r)return"";if(!o&&!r)return e?.includes(`
69
+ `)?sr(e):ir(e);let a=[];if(e)a.push(...e.split(`
70
+ `));if(a.push(...i),r)a.push(...r.split(`
71
+ `));return`/**
72
+ * ${ye(a.join(`
73
+ * `))}
74
+ */`}function uy(e){let t=gs(e);if(t.length===0)return"";return t.map((n)=>`* ${n}
75
+ `).join("")}function or(e){if(e===void 0)return ue;return`${e}
76
+ `}function ar(e){if(e.typedefs.length===0)return ae;return e.typedefs.map((t)=>{let n,r=gs(t.tags);if(r.length===0)n=t.description?`${sr(t.description)}
77
+ `:"";else{let i=t.description?[...t.description.split(`
78
+ `),...r]:r;n=`/**
79
+ * ${ye(i.join(`
80
+ * `))}
81
+ */
82
+ `}return`${n}export ${t.ts}`.replace(ty,"$1")}).join(`
83
+
84
+ `)}var sc=new Map;function cs(e,t){let n=sc.get(t);if(n===void 0){let r=t.replace(iy,"\\$&");n=new RegExp(`\\b${r}\\b`),sc.set(t,n)}return n.test(e)}var oc,ac=[];function ys(e){if(e!==oc)oc=e,ac=z(e,",");return ac}function dy(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(ys(e[1]??"")[n]??t).trim()}))}function fy(e,t){let n=dy(e).filter(({name:r})=>cs(t,r));if(n.length===0)return{declSuffix:ae,refSuffix:ae};return{declSuffix:`<${n.map(({constraint:r})=>ms(r)).join(", ")}>`,refSuffix:`<${n.map(({name:r})=>r).join(", ")}>`}}function uc(e){if(!e.contexts||e.contexts.length===0)return ae;let t=e.generics===null?[]:e.generics[0].split(",").map((n,r)=>({name:n.trim(),constraint:(ys(e.generics?.[1]??"")[r]??n).trim()}));return e.contexts.map((n)=>{let r=n.properties.map((p)=>{let l=p.description?`${ir(p.description)}
85
+ `:"",c=p.optional?"?":"";return`${l}${p.name}${c}: ${p.type};`}).join(`
86
+ `),i=n.description?`${sr(n.description)}
87
+ `:"",o=t.filter(({name:p})=>n.type!==void 0&&cs(n.type,p)||n.properties.some((l)=>cs(l.type,p))).map(({constraint:p})=>p),a=o.length>0?`<${o.map(ms).join(", ")}>`:"";if(n.type!==void 0)return`${i}export type ${n.typeName}${a} = ${n.type};`;if(n.properties.length===0)return n.hasUnresolvedSpread?`${i}export type ${n.typeName} = Record<string, any>;`:`${i}export type ${n.typeName} = Record<string, never>;`;let s=n.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${n.typeName}${a} = {
88
+ ${r}
89
+ }${s};`}).join(`
90
+
91
+ `)}function We(e){return fs.test(e)?e:JSON.stringify(e)}function dc(e,t){if(!e)return;return`* ${t||e}
92
+ `}function dt(e,t,n){return[dc(py(e)),ly(t),uy(n)].filter(Boolean).join("")}function Ue(e){return e.length>0?`/**
93
+ ${ye(e)}*/`:ae}function hy(e){let t=e.props.filter((m)=>!m.isFunctionDeclaration&&m.kind!=="const"),n=new Set([...t.map((m)=>m.name),...Array.from(e.canonicalPropNames??[])]),r=t.map((m)=>{let y=typeof m.value==="string"?m.value.replace(ny," "):m.value,S=ey.test(m.description??"")||m.value===void 0||m.value==="undefined",D=[dt(m.description,m.deprecated,m.tags),dc(m.constant,"@constant"),S?null:`* @default ${y}
94
+ `].filter(Boolean).join(""),b=m.constant&&!m.isFunction?m.value:m.type||ue;return`
95
+ ${Ue(D)}
96
+ ${We(m.name)}${m.isRequired?"":"?"}: ${b};`}),i=e.canonicalPropsType?r.filter((m,y)=>{let T=t[y];return T?!(e.canonicalPropNames?.has(T.name)??!1):!0}):r,o=(e.slots||[]).filter((m)=>!m.default&&m.name!=null&&!n.has(m.name)).map((m)=>{let y=m.name,T=We(y),S=rr(m.description,m.tags,m.deprecated),D=S?`${S}
97
+ `:"",L=m.slot_props&&m.slot_props!=="Record<string, never>"?`(this: void, ...args: [${m.slot_props}]) => void`:"(this: void) => void";return`
98
+ ${D}${T}?: ${L};`}),a=(e.slots||[]).find((m)=>m.default||m.name===null),s=a&&!n.has("children")?(()=>{let m=rr(a.description,a.tags,a.deprecated),y=m?`${m}
99
+ `:"",S=a.slot_props&&a.slot_props!=="Record<string, never>"?`(this: void, ...args: [${a.slot_props}]) => void`:"(this: void) => void";return`
100
+ ${y}children?: ${S};`})():"",p=[...o,s].filter(Boolean),l=[...i,...p].join(`
101
+ `),c=_y(e.moduleName),d=ae,f=e.generics?`<${ys(e.generics[1]).map((m)=>ms(m.trim())).join(", ")}>`:"",h=e.generics?`<${e.generics[0]}>`:"",g=e.canonicalPropsType?`
102
+ type $Props${f} = ${e.canonicalPropsType}${l.trim()===""?"":` & {${l}
103
+ }`};
104
+ `:`
105
+ type $Props${f} = {
106
+ ${l}
107
+ };
108
+ `;if(e.rest_props?.type==="Element"){let m;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)m=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else m="HTMLAttributes<HTMLElement>";else m=e.rest_props.name.split("|").map((S)=>`SvelteHTMLElements["${S.trim()}"]`).join(" & ");let y="[key: `data-${string}`]: unknown;",T=e.rest_props.description?e.rest_props.description.includes(`
109
+ `)?`${sr(e.rest_props.description)}
110
+ `:`${ir(e.rest_props.description)}
111
+ `:"";if(e.extends===void 0)d=`
112
+ ${T}${m?`type $RestProps = ${m};
113
+ `:""}
114
+ ${e.canonicalPropsType?`type $Props${f} = (${e.canonicalPropsType}) & {${l}
115
+
116
+ ${y}
117
+ };`:`type $Props${f} = {
118
+ ${l}
119
+
120
+ ${y}
121
+ };`}
122
+
123
+ export type ${c}${f} = Omit<$RestProps, keyof $Props${h}> & $Props${h};
124
+ `;else d=`
125
+ ${T}${m?`type $RestProps = ${m};
126
+ `:""}
127
+ ${e.canonicalPropsType?`type $Props${f} = (${e.canonicalPropsType}) & {${l}
128
+
129
+ ${y}
130
+ };`:`type $Props${f} = {
131
+ ${l}
132
+
133
+ ${y}
134
+ };`}
135
+
136
+ export type ${c}${f} = Omit<$RestProps, keyof ($Props${h} & ${e.extends.interface})> & Omit<${e.extends.interface}, keyof $Props${h}> & $Props${h};
137
+ `}else if(l.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)d=`
138
+ export type ${c}${f} = ${ds};
139
+ `;else if(e.canonicalPropsType)d=`
140
+ ${g}
141
+ export type ${c}${f} = ${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${h}> & `}$Props${h};
142
+ `;else if(e.extends===void 0)d=`
143
+ export type ${c}${f} = {
144
+ ${l}
145
+ };
146
+ `;else d=`
147
+ type $Props${f} = {
148
+ ${l}
149
+ };
150
+
151
+ export type ${c}${f} = Omit<${e.extends.interface}, keyof $Props${h}> & $Props${h};
152
+ `;return{props_name:c,prop_def:d}}function my(e){if(e.slots.length===0)return ds;let t=e.slots.map(({name:n,slot_props:r,...i})=>{let o=i.default||n===null?"default":We(n??""),a=rr(i.description,i.tags,i.deprecated);return`${a?`${a}
153
+ `:""}${o}: ${or(r)};`}).join(`
154
+ `);return e.slots.length===1?`{${t}}`:`{
155
+ ${t}
156
+ }`}var gy=()=>"WindowEventMap",yy=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function ls(e=ue){if(Yg.test(e))return e;return`CustomEvent<${e}>`}function by(e){return yy.has(e)}function xy(e){switch(e.type){case"dispatched":return ls(e.detail);case"forwarded":{let t=e.element,r=!(t&&Qg.test(t))||by(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&r),o=e.detail==="null"&&!r;if(i||o)return ls(e.detail);else if(r)return`${gy()}["${e.name}"]`;else return ls()}default:return e}}function pc(e){if(e.events.length===0)return Xg;let t=e.events.map((n)=>{let r="",i=rr(n.description,n.tags,n.deprecated);if(i)r=`${i}
157
+ `;return`${r}${We(n.name)}: ${xy(n)};
158
+ `}).join("");return e.events.length===1?`{${t}}`:`{
159
+ ${t}}`}function vy(e){let t=e.type==="() => any";if(e.type&&lc.test(e.type)&&!t)return e.type;else if(e.params&&e.params.length>0)return`(${Ae(e.params)}) => ${e.returnType||ue}`;else if(e.returnType)return`() => ${e.returnType}`;else return e.type||ue}function fc(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let n=dt(t.description,t.deprecated,t.tags),r=vy(t);return`
160
+ ${Ue(n)}
161
+ ${We(t.name)}: ${r};`}).join(`
162
+ `)}function Ey(e){let t=Iy(e.moduleName),n=fc({props:e.props});if(n.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${ds};`};let{declSuffix:r,refSuffix:i}=fy(e.generics,n);return{exports_name:t,exports_ref:`${t}${i}`,exports_def:`export type ${t}${r} = {${n}
163
+ };`}}function Ty(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length===0?ae:t.join(" | ")}function hc(e){return e==="default"?"$$Component":e}function Sy(e){let t=hc(e.moduleName),n=e.bindings===ae?'""':e.bindings;return`declare const ${t}: Component<
164
+ ${e.propsRef},
165
+ ${e.exportsRef},
166
+ ${n}
167
+ >;
168
+ export default ${t};`}function ky(e){let t=hc(e.moduleName),n=`${t}Component`,r=e.bindings===ae?'""':e.bindings,i=e.eventsRef?`$on?<K extends keyof ${e.eventsRef} & string>(type: K, callback: (e: ${e.eventsRef}[K]) => void): () => void;`:"$on?(type: string, callback: (e: any) => void): () => void;";return`interface ${n} {
169
+ new ${e.generic}(
170
+ options: ComponentConstructorOptions<${e.propsRef}>
171
+ ): SvelteComponent<${e.propsRef}${e.eventsRef?`, ${e.eventsRef}`:""}> & ${e.exportsRef};
172
+ ${e.generic}(
173
+ this: void,
174
+ internals: ComponentInternals,
175
+ props: ${e.propsRef}
176
+ ): {
177
+ ${i}
178
+ $set?(props: Partial<${e.propsRef}>): void;
179
+ } & ${e.exportsRef};
180
+ element?: typeof HTMLElement;
181
+ z_$$bindings?: ${r};
182
+ }
183
+ declare const ${t}: ${n};
184
+ export default ${t};`}function Cy(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function wy(e){if(!e.componentComment)return"";if(!Zg.test(e.componentComment))return ir(e.componentComment.trim());return`/*${ye(e.componentComment).split(`
185
+ `).map((t)=>`* ${t}`).join(`
186
+ `)}
187
+ */`}function us(e){return fs.test(e)?e:JSON.stringify(e)}function Py(e){let t=[],n=new Map;for(let r of e.moduleExports){if(r.kind!=="re-export"||!r.reExport)continue;let{from:i,imported:o}=r.reExport,a=dt(r.description,r.deprecated,r.tags),s=us(r.name);if(o==="*"){let c=r.name==="*"?"*":`* as ${s}`;t.push(`${Ue(a)}
188
+ export ${c} from ${JSON.stringify(i)};`);continue}let p=`${i}\x00${a}`,l=n.get(p);if(!l)l={comments:a,from:i,specifiers:[]},n.set(p,l),t.push(p);l.specifiers.push(o===r.name?s:`${us(o)} as ${s}`)}return t.map((r)=>{let i=n.get(r);if(!i)return r;return`${Ue(i.comments)}
189
+ export { ${i.specifiers.join(", ")} } from ${JSON.stringify(i.from)};`}).join(`
190
+
191
+ `)}function bs(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${We(e.name)}${n}: ${e.type??ue}`;let r=Ae(e.params??[]);if(e.kind==="constructor")return`constructor(${r})`;let i=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${We(e.name)}${n}${i}(${r}): ${e.returnType??ue}`}function Ay(e,t){let n=e.localName??e.name,r=n!==e.name,i=`export { ${n}${r?` as ${us(e.name)}`:""} };`;if(t.has(n))return i;t.add(n);let o=e.typeParameters?`<${e.typeParameters}>`:"",a=(e.members??[]).map((c)=>[Ue(dt(c.description,c.deprecated,c.tags)),`${bs(c)};`].filter(Boolean).join(`
192
+ `)).join(`
193
+
194
+ `),s=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,p=`${r?"":"export "}declare ${e.abstract?"abstract ":""}class ${n}${o}${s}`;return`
195
+ ${[Ue(dt(e.description,e.deprecated,e.tags)),a?`${p} {
196
+ ${a}
197
+ }`:`${p} {}`,r?i:""].filter(Boolean).join(`
198
+ `)}`}function Dy(e){let t=Py(e),n=new Set,r=e.moduleExports.filter((i)=>i.kind!=="re-export").map((i)=>{if(i.kind==="class")return Ay(i,n);let o=!fs.test(i.name),a=o?{...i,name:Ny(i.name)}:i,s=dt(a.description,a.deprecated,a.tags),p,l=a.type&&lc.test(a.type),c=a.type==="() => any",d=a.typeParameters?`<${a.typeParameters}>`:"";if(a.kind==="const"&&!l)p=`export declare const ${a.name}: ${a.type||ue};
199
+ `;else if(a.params&&a.params.length>0)p=`export declare function ${a.name}${d}(${Ae(a.params)}): ${a.returnType||ue};`;else if(a.returnType)p=`export declare function ${a.name}${d}(): ${a.returnType};`;else if(l&&a.type&&!c){let[f,h,...g]=a.type.split("=>"),m=g.map((y)=>` => ${y.trim()}`).join("");p=`export declare function ${a.name}${f.trimEnd()}: ${h.trim()}${m};`}else if(l&&a.type){let[f,h,...g]=a.type.split("=>"),m=g.map((y)=>` => ${y.trim()}`).join("");p=`export declare function ${a.name}${f.trimEnd()}: ${h.trim()}${m};`}else if(a.kind==="const")p=`export declare const ${a.name}: ${a.type||ue};
200
+ `;else p=`export declare let ${a.name}: ${a.type||ue};`;if(o)p=`${p.replace(oy,"").trimEnd()}
201
+ export { ${a.name} as ${JSON.stringify(i.name)} };`;return`
202
+ ${Ue(s)}
203
+ ${p}`}).join(`
204
+ `);return[t,r].filter(Boolean).join(`
205
+
206
+ `)}function Ny(e){return`__export_${e.replace(ay,"_")}`}var $y=120;function Ly(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,r=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&r.every((i)=>!i.includes(`
207
+ `))){let i=`${n}${r.join(", ")}> {}`;if(i.length<=$y)return i}return`${n}
208
+ ${e.genericProps},
209
+ ${e.events},
210
+ ${e.slots}
211
+ > {
212
+ ${e.accessors}
213
+ }`}function _y(e){return`${e}Props`}function Iy(e){return`${e}Exports`}function Ry(e,t){let n=Ns(e),{moduleName:r,typedefs:i,generics:o,props:a,moduleExports:s,slots:p,events:l,rest_props:c,extends:d,componentComment:f,contexts:h}=e,g=t?.format==="component",m=o!==null,{props_name:y,prop_def:T}=hy({moduleName:r,props:a,rest_props:c,extends:d,generics:o,slots:p,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType}),S=o?`<${o[1]}>`:"",D=o?`${y}<${o[0]}>`:y,b=g&&l.length>0?`type $Events${S} = ${pc({events:l})};`:"",L=o?`$Events<${o[0]}>`:"$Events",R=g&&(m||b!==""),qe=Dy({moduleExports:s}),Wt=ar({typedefs:i}),Ut=uc({contexts:h,generics:o}),Jt=(n?.typeImportStatements??[]).join(`
214
+ `),ht=[...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
215
+
216
+ `),{exports_ref:Ps,exports_def:As}=g?Ey({props:a,moduleName:r,generics:o}):{exports_ref:ae,exports_def:ae},Ds=g?Ty({props:a}):ae,lr=!ry.test(Jt)&&(ut.test(T)||ut.test(qe)||ut.test(Wt)||ut.test(Ut)||ut.test(ht)||ut.test(As)),Lc=c?.type==="Element"&&(c.name!=="svelte:element"||c.name==="svelte:element"&&c.thisValue),_c=c?.type==="Element"&&c.name==="svelte:element"&&!c.thisValue,Ic=[g?R?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${lr?", Snippet":""} } from "svelte";`:`import type { Component${lr?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${lr?", type Snippet":""} } from "svelte";`,Lc?'import type { SvelteHTMLElements } from "svelte/elements";':"",_c?'import type { HTMLAttributes } from "svelte/elements";':"",Jt,Cy({extends:d})].filter(Boolean).join(`
217
+ `),Rc=g?R?ky({moduleName:r,generic:S,propsRef:D,exportsRef:Ps,bindings:Ds,...b?{eventsRef:L}:{}}):Sy({moduleName:r,propsRef:D,exportsRef:Ps,bindings:Ds}):Ly({moduleName:r,generic:S,genericProps:D,events:pc({events:l}),slots:my({slots:p}),accessors:fc({props:a})}),Mc=[qe,Wt,ht,Ut,T,As,b,[wy({componentComment:f}),Rc].filter(Boolean).join(`
218
+ `)].map((jc)=>jc.trim()).filter(Boolean).join(`
219
+
220
+ `);return ic([Ic,Mc].filter(Boolean).join(`
221
+
222
+ `))}var mc=/`/g,gc=/\s+/g,de="--",yc=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
223
+ | :- | :- | :- | :- | :- | :- | :- | :- |
224
+ `,bc=`| Slot name | Default | Props | Fallback | Description |
225
+ | :- | :- | :- | :- | :- |
226
+ `,xc=`| Event name | Type | Detail | Description |
227
+ | :- | :- | :- | :- |
228
+ `,Es=`| Name | Kind | Type | Description |
229
+ | :- | :- | :- | :- |
230
+ `,My=`| Member | Signature | Description |
231
+ | :- | :- | :- |
232
+ `,vc=`| Part name | Description |
233
+ | :- | :- |
234
+ `,Ec=`| Property name | Type | Default value | Description |
235
+ | :- | :- | :- | :- |
236
+ `,Ts=/\|/g,jy=/</g,qy=/>/g,Je=/\n/g,By=/^[A-Za-z_$][\w$]*$/,Oy=/\s*\n\s*/g,Fy=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,Vy=/[&<|`*\\_]/;function Ss(e){if(!Vy.test(e))return e;return e.replace(Fy,(t)=>t==="&"?"&amp;":t==="<"?"&lt;":t==="_"?"&#95;":`&#${t.charCodeAt(0)};`)}function Tc(e){return`<code>${Ss(e.includes(`
237
+ `)?e.replace(Oy," "):e)}</code>`}var Hy=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function Gy(e){if(!e.includes("{@link"))return e;return e.replace(Hy,(t,n,r)=>`[${r===void 0?n:r.trim()}](${n})`)}function xs(e){return e.includes("```")||e.includes("~~~")}function vs(e){return wc(Gy(e))}var zy=/^([ \t]*)(`{3,}|~{3,})(.*)$/,Wy=/^\n/,Uy=/\n$/;function Sc(e){let t=(o)=>({kind:"prose",text:vs(o.join(`
238
+ `))});if(!xs(e))return[t([e])];let n=e.split(`
239
+ `),r=[],i=[];for(let o=0;o<n.length;o++){let a=zy.exec(n[o]),[,s="",p="",l=""]=a??[];if(!a||p[0]==="`"&&l.includes("`")){i.push(n[o]);continue}if(i.push(""),i.length>1)r.push(t(i));let c=[],d=new RegExp(`^[ \\t]*${p[0]}{${p.length},}[ \\t]*$`);for(o++;o<n.length&&!d.test(n[o]);o++){let f=n[o],h=0;while(h<s.length&&(f[h]===" "||f[h]==="\t"))h++;c.push(f.slice(h))}r.push({kind:"code",code:c.join(`
240
+ `)}),i=[""]}if(i.length>1||r.length===0)r.push(t(i));return r}function kc(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];if(r.kind==="code"){t+=`<pre><code>${Ss(r.code).replace(Je,"<br />")}</code></pre>`;continue}let i=r.text;if(e[n-1]?.kind==="code")i=i.replace(Wy,"");if(e[n+1]?.kind==="code")i=i.replace(Uy,"");t+=i.replace(Ts,"&#124;").replace(Je,"<br />")}return t}function pe(e){if(e===void 0)return de;return Tc(e)}function Cc(e){if(!e.reExport)return pe(e.type);let{from:t,imported:n}=e.reExport,r=n==="*"?"":By.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return pe(`typeof import(${JSON.stringify(t)})${r}`)}function wc(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(jy,"&lt;").replace(qy,"&gt;")}function ks(e){if(e===void 0)return de;return Tc(e)}function Ke(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${wc(t).replace(Je," ").replace(Ts,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function pr(e){if(e===void 0||e.trim().length===0)return de;return kc(Sc(e))}function Pc(e){if(e===void 0||e==="{}")return de;return pe(or(e).replace(Je," "))}function Ac(e){if(e===void 0)return de;return`<code>${Ss(e).replace(Je,"<br />")}</code>`}function ft(e,t){let n=e!==void 0&&e.trim().length>0;if(!(n&&xs(e))&&!t?.some(({body:a})=>a&&xs(a))){let a=n?[vs(e)]:[];for(let{name:s,body:p}of t??[]){let l=p?.trim();a.push(l?`@${s} ${vs(l)}`:`@${s}`)}if(a.length===0)return de;return a.join(`
241
+ `).replace(Ts,"&#124;").replace(Je,"<br />")}let r=[],i=(a)=>{let s=r.at(-1);if(s?.kind==="prose")s.text+=a;else r.push({kind:"prose",text:a})},o=(a,s)=>{if(r.length>0)i(`
242
+ `);if(a)i(a);for(let p of Sc(s))if(p.kind==="prose")i(p.text);else r.push(p)};if(n)o("",e);for(let{name:a,body:s}of t??[]){let p=s?.trim();o(p?`@${a} `:`@${a}`,p??"")}if(r.length===0)return de;return kc(r)}function Dc(e){if(e===void 0)return de;return pe(e.replace(Je," "))}function Jy(e){let t=[e.extends?`Extends ${pe(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>pe(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function Nc(e,t){let n=new Set;for(let r of t){if(r.kind!=="class")continue;let i=Jy(r);if(!r.members?.length&&!i)continue;let o=r.localName??r.name;if(n.has(o))continue;if(n.add(o),e.append("h4",`\`${o}\` members`),i)e.append("raw",`${i}
243
+
244
+ `);if(!r.members?.length)continue;e.append("raw",My);for(let a of r.members)e.append("raw",`| ${Ke(a.name,a.deprecated)} | ${pe(bs(a))} | ${ft(a.description,a.tags)} |
245
+ `);e.append("raw",`
246
+ `)}}var Ky=/[^\w\- ]+/g,Xy=/\s+/g;function Yy(e,t){let n=e.toLowerCase().replace(mc,"").replace(Ky,"").replace(Xy,"-"),r=t.get(n)??0;return t.set(n,r+1),r===0?n:`${n}-${r}`}class zt{sourceParts=[];hasToC=!1;toc=[];onAppend;constructor(e={}){this.onAppend=e.onAppend}get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
247
+
248
+ `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let n=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(n)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this.onAppend?.call(this,e,this),this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t="<!-- __TOC__ -->",n=e.indexOf(t);if(n===-1)return e;let r=new Map,i=this.toc.map(({indent:o,raw:a})=>`${" ".repeat(o)}- [${a}](#${Yy(a,r)})`).join(`
249
+ `);return e.slice(0,n)+i+e.slice(n+t.length)}}class $c extends zt{}function ws(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)Qy(e,n);let r=ns(t);for(let i of r.components)tb(e,i)}function Qy(e,t){e.append("h2","Exports"),e.append("raw",Es);for(let n of t){let r=(n.type??n.value)?.replace(gc," ").trim();e.append("raw",`| ${Ke(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${pe(r)} | ${pr(n.description)} |
250
+ `)}e.append("raw",`
251
+ `),e.append("divider")}function Zy(e){return e.kind==="const"||e.isFunctionDeclaration}function eb(e,t){e.append("h3","Module exports"),e.append("raw",Es);for(let n of t)e.append("raw",`| ${Ke(n.name,n.deprecated)} | ${`<code>${n.kind}</code>`} | ${Cc(n)} | ${ft(n.description,n.tags)} |
252
+ `);e.append("raw",`
253
+ `),Nc(e,t)}function Cs(e,t,n,r){if(t.length>0)n(),e.append("raw",`
254
+ `);else e.append("p",r??"None.")}function tb(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${pe(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
255
+ ${ar({typedefs:t.typedefs})}
256
+ \`\`\`
257
+
258
+ `);if(e.append("h3","Props"),Cs(e,t.props,()=>{e.append("raw",yc);let n=(i)=>i.reactive?0:i.constant?2:1,r=t.props.map((i,o)=>({prop:i,index:o})).sort((i,o)=>n(i.prop)-n(o.prop)||i.index-o.index).map(({prop:i})=>i);for(let i of r){let o=Zy(i)?"accessor":i.kind;e.append("raw",`| ${Ke(i.name,i.deprecated)} | ${i.isRequired?"Yes":"No"} | ${`<code>${o}</code>`} | ${i.reactive?"Yes":"No"} | ${i.binding??"--"} | ${pe(i.type)} | ${ks(i.value)} | ${ft(i.description,i.tags)} |
259
+ `)}}),t.moduleExports.length>0)eb(e,t.moduleExports);if(e.append("h3","Slots"),Cs(e,t.slots,()=>{e.append("raw",bc);for(let n of t.slots)e.append("raw",`| ${Ke(n.default?de:n.name??de,n.deprecated)} | ${n.default?"Yes":"No"} | ${Pc(n.slot_props)} | ${Ac(n.fallback)} | ${ft(n.description,n.tags)} |
260
+ `)}),e.append("h3","Events"),Cs(e,t.events,()=>{e.append("raw",xc);for(let n of t.events)e.append("raw",`| ${Ke(n.name,n.deprecated)} | ${n.type} | ${Dc(n.detail)} | ${ft(n.description,n.tags)} |
261
+ `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",vc);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${pr(n.description)} |
262
+ `);e.append("raw",`
263
+ `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",Ec);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${pe(n.type)} | ${ks(n.default)} | ${pr(n.description)} |
264
+ `);e.append("raw",`
265
+ `)}}function nb(e,t){let n=new zt({onAppend:(r,i)=>{t?.onAppend?.call(null,r,i,e)}});return ws(n,e),n.end()}export{$c as BrowserWriterMarkdown,Jl as COMPONENT_API_SCHEMA_VERSION,Zi as ComponentParser,zt as MarkdownDocument,qc as asNormalizedPath,ns as buildComponentApiDocument,gg as finalizeWithoutCrossFileResolution,or as formatTsProps,uc as getContextDefs,ar as getTypeDefs,ws as renderComponentsToMarkdown,nb as writeMarkdownCore,Ry as writeTsDefinition};