prettier 1.6.1 → 2.0.0.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +316 -293
- data/CONTRIBUTING.md +6 -9
- data/LICENSE +1 -1
- data/README.md +11 -12
- data/dist/haml/embed.js +53 -0
- data/dist/haml/parser.js +31 -0
- data/{src → dist}/haml/parser.rb +0 -0
- data/dist/haml/printer.js +336 -0
- data/dist/parser/getInfo.js +17 -0
- data/{src → dist}/parser/netcat.js +1 -0
- data/dist/parser/parseSync.js +128 -0
- data/dist/parser/server.rb +140 -0
- data/dist/plugin.js +143 -0
- data/dist/prettier.js +15 -0
- data/dist/rbs/parser.js +34 -0
- data/{src → dist}/rbs/parser.rb +0 -0
- data/dist/rbs/printer.js +517 -0
- data/dist/ruby/embed.js +110 -0
- data/dist/ruby/nodes/alias.js +59 -0
- data/{src → dist}/ruby/nodes/aref.js +26 -35
- data/dist/ruby/nodes/args.js +165 -0
- data/dist/ruby/nodes/arrays.js +126 -0
- data/dist/ruby/nodes/assign.js +41 -0
- data/dist/ruby/nodes/blocks.js +68 -0
- data/dist/ruby/nodes/calls.js +220 -0
- data/dist/ruby/nodes/case.js +50 -0
- data/dist/ruby/nodes/class.js +54 -0
- data/dist/ruby/nodes/commands.js +124 -0
- data/dist/ruby/nodes/conditionals.js +242 -0
- data/dist/ruby/nodes/constants.js +38 -0
- data/dist/ruby/nodes/flow.js +66 -0
- data/dist/ruby/nodes/hashes.js +130 -0
- data/dist/ruby/nodes/heredocs.js +30 -0
- data/dist/ruby/nodes/hooks.js +35 -0
- data/dist/ruby/nodes/ints.js +27 -0
- data/dist/ruby/nodes/lambdas.js +69 -0
- data/dist/ruby/nodes/loops.js +73 -0
- data/dist/ruby/nodes/massign.js +73 -0
- data/dist/ruby/nodes/methods.js +70 -0
- data/dist/ruby/nodes/operators.js +70 -0
- data/dist/ruby/nodes/params.js +89 -0
- data/dist/ruby/nodes/patterns.js +109 -0
- data/dist/ruby/nodes/regexp.js +45 -0
- data/dist/ruby/nodes/rescue.js +82 -0
- data/dist/ruby/nodes/return.js +75 -0
- data/dist/ruby/nodes/statements.js +111 -0
- data/dist/ruby/nodes/strings.js +218 -0
- data/dist/ruby/nodes/super.js +30 -0
- data/dist/ruby/nodes/undef.js +26 -0
- data/dist/ruby/nodes.js +151 -0
- data/dist/ruby/parser.js +34 -0
- data/{src → dist}/ruby/parser.rb +1215 -252
- data/dist/ruby/printer.js +125 -0
- data/dist/ruby/toProc.js +93 -0
- data/dist/types/haml.js +4 -0
- data/dist/types/plugin.js +3 -0
- data/dist/types/rbs.js +4 -0
- data/dist/types/ruby.js +4 -0
- data/dist/types/utils.js +2 -0
- data/dist/types.js +30 -0
- data/dist/utils/containsAssignment.js +15 -0
- data/dist/utils/getTrailingComma.js +6 -0
- data/dist/utils/hasAncestor.js +15 -0
- data/{src → dist}/utils/inlineEnsureParens.js +16 -17
- data/dist/utils/isEmptyBodyStmt.js +10 -0
- data/dist/utils/isEmptyStmts.js +10 -0
- data/dist/utils/literal.js +8 -0
- data/dist/utils/literallineWithoutBreakParent.js +8 -0
- data/dist/utils/makeCall.js +13 -0
- data/dist/utils/noIndent.js +11 -0
- data/dist/utils/printEmptyCollection.js +44 -0
- data/dist/utils/skipAssignIndent.js +15 -0
- data/dist/utils.js +30 -0
- data/node_modules/prettier/bin-prettier.js +313 -190
- data/node_modules/prettier/doc.js +191 -323
- data/node_modules/prettier/index.js +2753 -3677
- data/node_modules/prettier/package.json +1 -1
- data/node_modules/prettier/parser-angular.js +13 -14
- data/node_modules/prettier/parser-babel.js +7 -7
- data/node_modules/prettier/parser-espree.js +7 -7
- data/node_modules/prettier/parser-flow.js +7 -7
- data/node_modules/prettier/parser-glimmer.js +1 -1
- data/node_modules/prettier/parser-graphql.js +1 -1
- data/node_modules/prettier/parser-html.js +17 -17
- data/node_modules/prettier/parser-markdown.js +9 -9
- data/node_modules/prettier/parser-meriyah.js +7 -7
- data/node_modules/prettier/parser-postcss.js +2 -2
- data/node_modules/prettier/parser-typescript.js +7 -7
- data/node_modules/prettier/parser-yaml.js +2 -2
- data/node_modules/prettier/third-party.js +143 -78
- data/package.json +26 -18
- metadata +74 -67
- data/src/haml/embed.js +0 -87
- data/src/haml/parser.js +0 -23
- data/src/haml/printer.js +0 -438
- data/src/parser/parseSync.js +0 -172
- data/src/parser/server.rb +0 -66
- data/src/plugin.js +0 -148
- data/src/prettier.js +0 -16
- data/src/rbs/parser.js +0 -37
- data/src/rbs/printer.js +0 -643
- data/src/ruby/embed.js +0 -142
- data/src/ruby/nodes/alias.js +0 -73
- data/src/ruby/nodes/args.js +0 -222
- data/src/ruby/nodes/arrays.js +0 -162
- data/src/ruby/nodes/assign.js +0 -47
- data/src/ruby/nodes/blocks.js +0 -90
- data/src/ruby/nodes/calls.js +0 -246
- data/src/ruby/nodes/case.js +0 -65
- data/src/ruby/nodes/class.js +0 -64
- data/src/ruby/nodes/commands.js +0 -131
- data/src/ruby/nodes/conditionals.js +0 -282
- data/src/ruby/nodes/constants.js +0 -43
- data/src/ruby/nodes/flow.js +0 -74
- data/src/ruby/nodes/hashes.js +0 -155
- data/src/ruby/nodes/heredocs.js +0 -36
- data/src/ruby/nodes/hooks.js +0 -34
- data/src/ruby/nodes/ints.js +0 -31
- data/src/ruby/nodes/lambdas.js +0 -76
- data/src/ruby/nodes/loops.js +0 -98
- data/src/ruby/nodes/massign.js +0 -98
- data/src/ruby/nodes/methods.js +0 -74
- data/src/ruby/nodes/operators.js +0 -83
- data/src/ruby/nodes/params.js +0 -106
- data/src/ruby/nodes/patterns.js +0 -157
- data/src/ruby/nodes/regexp.js +0 -56
- data/src/ruby/nodes/rescue.js +0 -101
- data/src/ruby/nodes/return.js +0 -94
- data/src/ruby/nodes/statements.js +0 -142
- data/src/ruby/nodes/strings.js +0 -272
- data/src/ruby/nodes/super.js +0 -35
- data/src/ruby/nodes/undef.js +0 -42
- data/src/ruby/nodes.js +0 -34
- data/src/ruby/parser.js +0 -37
- data/src/ruby/printer.js +0 -147
- data/src/ruby/toProc.js +0 -105
- data/src/utils/containsAssignment.js +0 -11
- data/src/utils/getTrailingComma.js +0 -5
- data/src/utils/hasAncestor.js +0 -17
- data/src/utils/isEmptyBodyStmt.js +0 -7
- data/src/utils/isEmptyStmts.js +0 -11
- data/src/utils/literal.js +0 -7
- data/src/utils/literallineWithoutBreakParent.js +0 -7
- data/src/utils/makeCall.js +0 -14
- data/src/utils/noIndent.js +0 -10
- data/src/utils/printEmptyCollection.js +0 -49
- data/src/utils/skipAssignIndent.js +0 -17
- data/src/utils.js +0 -13
@@ -21,7 +21,7 @@ Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t
|
|
21
21
|
* Use of this source code is governed by an MIT-style license that can be
|
22
22
|
* found in the LICENSE file at https://angular.io/license
|
23
23
|
*/
|
24
|
-
const a=/-+([a-z0-9])/g;var u=function(e){return e.replace(a,((...e)=>e[1].toUpperCase()))};var c=function(e,t){return p(e,":",t)};var l=function(e,t){return p(e,".",t)};function p(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function
|
24
|
+
const a=/-+([a-z0-9])/g;var u=function(e){return e.replace(a,((...e)=>e[1].toUpperCase()))};var c=function(e,t){return p(e,":",t)};var l=function(e,t){return p(e,".",t)};function p(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function h(e,t,r){return Array.isArray(e)?t.visitArray(e,r):"object"==typeof(n=e)&&null!==n&&Object.getPrototypeOf(n)===v?t.visitStringMap(e,r):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,r):t.visitOther(e,r);var n}var D=h;var f=function(e){return null!=e};var d=function(e){return void 0===e?null:e};var g=class{visitArray(e,t){return e.map((e=>h(e,this,t)))}visitStringMap(e,t){const r={};return Object.keys(e).forEach((n=>{r[n]=h(e[n],this,t)})),r}visitPrimitive(e,t){return e}visitOther(e,t){return e}},m={assertSync:e=>{if(k(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>k(e)?e.then(t):t(e),all:e=>e.some(k)?Promise.all(e):e};var E=function(e){throw new Error(`Internal Error: ${e}`)};var C=function(e,t){const r=Error(e);return r[y]=!0,t&&(r[b]=t),r};const y="ngSyntaxError",b="ngParseErrors";var T=function(e){return e[y]};var S=function(e){return e[b]||[]};var _=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const v=Object.getPrototypeOf({});var A=function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n>=55296&&n<=56319&&e.length>r+1){const t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(r++,n=(n-55296<<10)+t-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t};var F=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;if(!t.toString)return"object";const r=t.toString();if(null==r)return""+r;const n=r.indexOf("\n");return-1===n?r:r.substring(0,n)};var w=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e};function k(e){return!!e&&"function"==typeof e.then}var N=k;var O=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const x="undefined"!=typeof window&&window,I="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;var P=void 0!==e&&e||x||I,R=Object.defineProperty({dashCaseToCamelCase:u,splitAtColon:c,splitAtPeriod:l,visitValue:D,isDefined:f,noUndefined:d,ValueTransformer:g,SyncAsync:m,error:E,syntaxError:C,isSyntaxError:T,getParseErrors:S,escapeRegExp:_,utf8Encode:A,stringify:F,resolveForwardRef:w,isPromise:N,Version:O,global:P},"__esModule",{value:!0}),L=t((function(e,t){
|
25
25
|
/**
|
26
26
|
* @license
|
27
27
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -29,7 +29,7 @@ const a=/-+([a-z0-9])/g;var u=function(e){return e.replace(a,((...e)=>e[1].toUpp
|
|
29
29
|
* Use of this source code is governed by an MIT-style license that can be
|
30
30
|
* found in the LICENSE file at https://angular.io/license
|
31
31
|
*/
|
32
|
-
Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let i=0;function s(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof o.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=R.stringify(t);return r.indexOf("(")>=0?(r="anonymous_"+i++,t.__anonymousType=r):r=n(r),r}var a;t.identifierName=s,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof o.StaticSymbol?t.filePath:`./${R.stringify(t)}`},t.viewClassName=function(e,t){return`View_${s({reference:e})}_${t}`},t.rendererTypeName=function(e){return`RenderType_${s({reference:e})}`},t.hostViewClassName=function(e){return`HostView_${s({reference:e})}`},t.componentFactoryName=function(e){return`${s({reference:e})}NgFactory`},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(a=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:r}={}){this.moduleUrl=e||null,this.styles=c(t),this.styleUrls=c(r)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:r,htmlAst:n,styles:i,styleUrls:s,externalStylesheets:o,animations:a,ngContentSelectors:u,interpolation:p,isInline:
|
32
|
+
Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let i=0;function s(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof o.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=R.stringify(t);return r.indexOf("(")>=0?(r="anonymous_"+i++,t.__anonymousType=r):r=n(r),r}var a;t.identifierName=s,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof o.StaticSymbol?t.filePath:`./${R.stringify(t)}`},t.viewClassName=function(e,t){return`View_${s({reference:e})}_${t}`},t.rendererTypeName=function(e){return`RenderType_${s({reference:e})}`},t.hostViewClassName=function(e){return`HostView_${s({reference:e})}`},t.componentFactoryName=function(e){return`${s({reference:e})}NgFactory`},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(a=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:r}={}){this.moduleUrl=e||null,this.styles=c(t),this.styleUrls=c(r)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:r,htmlAst:n,styles:i,styleUrls:s,externalStylesheets:o,animations:a,ngContentSelectors:u,interpolation:p,isInline:h,preserveWhitespaces:D}){if(this.encapsulation=e,this.template=t,this.templateUrl=r,this.htmlAst=n,this.styles=c(i),this.styleUrls=c(s),this.externalStylesheets=c(o),this.animations=a?l(a):[],this.ngContentSelectors=u||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=h,this.preserveWhitespaces=D}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class u{static create({isHost:e,type:t,isComponent:n,selector:i,exportAs:s,changeDetection:o,inputs:a,outputs:c,host:l,providers:p,viewProviders:h,queries:D,guards:f,viewQueries:d,entryComponents:g,template:m,componentViewType:E,rendererType:C,componentFactory:y}){const b={},T={},S={};null!=l&&Object.keys(l).forEach((e=>{const t=l[e],n=e.match(r);null===n?S[e]=t:null!=n[1]?T[n[1]]=t:null!=n[2]&&(b[n[2]]=t)}));const _={};null!=a&&a.forEach((e=>{const t=R.splitAtColon(e,[e,e]);_[t[0]]=t[1]}));const v={};return null!=c&&c.forEach((e=>{const t=R.splitAtColon(e,[e,e]);v[t[0]]=t[1]})),new u({isHost:e,type:t,isComponent:!!n,selector:i,exportAs:s,changeDetection:o,inputs:_,outputs:v,hostListeners:b,hostProperties:T,hostAttributes:S,providers:p,viewProviders:h,queries:D,guards:f,viewQueries:d,entryComponents:g,template:m,componentViewType:E,rendererType:C,componentFactory:y})}constructor({isHost:e,type:t,isComponent:r,selector:n,exportAs:i,changeDetection:s,inputs:o,outputs:a,hostListeners:u,hostProperties:l,hostAttributes:p,providers:h,viewProviders:D,queries:f,guards:d,viewQueries:g,entryComponents:m,template:E,componentViewType:C,rendererType:y,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=r,this.selector=n,this.exportAs=i,this.changeDetection=s,this.inputs=o,this.outputs=a,this.hostListeners=u,this.hostProperties=l,this.hostAttributes=p,this.providers=c(h),this.viewProviders=c(D),this.queries=c(f),this.guards=d,this.viewQueries=c(g),this.entryComponents=c(m),this.template=E,this.componentViewType=C,this.rendererType=y,this.componentFactory=b}toSummary(){return{summaryKind:a.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}t.CompileDirectiveMetadata=u;t.CompilePipeMetadata=class{constructor({type:e,name:t,pure:r}){this.type=e,this.name=t,this.pure=!!r}toSummary(){return{summaryKind:a.Pipe,type:this.type,name:this.name,pure:this.pure}}};t.CompileShallowModuleMetadata=class{};t.CompileNgModuleMetadata=class{constructor({type:e,providers:t,declaredDirectives:r,exportedDirectives:n,declaredPipes:i,exportedPipes:s,entryComponents:o,bootstrapComponents:a,importedModules:u,exportedModules:l,schemas:p,transitiveModule:h,id:D}){this.type=e||null,this.declaredDirectives=c(r),this.exportedDirectives=c(n),this.declaredPipes=c(i),this.exportedPipes=c(s),this.providers=c(t),this.entryComponents=c(o),this.bootstrapComponents=c(a),this.importedModules=c(u),this.exportedModules=c(l),this.schemas=c(p),this.id=D||null,this.transitiveModule=h||null}toSummary(){const e=this.transitiveModule;return{summaryKind:a.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}};function c(e){return e||[]}t.TransitiveCompileNgModuleMetadata=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(e,t){this.providers.push({provider:e,module:t})}addDirective(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}addExportedDirective(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}addPipe(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}addExportedPipe(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}addModule(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}addEntryComponent(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}};function l(e){return e.reduce(((e,t)=>{const r=Array.isArray(t)?l(t):t;return e.concat(r)}),[])}function p(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=class{constructor(e,{useClass:t,useValue:r,useExisting:n,useFactory:i,deps:s,multi:o}){this.token=e,this.useClass=t||null,this.useValue=r,this.useExisting=n,this.useFactory=i||null,this.dependencies=s||null,this.multi=!!o}},t.flatten=l,t.templateSourceUrl=function(e,t,r){let n;return n=r.isInline?t.type.reference instanceof o.StaticSymbol?`${t.type.reference.filePath}.${t.type.reference.name}.html`:`${s(e)}/${s(t.type)}.html`:r.templateUrl,t.type.reference instanceof o.StaticSymbol?n:p(n)},t.sharedStylesheetJitUrl=function(e,t){const r=e.moduleUrl.split(/\/\\/g);return p(`css/${t}${r[r.length-1]}.ngstyle.js`)},t.ngModuleJitUrl=function(e){return p(`${s(e.type)}/module.ngfactory.js`)},t.templateJitUrl=function(e,t){return p(`${s(e)}/${s(t.type)}.ngfactory.js`)}})),B=t((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});
|
33
33
|
/**
|
34
34
|
* @license
|
35
35
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -37,28 +37,28 @@ Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(
|
|
37
37
|
* Use of this source code is governed by an MIT-style license that can be
|
38
38
|
* found in the LICENSE file at https://angular.io/license
|
39
39
|
*/
|
40
|
-
class n{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,i=t.length;let s=this.offset,o=this.line,a=this.col;for(;s>0&&e<0;){s--,e++;if(t.charCodeAt(s)==r.$LF){o--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(r.$LF));a=e>0?s-e:s}else a--}for(;s<i&&e>0;){const n=t.charCodeAt(s);s++,e--,n==r.$LF?(o++,a=0):a++}return new n(this.file,s,o,a)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let i=n,s=0,o=0;for(;s<e&&n>0&&(n--,s++,"\n"!=r[n]||++o!=t););for(s=0,o=0;s<e&&i<r.length-1&&(i++,s++,"\n"!=r[i]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,i+1)}}return null}}t.ParseLocation=n;class i{constructor(e,t){this.content=e,this.url=t}}t.ParseSourceFile=i;class s{constructor(e,t,r=null){this.start=e,this.end=t,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var o;t.ParseSourceSpan=s,t.EMPTY_PARSE_LOCATION=new n(new i("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new s(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,r=o.ERROR){this.span=e,this.msg=t,this.level=r}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${o[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}},t.typeSourceSpan=function(e,t){const r=L.identifierModuleUrl(t),o=null!=r?`in ${e} ${L.identifierName(t)} in ${r}`:`in ${e} ${L.identifierName(t)}`,a=new i("",o);return new s(new n(a,-1,-1,-1),new n(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,r){const o=new i("",`in ${e} ${t} in ${r}`);return new s(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));const $=new RegExp("^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)","s");var q=function(e){const t=e.match($);if(!t)return{content:e};const{startDelimiter:r,language:n,value:i="",endDelimiter:s}=t.groups;let o=n.trim()||"yaml";if("+++"===r&&(o="toml"),"yaml"!==o&&r!==s)return{content:e};const[a]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:r,endDelimiter:s,raw:a.replace(/\n$/,"")},content:a.replace(/[^\n]/g," ")+e.slice(a.length)}};var M=e=>e[e.length-1];var U=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r},j=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const V=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var G=V,H=V;G.default=H;const X=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=j(e)).length)return 0;e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let t=0;for(let r=0;r<e.length;r++){const n=e.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=G(n)?2:1))}return t};var z=X,W=X;z.default=W;var Y=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Q(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var J=function(e){return e&&e.Math==Math&&e},K=J("object"==typeof globalThis&&globalThis)||J("object"==typeof window&&window)||J("object"==typeof self&&self)||J("object"==typeof e&&e)||function(){return this}()||Function("return this")(),Z=function(e){try{return!!e()}catch(e){return!0}},ee=!Z((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),te={}.propertyIsEnumerable,re=Object.getOwnPropertyDescriptor,ne={f:re&&!te.call({1:2},1)?function(e){var t=re(this,e);return!!t&&t.enumerable}:te},ie=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},se={}.toString,oe=function(e){return se.call(e).slice(8,-1)},ae="".split,ue=Z((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==oe(e)?ae.call(e,""):Object(e)}:Object,ce=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},le=function(e){return ue(ce(e))},pe=function(e){return"object"==typeof e?null!==e:"function"==typeof e},De=function(e,t){if(!pe(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!pe(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!pe(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!pe(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},he=function(e){return Object(ce(e))},de={}.hasOwnProperty,fe=Object.hasOwn||function(e,t){return de.call(he(e),t)},me=K.document,ge=pe(me)&&pe(me.createElement),Ee=!ee&&!Z((function(){return 7!=Object.defineProperty((e="div",ge?me.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),Ce=Object.getOwnPropertyDescriptor,Te={f:ee?Ce:function(e,t){if(e=le(e),t=De(t,!0),Ee)try{return Ce(e,t)}catch(e){}if(fe(e,t))return ie(!ne.f.call(e,t),e[t])}},ye=function(e){if(!pe(e))throw TypeError(String(e)+" is not an object");return e},Se=Object.defineProperty,_e={f:ee?Se:function(e,t,r){if(ye(e),t=De(t,!0),ye(r),Ee)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},ve=ee?function(e,t,r){return _e.f(e,t,ie(1,r))}:function(e,t,r){return e[t]=r,e},be=function(e,t){try{ve(K,e,t)}catch(r){K[e]=t}return t},Fe="__core-js_shared__",Ae=K[Fe]||be(Fe,{}),we=Function.toString;"function"!=typeof Ae.inspectSource&&(Ae.inspectSource=function(e){return we.call(e)});var Ne,ke,Oe,xe,Pe=Ae.inspectSource,Ie=K.WeakMap,Re="function"==typeof Ie&&/native code/.test(Pe(Ie)),Le=t((function(e){(e.exports=function(e,t){return Ae[e]||(Ae[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),Be=0,$e=Math.random(),qe=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Be+$e).toString(36)},Me=Le("keys"),Ue={},je="Object already initialized",Ve=K.WeakMap;if(Re||Ae.state){var Ge=Ae.state||(Ae.state=new Ve),He=Ge.get,Xe=Ge.has,ze=Ge.set;Ne=function(e,t){if(Xe.call(Ge,e))throw new TypeError(je);return t.facade=e,ze.call(Ge,e,t),t},ke=function(e){return He.call(Ge,e)||{}},Oe=function(e){return Xe.call(Ge,e)}}else{var We=Me[xe="state"]||(Me[xe]=qe(xe));Ue[We]=!0,Ne=function(e,t){if(fe(e,We))throw new TypeError(je);return t.facade=e,ve(e,We,t),t},ke=function(e){return fe(e,We)?e[We]:{}},Oe=function(e){return fe(e,We)}}var Ye,Qe,Je={set:Ne,get:ke,has:Oe,enforce:function(e){return Oe(e)?ke(e):Ne(e,{})},getterFor:function(e){return function(t){var r;if(!pe(t)||(r=ke(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},Ke=t((function(e){var t=Je.get,r=Je.enforce,n=String(String).split("String");(e.exports=function(e,t,i,s){var o,a=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof t||fe(i,"name")||ve(i,"name",t),(o=r(i)).source||(o.source=n.join("string"==typeof t?t:""))),e!==K?(a?!c&&e[t]&&(u=!0):delete e[t],u?e[t]=i:ve(e,t,i)):u?e[t]=i:be(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||Pe(this)}))})),Ze=K,et=function(e){return"function"==typeof e?e:void 0},tt=function(e,t){return arguments.length<2?et(Ze[e])||et(K[e]):Ze[e]&&Ze[e][t]||K[e]&&K[e][t]},rt=Math.ceil,nt=Math.floor,it=function(e){return isNaN(e=+e)?0:(e>0?nt:rt)(e)},st=Math.min,ot=function(e){return e>0?st(it(e),9007199254740991):0},at=Math.max,ut=Math.min,ct=function(e){return function(t,r,n){var i,s=le(t),o=ot(s.length),a=function(e,t){var r=it(e);return r<0?at(r+t,0):ut(r,t)}(n,o);if(e&&r!=r){for(;o>a;)if((i=s[a++])!=i)return!0}else for(;o>a;a++)if((e||a in s)&&s[a]===r)return e||a||0;return!e&&-1}},lt={includes:ct(!0),indexOf:ct(!1)}.indexOf,pt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Dt={f:Object.getOwnPropertyNames||function(e){return function(e,t){var r,n=le(e),i=0,s=[];for(r in n)!fe(Ue,r)&&fe(n,r)&&s.push(r);for(;t.length>i;)fe(n,r=t[i++])&&(~lt(s,r)||s.push(r));return s}(e,pt)}},ht={f:Object.getOwnPropertySymbols},dt=tt("Reflect","ownKeys")||function(e){var t=Dt.f(ye(e)),r=ht.f;return r?t.concat(r(e)):t},ft=function(e,t){for(var r=dt(t),n=_e.f,i=Te.f,s=0;s<r.length;s++){var o=r[s];fe(e,o)||n(e,o,i(t,o))}},mt=/#|\.prototype\./,gt=function(e,t){var r=Ct[Et(e)];return r==yt||r!=Tt&&("function"==typeof t?Z(t):!!t)},Et=gt.normalize=function(e){return String(e).replace(mt,".").toLowerCase()},Ct=gt.data={},Tt=gt.NATIVE="N",yt=gt.POLYFILL="P",St=gt,_t=Te.f,vt=function(e,t){var r,n,i,s,o,a=e.target,u=e.global,c=e.stat;if(r=u?K:c?K[a]||be(a,{}):(K[a]||{}).prototype)for(n in t){if(s=t[n],i=e.noTargetGet?(o=_t(r,n))&&o.value:r[n],!St(u?n:a+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof s==typeof i)continue;ft(s,i)}(e.sham||i&&i.sham)&&ve(s,"sham",!0),Ke(r,n,s,e)}},bt=Array.isArray||function(e){return"Array"==oe(e)},Ft=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},At=function(e,t,r){if(Ft(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},wt=function(e,t,r,n,i,s,o,a){for(var u,c=i,l=0,p=!!o&&At(o,a,3);l<n;){if(l in r){if(u=p?p(r[l],l,t):r[l],s>0&&bt(u))c=wt(e,t,u,ot(u.length),c,s-1)-1;else{if(c>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[c]=u}c++}l++}return c},Nt=wt,kt=tt("navigator","userAgent")||"",Ot=K.process,xt=Ot&&Ot.versions,Pt=xt&&xt.v8;Pt?Qe=(Ye=Pt.split("."))[0]<4?1:Ye[0]+Ye[1]:kt&&(!(Ye=kt.match(/Edge\/(\d+)/))||Ye[1]>=74)&&(Ye=kt.match(/Chrome\/(\d+)/))&&(Qe=Ye[1]);var It=Qe&&+Qe,Rt=!!Object.getOwnPropertySymbols&&!Z((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&It&&It<41})),Lt=Rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Bt=Le("wks"),$t=K.Symbol,qt=Lt?$t:$t&&$t.withoutSetter||qe,Mt=function(e){return fe(Bt,e)&&(Rt||"string"==typeof Bt[e])||(Rt&&fe($t,e)?Bt[e]=$t[e]:Bt[e]=qt("Symbol."+e)),Bt[e]},Ut=Mt("species"),jt=function(e,t){var r;return bt(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!bt(r.prototype)?pe(r)&&null===(r=r[Ut])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)};vt({target:"Array",proto:!0},{flatMap:function(e){var t,r=he(this),n=ot(r.length);return Ft(e),(t=jt(r,0)).length=Nt(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Vt,Gt,Ht=Math.floor,Xt=function(e,t){var r=e.length,n=Ht(r/2);return r<8?zt(e,t):Wt(Xt(e.slice(0,n),t),Xt(e.slice(n),t),t)},zt=function(e,t){for(var r,n,i=e.length,s=1;s<i;){for(n=s,r=e[s];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==s++&&(e[n]=r)}return e},Wt=function(e,t,r){for(var n=e.length,i=t.length,s=0,o=0,a=[];s<n||o<i;)s<n&&o<i?a.push(r(e[s],t[o])<=0?e[s++]:t[o++]):a.push(s<n?e[s++]:t[o++]);return a},Yt=Xt,Qt=kt.match(/firefox\/(\d+)/i),Jt=!!Qt&&+Qt[1],Kt=/MSIE|Trident/.test(kt),Zt=kt.match(/AppleWebKit\/(\d+)\./),er=!!Zt&&+Zt[1],tr=[],rr=tr.sort,nr=Z((function(){tr.sort(void 0)})),ir=Z((function(){tr.sort(null)})),sr=!!(Gt=[]["sort"])&&Z((function(){Gt.call(null,Vt||function(){throw 1},1)})),or=!Z((function(){if(It)return It<70;if(!(Jt&&Jt>3)){if(Kt)return!0;if(er)return er<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)tr.push({k:t+n,v:r})}for(tr.sort((function(e,t){return t.v-e.v})),n=0;n<tr.length;n++)t=tr[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));vt({target:"Array",proto:!0,forced:nr||!ir||!sr||!or},{sort:function(e){void 0!==e&&Ft(e);var t=he(this);if(or)return void 0===e?rr.call(t):rr.call(t,e);var r,n,i=[],s=ot(t.length);for(n=0;n<s;n++)n in t&&i.push(t[n]);for(r=(i=Yt(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:String(t)>String(r)?1:-1}}(e))).length,n=0;n<r;)t[n]=i[n++];for(;n<s;)delete t[n++];return t}});var ar={},ur=Mt("iterator"),cr=Array.prototype,lr={};lr[Mt("toStringTag")]="z";var pr="[object z]"===String(lr),Dr=Mt("toStringTag"),hr="Arguments"==oe(function(){return arguments}()),dr=pr?oe:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Dr))?r:hr?oe(t):"Object"==(n=oe(t))&&"function"==typeof t.callee?"Arguments":n},fr=Mt("iterator"),mr=function(e){var t=e.return;if(void 0!==t)return ye(t.call(e)).value},gr=function(e,t){this.stopped=e,this.result=t},Er=function(e,t,r){var n,i,s,o,a,u,c,l,p=r&&r.that,D=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),f=At(t,p,1+D+d),m=function(e){return n&&mr(n),new gr(!0,e)},g=function(e){return D?(ye(e),d?f(e[0],e[1],m):f(e[0],e[1])):d?f(e,m):f(e)};if(h)n=e;else{if("function"!=typeof(i=function(e){if(null!=e)return e[fr]||e["@@iterator"]||ar[dr(e)]}(e)))throw TypeError("Target is not iterable");if(void 0!==(l=i)&&(ar.Array===l||cr[ur]===l)){for(s=0,o=ot(e.length);o>s;s++)if((a=g(e[s]))&&a instanceof gr)return a;return new gr(!1)}n=i.call(e)}for(u=n.next;!(c=u.call(n)).done;){try{a=g(c.value)}catch(e){throw mr(n),e}if("object"==typeof a&&a&&a instanceof gr)return a}return new gr(!1)};vt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Er(e,(function(e,r){!function(e,t,r){var n=De(t);n in e?_e.f(e,n,ie(0,r)):e[n]=r}(t,e,r)}),{AS_ENTRIES:!0}),t}});var Cr=void 0!==Cr?Cr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Tr(){throw new Error("setTimeout has not been defined")}function yr(){throw new Error("clearTimeout has not been defined")}var Sr=Tr,_r=yr;function vr(e){if(Sr===setTimeout)return setTimeout(e,0);if((Sr===Tr||!Sr)&&setTimeout)return Sr=setTimeout,setTimeout(e,0);try{return Sr(e,0)}catch(t){try{return Sr.call(null,e,0)}catch(t){return Sr.call(this,e,0)}}}"function"==typeof Cr.setTimeout&&(Sr=setTimeout),"function"==typeof Cr.clearTimeout&&(_r=clearTimeout);var br,Fr=[],Ar=!1,wr=-1;function Nr(){Ar&&br&&(Ar=!1,br.length?Fr=br.concat(Fr):wr=-1,Fr.length&&kr())}function kr(){if(!Ar){var e=vr(Nr);Ar=!0;for(var t=Fr.length;t;){for(br=Fr,Fr=[];++wr<t;)br&&br[wr].run();wr=-1,t=Fr.length}br=null,Ar=!1,function(e){if(_r===clearTimeout)return clearTimeout(e);if((_r===yr||!_r)&&clearTimeout)return _r=clearTimeout,clearTimeout(e);try{_r(e)}catch(t){try{return _r.call(null,e)}catch(t){return _r.call(this,e)}}}(e)}}function Or(e,t){this.fun=e,this.array=t}Or.prototype.run=function(){this.fun.apply(null,this.array)};function xr(){}var Pr=xr,Ir=xr,Rr=xr,Lr=xr,Br=xr,$r=xr,qr=xr;var Mr=Cr.performance||{},Ur=Mr.now||Mr.mozNow||Mr.msNow||Mr.oNow||Mr.webkitNow||function(){return(new Date).getTime()};var jr=new Date;var Vr={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Fr.push(new Or(e,t)),1!==Fr.length||Ar||vr(kr)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Pr,addListener:Ir,once:Rr,off:Lr,removeListener:Br,removeAllListeners:$r,emit:qr,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Ur.call(Mr),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-jr)/1e3}};var Gr="object"==typeof Vr&&Vr.env&&Vr.env.NODE_DEBUG&&/\bsemver\b/i.test(Vr.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Hr={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Xr=t((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Hr,n=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let o=0;const a=(e,t,r)=>{const a=o++;Gr(a,t),s[e]=a,i[a]=t,n[a]=new RegExp(t,r?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),a("FULL",`^${i[s.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),a("LOOSE",`^${i[s.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),a("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),a("COERCERTL",i[s.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const zr=["includePrerelease","loose","rtl"];var Wr=e=>e?"object"!=typeof e?{loose:!0}:zr.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const Yr=/^[0-9]+$/,Qr=(e,t)=>{const r=Yr.test(e),n=Yr.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var Jr={compareIdentifiers:Qr,rcompareIdentifiers:(e,t)=>Qr(t,e)};const{MAX_LENGTH:Kr,MAX_SAFE_INTEGER:Zr}=Hr,{re:en,t:tn}=Xr,{compareIdentifiers:rn}=Jr;class nn{constructor(e,t){if(t=Wr(t),e instanceof nn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>Kr)throw new TypeError(`version is longer than ${Kr} characters`);Gr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?en[tn.LOOSE]:en[tn.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Zr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zr||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Zr)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Gr("SemVer.compare",this.version,this.options,e),!(e instanceof nn)){if("string"==typeof e&&e===this.version)return 0;e=new nn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof nn||(e=new nn(e,this.options)),rn(this.major,e.major)||rn(this.minor,e.minor)||rn(this.patch,e.patch)}comparePre(e){if(e instanceof nn||(e=new nn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(Gr("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return rn(r,n)}while(++t)}compareBuild(e){e instanceof nn||(e=new nn(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(Gr("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return rn(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var sn=nn;var on=(e,t,r)=>new sn(e,r).compare(new sn(t,r));var an=(e,t,r)=>on(e,t,r)<0;var un=(e,t,r)=>on(e,t,r)>=0,cn="2.3.2",ln=t((function(e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function n(){return"undefined"!=typeof WeakMap?new WeakMap:{add:r,delete:r,get:r,set:r,has:function(e){return!1}}}Object.defineProperty(t,"__esModule",{value:!0}),t.outdent=void 0;var i=Object.prototype.hasOwnProperty,s=function(e,t){return i.call(e,t)};function o(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return e}var a=/^[ \t]*(?:\r\n|\r|\n)/,u=/(?:\r\n|\r|\n)[ \t]*$/,c=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,p=/^[ \t]*[\r\n][ \t\r\n]*$/;function D(e,t,r){var n=0,i=e[0].match(l);i&&(n=i[1].length);var s=new RegExp("(\\r\\n|\\r|\\n).{0,"+n+"}","g");t&&(e=e.slice(1));var o=r.newline,c=r.trimLeadingNewline,p=r.trimTrailingNewline,D="string"==typeof o,h=e.length;return e.map((function(e,t){return e=e.replace(s,"$1"),0===t&&c&&(e=e.replace(a,"")),t===h-1&&p&&(e=e.replace(u,"")),D&&(e=e.replace(/\r\n|\n|\r/g,(function(e){return o}))),e}))}function h(e,t){for(var r="",n=0,i=e.length;n<i;n++)r+=e[n],n<i-1&&(r+=t[n]);return r}function d(e){return s(e,"raw")&&s(e,"length")}var f=function e(t){var r=n(),i=n();return o((function n(s){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];if(d(s)){var l=s,m=(a[0]===n||a[0]===f)&&p.test(l[0])&&c.test(l[1]),g=m?i:r,E=g.get(l);if(E||(E=D(l,m,t),g.set(l,E)),0===a.length)return E[0];var C=h(E,m?a.slice(1):a);return C}return e(o(o({},t),s||{}))}),{string:function(e){return D([e],!1,t)[0]}})}({trimLeadingNewline:!0,trimTrailingNewline:!0});t.outdent=f,t.default=f;try{e.exports=f,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.outdent=f}catch(e){}}));const{outdent:pn}=ln,Dn="Config",hn="Editor",dn="Other",fn="Global",mn="Special",gn={cursorOffset:{since:"1.4.0",category:mn,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:pn`
|
40
|
+
class n{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){const t=this.file.content,i=t.length;let s=this.offset,o=this.line,a=this.col;for(;s>0&&e<0;){s--,e++;if(t.charCodeAt(s)==r.$LF){o--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(r.$LF));a=e>0?s-e:s}else a--}for(;s<i&&e>0;){const n=t.charCodeAt(s);s++,e--,n==r.$LF?(o++,a=0):a++}return new n(this.file,s,o,a)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let i=n,s=0,o=0;for(;s<e&&n>0&&(n--,s++,"\n"!=r[n]||++o!=t););for(s=0,o=0;s<e&&i<r.length-1&&(i++,s++,"\n"!=r[i]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,i+1)}}return null}}t.ParseLocation=n;class i{constructor(e,t){this.content=e,this.url=t}}t.ParseSourceFile=i;class s{constructor(e,t,r=null){this.start=e,this.end=t,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var o;t.ParseSourceSpan=s,t.EMPTY_PARSE_LOCATION=new n(new i("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new s(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,r=o.ERROR){this.span=e,this.msg=t,this.level=r}contextualMessage(){const e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${o[this.level]} ->]${e.after}")`:this.msg}toString(){const e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}},t.typeSourceSpan=function(e,t){const r=L.identifierModuleUrl(t),o=null!=r?`in ${e} ${L.identifierName(t)} in ${r}`:`in ${e} ${L.identifierName(t)}`,a=new i("",o);return new s(new n(a,-1,-1,-1),new n(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,r){const o=new i("",`in ${e} ${t} in ${r}`);return new s(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));const $=new RegExp("^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)","s");var q=function(e){const t=e.match($);if(!t)return{content:e};const{startDelimiter:r,language:n,value:i="",endDelimiter:s}=t.groups;let o=n.trim()||"yaml";if("+++"===r&&(o="toml"),"yaml"!==o&&r!==s)return{content:e};const[a]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:r,endDelimiter:s,raw:a.replace(/\n$/,"")},content:a.replace(/[^\n]/g," ")+e.slice(a.length)}};var M=e=>e[e.length-1];var j=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r},U=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const V=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var G=V,H=V;G.default=H;const X=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=U(e)).length)return 0;e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," ");let t=0;for(let r=0;r<e.length;r++){const n=e.codePointAt(r);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=G(n)?2:1))}return t};var W=X,z=X;W.default=z;var Y=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Q(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var J,K,Z=function(e){return e&&e.Math==Math&&e},ee=Z("object"==typeof globalThis&&globalThis)||Z("object"==typeof window&&window)||Z("object"==typeof self&&self)||Z("object"==typeof e&&e)||function(){return this}()||Function("return this")(),te=function(e){try{return!!e()}catch(e){return!0}},re=!te((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ne={}.propertyIsEnumerable,ie=Object.getOwnPropertyDescriptor,se={f:ie&&!ne.call({1:2},1)?function(e){var t=ie(this,e);return!!t&&t.enumerable}:ne},oe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ae={}.toString,ue=function(e){return ae.call(e).slice(8,-1)},ce="".split,le=te((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==ue(e)?ce.call(e,""):Object(e)}:Object,pe=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},he=function(e){return le(pe(e))},De=function(e){return"object"==typeof e?null!==e:"function"==typeof e},fe=function(e){return"function"==typeof e?e:void 0},de=function(e,t){return arguments.length<2?fe(ee[e]):ee[e]&&ee[e][t]},ge=de("navigator","userAgent")||"",me=ee.process,Ee=ee.Deno,Ce=me&&me.versions||Ee&&Ee.version,ye=Ce&&Ce.v8;ye?K=(J=ye.split("."))[0]<4?1:J[0]+J[1]:ge&&(!(J=ge.match(/Edge\/(\d+)/))||J[1]>=74)&&(J=ge.match(/Chrome\/(\d+)/))&&(K=J[1]);var be=K&&+K,Te=!!Object.getOwnPropertySymbols&&!te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&be&&be<41})),Se=Te&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_e=Se?function(e){return"symbol"==typeof e}:function(e){var t=de("Symbol");return"function"==typeof t&&Object(e)instanceof t},ve=function(e,t){try{Object.defineProperty(ee,e,{value:t,configurable:!0,writable:!0})}catch(r){ee[e]=t}return t},Ae="__core-js_shared__",Fe=ee[Ae]||ve(Ae,{}),we=t((function(e){(e.exports=function(e,t){return Fe[e]||(Fe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),ke=function(e){return Object(pe(e))},Ne={}.hasOwnProperty,Oe=Object.hasOwn||function(e,t){return Ne.call(ke(e),t)},xe=0,Ie=Math.random(),Pe=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++xe+Ie).toString(36)},Re=we("wks"),Le=ee.Symbol,Be=Se?Le:Le&&Le.withoutSetter||Pe,$e=function(e){return Oe(Re,e)&&(Te||"string"==typeof Re[e])||(Te&&Oe(Le,e)?Re[e]=Le[e]:Re[e]=Be("Symbol."+e)),Re[e]},qe=$e("toPrimitive"),Me=function(e,t){if(!De(e)||_e(e))return e;var r,n=e[qe];if(void 0!==n){if(void 0===t&&(t="default"),r=n.call(e,t),!De(r)||_e(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&"function"==typeof(r=e.toString)&&!De(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!De(n=r.call(e)))return n;if("string"!==t&&"function"==typeof(r=e.toString)&&!De(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")}(e,t)},je=function(e){var t=Me(e,"string");return _e(t)?t:String(t)},Ue=ee.document,Ve=De(Ue)&&De(Ue.createElement),Ge=!re&&!te((function(){return 7!=Object.defineProperty((e="div",Ve?Ue.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),He=Object.getOwnPropertyDescriptor,Xe={f:re?He:function(e,t){if(e=he(e),t=je(t),Ge)try{return He(e,t)}catch(e){}if(Oe(e,t))return oe(!se.f.call(e,t),e[t])}},We=function(e){if(!De(e))throw TypeError(String(e)+" is not an object");return e},ze=Object.defineProperty,Ye={f:re?ze:function(e,t,r){if(We(e),t=je(t),We(r),Ge)try{return ze(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Qe=re?function(e,t,r){return Ye.f(e,t,oe(1,r))}:function(e,t,r){return e[t]=r,e},Je=Function.toString;"function"!=typeof Fe.inspectSource&&(Fe.inspectSource=function(e){return Je.call(e)});var Ke,Ze,et,tt,rt=Fe.inspectSource,nt=ee.WeakMap,it="function"==typeof nt&&/native code/.test(rt(nt)),st=we("keys"),ot={},at="Object already initialized",ut=ee.WeakMap;if(it||Fe.state){var ct=Fe.state||(Fe.state=new ut),lt=ct.get,pt=ct.has,ht=ct.set;Ke=function(e,t){if(pt.call(ct,e))throw new TypeError(at);return t.facade=e,ht.call(ct,e,t),t},Ze=function(e){return lt.call(ct,e)||{}},et=function(e){return pt.call(ct,e)}}else{var Dt=st[tt="state"]||(st[tt]=Pe(tt));ot[Dt]=!0,Ke=function(e,t){if(Oe(e,Dt))throw new TypeError(at);return t.facade=e,Qe(e,Dt,t),t},Ze=function(e){return Oe(e,Dt)?e[Dt]:{}},et=function(e){return Oe(e,Dt)}}var ft={set:Ke,get:Ze,has:et,enforce:function(e){return et(e)?Ze(e):Ke(e,{})},getterFor:function(e){return function(t){var r;if(!De(t)||(r=Ze(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},dt=t((function(e){var t=ft.get,r=ft.enforce,n=String(String).split("String");(e.exports=function(e,t,i,s){var o,a=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof t||Oe(i,"name")||Qe(i,"name",t),(o=r(i)).source||(o.source=n.join("string"==typeof t?t:""))),e!==ee?(a?!c&&e[t]&&(u=!0):delete e[t],u?e[t]=i:Qe(e,t,i)):u?e[t]=i:ve(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||rt(this)}))})),gt=Math.ceil,mt=Math.floor,Et=function(e){return isNaN(e=+e)?0:(e>0?mt:gt)(e)},Ct=Math.min,yt=function(e){return e>0?Ct(Et(e),9007199254740991):0},bt=Math.max,Tt=Math.min,St=function(e){return function(t,r,n){var i,s=he(t),o=yt(s.length),a=function(e,t){var r=Et(e);return r<0?bt(r+t,0):Tt(r,t)}(n,o);if(e&&r!=r){for(;o>a;)if((i=s[a++])!=i)return!0}else for(;o>a;a++)if((e||a in s)&&s[a]===r)return e||a||0;return!e&&-1}},_t={includes:St(!0),indexOf:St(!1)}.indexOf,vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),At={f:Object.getOwnPropertyNames||function(e){return function(e,t){var r,n=he(e),i=0,s=[];for(r in n)!Oe(ot,r)&&Oe(n,r)&&s.push(r);for(;t.length>i;)Oe(n,r=t[i++])&&(~_t(s,r)||s.push(r));return s}(e,vt)}},Ft={f:Object.getOwnPropertySymbols},wt=de("Reflect","ownKeys")||function(e){var t=At.f(We(e)),r=Ft.f;return r?t.concat(r(e)):t},kt=function(e,t){for(var r=wt(t),n=Ye.f,i=Xe.f,s=0;s<r.length;s++){var o=r[s];Oe(e,o)||n(e,o,i(t,o))}},Nt=/#|\.prototype\./,Ot=function(e,t){var r=It[xt(e)];return r==Rt||r!=Pt&&("function"==typeof t?te(t):!!t)},xt=Ot.normalize=function(e){return String(e).replace(Nt,".").toLowerCase()},It=Ot.data={},Pt=Ot.NATIVE="N",Rt=Ot.POLYFILL="P",Lt=Ot,Bt=Xe.f,$t=function(e,t){var r,n,i,s,o,a=e.target,u=e.global,c=e.stat;if(r=u?ee:c?ee[a]||ve(a,{}):(ee[a]||{}).prototype)for(n in t){if(s=t[n],i=e.noTargetGet?(o=Bt(r,n))&&o.value:r[n],!Lt(u?n:a+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof s==typeof i)continue;kt(s,i)}(e.sham||i&&i.sham)&&Qe(s,"sham",!0),dt(r,n,s,e)}},qt=Array.isArray||function(e){return"Array"==ue(e)},Mt=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},jt=function(e,t,r){if(Mt(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},Ut=function(e,t,r,n,i,s,o,a){for(var u,c=i,l=0,p=!!o&&jt(o,a,3);l<n;){if(l in r){if(u=p?p(r[l],l,t):r[l],s>0&&qt(u))c=Ut(e,t,u,yt(u.length),c,s-1)-1;else{if(c>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[c]=u}c++}l++}return c},Vt=Ut,Gt=$e("species"),Ht=function(e,t){return new(function(e){var t;return qt(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!qt(t.prototype)?De(t)&&null===(t=t[Gt])&&(t=void 0):t=void 0),void 0===t?Array:t}(e))(0===t?0:t)};$t({target:"Array",proto:!0},{flatMap:function(e){var t,r=ke(this),n=yt(r.length);return Mt(e),(t=Ht(r,0)).length=Vt(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Xt,Wt,zt=function(e){if(_e(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Yt=Math.floor,Qt=function(e,t){var r=e.length,n=Yt(r/2);return r<8?Jt(e,t):Kt(Qt(e.slice(0,n),t),Qt(e.slice(n),t),t)},Jt=function(e,t){for(var r,n,i=e.length,s=1;s<i;){for(n=s,r=e[s];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==s++&&(e[n]=r)}return e},Kt=function(e,t,r){for(var n=e.length,i=t.length,s=0,o=0,a=[];s<n||o<i;)s<n&&o<i?a.push(r(e[s],t[o])<=0?e[s++]:t[o++]):a.push(s<n?e[s++]:t[o++]);return a},Zt=Qt,er=ge.match(/firefox\/(\d+)/i),tr=!!er&&+er[1],rr=/MSIE|Trident/.test(ge),nr=ge.match(/AppleWebKit\/(\d+)\./),ir=!!nr&&+nr[1],sr=[],or=sr.sort,ar=te((function(){sr.sort(void 0)})),ur=te((function(){sr.sort(null)})),cr=!!(Wt=[]["sort"])&&te((function(){Wt.call(null,Xt||function(){throw 1},1)})),lr=!te((function(){if(be)return be<70;if(!(tr&&tr>3)){if(rr)return!0;if(ir)return ir<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)sr.push({k:t+n,v:r})}for(sr.sort((function(e,t){return t.v-e.v})),n=0;n<sr.length;n++)t=sr[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));$t({target:"Array",proto:!0,forced:ar||!ur||!cr||!lr},{sort:function(e){void 0!==e&&Mt(e);var t=ke(this);if(lr)return void 0===e?or.call(t):or.call(t,e);var r,n,i=[],s=yt(t.length);for(n=0;n<s;n++)n in t&&i.push(t[n]);for(r=(i=Zt(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:zt(t)>zt(r)?1:-1}}(e))).length,n=0;n<r;)t[n]=i[n++];for(;n<s;)delete t[n++];return t}});var pr={},hr=$e("iterator"),Dr=Array.prototype,fr={};fr[$e("toStringTag")]="z";var dr="[object z]"===String(fr),gr=$e("toStringTag"),mr="Arguments"==ue(function(){return arguments}()),Er=dr?ue:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),gr))?r:mr?ue(t):"Object"==(n=ue(t))&&"function"==typeof t.callee?"Arguments":n},Cr=$e("iterator"),yr=function(e){if(null!=e)return e[Cr]||e["@@iterator"]||pr[Er(e)]},br=function(e,t,r){var n,i;We(e);try{if(void 0===(n=e.return)){if("throw"===t)throw r;return r}n=n.call(e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return We(n),r},Tr=function(e,t){this.stopped=e,this.result=t},Sr=function(e,t,r){var n,i,s,o,a,u,c,l,p=r&&r.that,h=!(!r||!r.AS_ENTRIES),D=!(!r||!r.IS_ITERATOR),f=!(!r||!r.INTERRUPTED),d=jt(t,p,1+h+f),g=function(e){return n&&br(n,"normal",e),new Tr(!0,e)},m=function(e){return h?(We(e),f?d(e[0],e[1],g):d(e[0],e[1])):f?d(e,g):d(e)};if(D)n=e;else{if("function"!=typeof(i=yr(e)))throw TypeError("Target is not iterable");if(void 0!==(l=i)&&(pr.Array===l||Dr[hr]===l)){for(s=0,o=yt(e.length);o>s;s++)if((a=m(e[s]))&&a instanceof Tr)return a;return new Tr(!1)}n=function(e,t){var r=arguments.length<2?yr(e):t;if("function"!=typeof r)throw TypeError(String(e)+" is not iterable");return We(r.call(e))}(e,i)}for(u=n.next;!(c=u.call(n)).done;){try{a=m(c.value)}catch(e){br(n,"throw",e)}if("object"==typeof a&&a&&a instanceof Tr)return a}return new Tr(!1)};$t({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Sr(e,(function(e,r){!function(e,t,r){var n=je(t);n in e?Ye.f(e,n,oe(0,r)):e[n]=r}(t,e,r)}),{AS_ENTRIES:!0}),t}});var _r=void 0!==_r?_r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function vr(){throw new Error("setTimeout has not been defined")}function Ar(){throw new Error("clearTimeout has not been defined")}var Fr=vr,wr=Ar;function kr(e){if(Fr===setTimeout)return setTimeout(e,0);if((Fr===vr||!Fr)&&setTimeout)return Fr=setTimeout,setTimeout(e,0);try{return Fr(e,0)}catch(t){try{return Fr.call(null,e,0)}catch(t){return Fr.call(this,e,0)}}}"function"==typeof _r.setTimeout&&(Fr=setTimeout),"function"==typeof _r.clearTimeout&&(wr=clearTimeout);var Nr,Or=[],xr=!1,Ir=-1;function Pr(){xr&&Nr&&(xr=!1,Nr.length?Or=Nr.concat(Or):Ir=-1,Or.length&&Rr())}function Rr(){if(!xr){var e=kr(Pr);xr=!0;for(var t=Or.length;t;){for(Nr=Or,Or=[];++Ir<t;)Nr&&Nr[Ir].run();Ir=-1,t=Or.length}Nr=null,xr=!1,function(e){if(wr===clearTimeout)return clearTimeout(e);if((wr===Ar||!wr)&&clearTimeout)return wr=clearTimeout,clearTimeout(e);try{wr(e)}catch(t){try{return wr.call(null,e)}catch(t){return wr.call(this,e)}}}(e)}}function Lr(e,t){this.fun=e,this.array=t}Lr.prototype.run=function(){this.fun.apply(null,this.array)};function Br(){}var $r=Br,qr=Br,Mr=Br,jr=Br,Ur=Br,Vr=Br,Gr=Br;var Hr=_r.performance||{},Xr=Hr.now||Hr.mozNow||Hr.msNow||Hr.oNow||Hr.webkitNow||function(){return(new Date).getTime()};var Wr=new Date;var zr={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Or.push(new Lr(e,t)),1!==Or.length||xr||kr(Rr)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:$r,addListener:qr,once:Mr,off:jr,removeListener:Ur,removeAllListeners:Vr,emit:Gr,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Xr.call(Hr),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Wr)/1e3}};var Yr="object"==typeof zr&&zr.env&&zr.env.NODE_DEBUG&&/\bsemver\b/i.test(zr.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Qr={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Jr=t((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Qr,n=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let o=0;const a=(e,t,r)=>{const a=o++;Yr(a,t),s[e]=a,i[a]=t,n[a]=new RegExp(t,r?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),a("FULL",`^${i[s.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),a("LOOSE",`^${i[s.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),a("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),a("COERCERTL",i[s.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const Kr=["includePrerelease","loose","rtl"];var Zr=e=>e?"object"!=typeof e?{loose:!0}:Kr.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const en=/^[0-9]+$/,tn=(e,t)=>{const r=en.test(e),n=en.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var rn={compareIdentifiers:tn,rcompareIdentifiers:(e,t)=>tn(t,e)};const{MAX_LENGTH:nn,MAX_SAFE_INTEGER:sn}=Qr,{re:on,t:an}=Jr,{compareIdentifiers:un}=rn;class cn{constructor(e,t){if(t=Zr(t),e instanceof cn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>nn)throw new TypeError(`version is longer than ${nn} characters`);Yr("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?on[an.LOOSE]:on[an.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>sn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>sn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>sn||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<sn)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Yr("SemVer.compare",this.version,this.options,e),!(e instanceof cn)){if("string"==typeof e&&e===this.version)return 0;e=new cn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof cn||(e=new cn(e,this.options)),un(this.major,e.major)||un(this.minor,e.minor)||un(this.patch,e.patch)}comparePre(e){if(e instanceof cn||(e=new cn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(Yr("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return un(r,n)}while(++t)}compareBuild(e){e instanceof cn||(e=new cn(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(Yr("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return un(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var ln=cn;var pn=(e,t,r)=>new ln(e,r).compare(new ln(t,r));var hn=(e,t,r)=>pn(e,t,r)<0;var Dn=(e,t,r)=>pn(e,t,r)>=0,fn=t((function(e,t){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function n(){return"undefined"!=typeof WeakMap?new WeakMap:{add:r,delete:r,get:r,set:r,has:function(e){return!1}}}Object.defineProperty(t,"__esModule",{value:!0}),t.outdent=void 0;var i=Object.prototype.hasOwnProperty,s=function(e,t){return i.call(e,t)};function o(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return e}var a=/^[ \t]*(?:\r\n|\r|\n)/,u=/(?:\r\n|\r|\n)[ \t]*$/,c=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,p=/^[ \t]*[\r\n][ \t\r\n]*$/;function h(e,t,r){var n=0,i=e[0].match(l);i&&(n=i[1].length);var s=new RegExp("(\\r\\n|\\r|\\n).{0,"+n+"}","g");t&&(e=e.slice(1));var o=r.newline,c=r.trimLeadingNewline,p=r.trimTrailingNewline,h="string"==typeof o,D=e.length;return e.map((function(e,t){return e=e.replace(s,"$1"),0===t&&c&&(e=e.replace(a,"")),t===D-1&&p&&(e=e.replace(u,"")),h&&(e=e.replace(/\r\n|\n|\r/g,(function(e){return o}))),e}))}function D(e,t){for(var r="",n=0,i=e.length;n<i;n++)r+=e[n],n<i-1&&(r+=t[n]);return r}function f(e){return s(e,"raw")&&s(e,"length")}var d=function e(t){var r=n(),i=n();return o((function n(s){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];if(f(s)){var l=s,g=(a[0]===n||a[0]===d)&&p.test(l[0])&&c.test(l[1]),m=g?i:r,E=m.get(l);if(E||(E=h(l,g,t),m.set(l,E)),0===a.length)return E[0];var C=D(E,g?a.slice(1):a);return C}return e(o(o({},t),s||{}))}),{string:function(e){return h([e],!1,t)[0]}})}({trimLeadingNewline:!0,trimTrailingNewline:!0});t.outdent=d,t.default=d;try{e.exports=d,Object.defineProperty(d,"__esModule",{value:!0}),d.default=d,d.outdent=d}catch(e){}}));const{outdent:dn}=fn,gn="Config",mn="Editor",En="Other",Cn="Global",yn="Special",bn={cursorOffset:{since:"1.4.0",category:yn,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:dn`
|
41
41
|
Print (to stderr) where a cursor at the given position would move to after formatting.
|
42
42
|
This option cannot be used with --range-start and --range-end.
|
43
|
-
`,cliCategory:
|
43
|
+
`,cliCategory:mn},endOfLine:{since:"1.15.0",category:Cn,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:dn`
|
44
44
|
Maintain existing
|
45
45
|
(mixed values within one file are normalised by looking at what's used after the first line)
|
46
|
-
`}]},filepath:{since:"1.4.0",category:
|
46
|
+
`}]},filepath:{since:"1.4.0",category:yn,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:En,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:yn,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:En},parser:{since:"0.0.10",category:Cn,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:Cn,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:gn},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:Cn,description:dn`
|
47
47
|
Custom directory that contains prettier plugins in node_modules subdirectory.
|
48
48
|
Overrides default behavior when plugins are searched relatively to the location of Prettier.
|
49
49
|
Multiple values are accepted.
|
50
|
-
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:
|
50
|
+
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:gn},printWidth:{since:"0.0.0",category:Cn,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:yn,type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:dn`
|
51
51
|
Format code ending at a given character offset (exclusive).
|
52
52
|
The range will extend forwards to the end of the selected statement.
|
53
53
|
This option cannot be used with --cursor-offset.
|
54
|
-
`,cliCategory:
|
54
|
+
`,cliCategory:mn},rangeStart:{since:"1.4.0",category:yn,type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:dn`
|
55
55
|
Format code starting at a given character offset.
|
56
56
|
The range will extend backwards to the start of the first line containing the selected statement.
|
57
57
|
This option cannot be used with --cursor-offset.
|
58
|
-
`,cliCategory:
|
58
|
+
`,cliCategory:mn},requirePragma:{since:"1.7.0",category:yn,type:"boolean",default:!1,description:dn`
|
59
59
|
Require either '@prettier' or '@format' to be present in the file's first docblock comment
|
60
60
|
in order for it to be formatted.
|
61
|
-
`,cliCategory:dn},tabWidth:{type:"int",category:fn,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:fn,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:fn,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const En=["cliName","cliCategory","cliDescription"],Cn={compare:on,lt:an,gte:un},Tn=cn,yn={CATEGORY_CONFIG:Dn,CATEGORY_EDITOR:hn,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:dn,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:fn,CATEGORY_SPECIAL:mn,options:gn}.options;var Sn={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=Tn.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(a),o=((e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r))))(Object.assign({},...e.map((({options:e})=>e)),yn),"name").filter((e=>a(e)&&u(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return Q(e,En)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(a).sort(((e,t)=>Cn.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>a(e)&&u(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let o=i.name;s&&s.name&&(o+=` (plugin: ${s.name})`),e.choices.push({value:t,description:o})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));return{languages:s,options:o};function a(e){return t||!("since"in e)||e.since&&Cn.gte(i,e.since)}function u(e){return r||!("deprecated"in e)||e.deprecated&&Cn.lt(i,e.deprecated)}}};const{getSupportInfo:_n}=Sn,vn=/[^\x20-\x7F]/;function bn(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let o=r;for(;o>=0&&o<s;){const r=t.charAt(o);if(e instanceof RegExp){if(!e.test(r))return o}else if(!e.includes(r))return o;i?o--:o++}return(-1===o||o===s)&&o}}const Fn=bn(/\s/),An=bn(" \t"),wn=bn(",; \t"),Nn=bn(/[^\n\r]/);function kn(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function On(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Nn(e,t):t)}function xn(e,t,r){const n=r&&r.backwards;if(!1===t)return!1;const i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Pn(e,t,r={}){const n=An(e,r.backwards?t-1:t,r);return n!==xn(e,n,r)}function In(e,t){let r=null,n=t;for(;n!==r;)r=n,n=wn(e,n),n=kn(e,n),n=An(e,n);return n=On(e,n),n=xn(e,n),!1!==n&&Pn(e,n)}function Rn(e,t){let r=null,n=t;for(;n!==r;)r=n,n=An(e,n),n=kn(e,n),n=On(e,n),n=xn(e,n);return n}function Ln(e,t,r){return Rn(e,r(t))}function Bn(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function $n(e,t){const r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},s="'"===t?i:n,o=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(o.quote)){a=(r.match(s.regex)||[]).length>(r.match(o.regex)||[]).length?o.quote:s.quote}return a}function qn(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function Mn(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");r.length>20&&(r=r.slice(0,19)+"\u2026");return t+(r?" "+r:"")}(e)}var Un={inferParserByLanguage:function(e,t){const{languages:r}=_n({plugins:t.plugins}),n=r.find((({name:t})=>t.toLowerCase()===e))||r.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||r.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return n&&n.parsers[0]},getStringWidth:function(e){return e?vn.test(e)?z(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;e<i;e++)if(!n.get(e))return e;return i+1},getPenultimate:e=>e[e.length-2],getLast:M,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Rn,getNextNonSpaceNonCommentCharacterIndex:Ln,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(Ln(e,t,r))},skip:bn,skipWhitespace:Fn,skipSpaces:An,skipToLineEnd:wn,skipEverythingButNewLine:Nn,skipInlineComment:kn,skipTrailingComment:On,skipNewline:xn,isNextLineEmptyAfterIndex:In,isNextLineEmpty:function(e,t,r){return In(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=An(e,n,{backwards:!0}),n=xn(e,n,{backwards:!0}),n=An(e,n,{backwards:!0}),n!==xn(e,n,{backwards:!0})},hasNewline:Pn,hasNewlineInRange:function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1},hasSpaces:function(e,t,r={}){return An(e,r.backwards?t-1:t,r)!==t},getAlignmentSize:Bn,getIndentSize:function(e,t){const r=e.lastIndexOf("\n");return-1===r?0:Bn(e.slice(r+1).match(/^[\t ]*/)[0],t)},getPreferredQuote:$n,printString:function(e,t){return qn(e.slice(1,-1),"json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":$n(e,t.singleQuote?"'":'"'),!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))},printNumber:function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},makeString:qn,addLeadingComment:function(e,t){t.leading=!0,t.trailing=!1,Mn(e,t)},addDanglingComment:function(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Mn(e,t)},addTrailingComment:function(e,t){t.leading=!1,t.trailing=!0,Mn(e,t)},isFrontMatterNode:function(e){return e&&"front-matter"===e.type},getShebang:function(e){if(!e.startsWith("#!"))return"";const t=e.indexOf("\n");return-1===t?e:e.slice(0,t)},isNonEmptyArray:function(e){return Array.isArray(e)&&e.length>0},createGroupIdMapper:function(e){const t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}},jn={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]};const{inferParserByLanguage:Vn,isFrontMatterNode:Gn}=Un,{CSS_DISPLAY_TAGS:Hn,CSS_DISPLAY_DEFAULT:Xn,CSS_WHITE_SPACE_TAGS:zn,CSS_WHITE_SPACE_DEFAULT:Wn}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},Yn=Zn(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),Qn=function(e,t){const r=Object.create(null);for(const[n,i]of Object.entries(e))r[n]=t(i,n);return r}(jn,Zn),Jn=new Set(["\t","\n","\f","\r"," "]),Kn=e=>e.replace(/[\t\n\f\r ]+$/,"");function Zn(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function ei(e,t){return!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||(!(!Di(e)||!e.children.some((e=>"text"!==e.type&&"interpolation"!==e.type)))||!(!Ei(e,t)||ri(e)||"interpolation"===e.type)))}function ti(e){if("attribute"===e.type)return!1;if(!e.parent)return!1;if("number"!=typeof e.index||0===e.index)return!1;return function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])}function ri(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||hi(e)&&("script"===e.name||"style"===e.name))}function ni(e){return di(e).startsWith("pre")}function ii(e){return"element"===e.type&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function si(e){return ci(e)||"element"===e.type&&"br"===e.fullName||oi(e)}function oi(e){return ai(e)&&ui(e)}function ai(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:"root"===e.parent.type||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function ui(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function ci(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function li(e){const{type:t,lang:r}=e.attrMap;return"module"===t||"text/javascript"===t||"text/babel"===t||"application/javascript"===t||"jsx"===r?"babel":"application/x-typescript"===t||"ts"===r||"tsx"===r?"typescript":"text/markdown"===t?"markdown":"text/html"===t?"html":t&&(t.endsWith("json")||t.endsWith("importmap"))?"json":"text/x-handlebars-template"===t?"glimmer":void 0}function pi(e){return"block"===e||"list-item"===e||e.startsWith("table")}function Di(e){return di(e).startsWith("pre")}function hi(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function di(e){return"element"===e.type&&(!e.namespace||hi(e))&&zn[e.name]||Wn}const fi=new Set(["template","style","script"]);function mi(e,t){return gi(e,t)&&!fi.has(e.fullName)}function gi(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function Ei(e,t){return gi(e,t)&&(mi(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var Ci={HTML_ELEMENT_ATTRIBUTES:Qn,HTML_TAGS:Yn,htmlTrim:e=>(e=>e.replace(/^[\t\n\f\r ]+/,""))(Kn(e)),htmlTrimPreserveIndentation:e=>(e=>e.replace(/^[\t\f\r ]*?\n/g,""))(Kn(e)),splitByHtmlWhitespace:e=>e.split(/[\t\n\f\r ]+/),hasHtmlWhitespace:e=>/[\t\n\f\r ]/.test(e),getLeadingAndTrailingHtmlWhitespace:e=>{const[,t,r,n]=e.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s);return{leadingWhitespace:t,trailingWhitespace:n,text:r}},canHaveInterpolation:function(e){return e.children&&!ri(e)},countChars:function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r},countParents:function(e,t){let r=0;for(let n=e.stack.length-1;n>=0;n--){const i=e.stack[n];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&r++}return r},dedentString:function(e,t=function(e){let t=Number.POSITIVE_INFINITY;for(const n of e.split("\n")){if(0===n.length)continue;if(!Jn.has(n[0]))return 0;const e=(r=n,r.match(/^[\t\n\f\r ]*/)[0]).length;n.length!==e&&e<t&&(t=e)}var r;return t===Number.POSITIVE_INFINITY?0:t}(e)){return 0===t?e:e.split("\n").map((e=>e.slice(t))).join("\n")},forceBreakChildren:ii,forceBreakContent:function(e){return ii(e)||"element"===e.type&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some((e=>function(e){return e.children&&e.children.some((e=>"text"!==e.type))}(e))))||e.firstChild&&e.firstChild===e.lastChild&&"text"!==e.firstChild.type&&ai(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||ui(e.lastChild))},forceNextEmptyLine:function(e){return Gn(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){const t=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(t)return t[1]}let r=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}(e,(e=>"svg:foreignObject"===e.fullName)))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"vue"===t.parser&&e.parent&&"root"===e.parent.type?"block":"element"===e.type&&(!e.namespace||r||hi(e))&&Hn[e.name]||Xn}},getNodeCssStyleWhiteSpace:di,getPrettierIgnoreAttributeCommentData:function(e){const t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:ti,inferScriptParser:function(e,t){return"script"!==e.name||e.attrMap.src?"style"===e.name?function(e){const{lang:t}=e.attrMap;return t&&"postcss"!==t&&"css"!==t?"scss"===t?"scss":"less"===t?"less":void 0:"css"}(e):t&&Ei(e,t)?li(e)||!("src"in e.attrMap)&&Vn(e.attrMap.lang,t):void 0:e.attrMap.lang||e.attrMap.type?li(e):"babel"},isVueCustomBlock:mi,isVueNonHtmlBlock:Ei,isVueSlotAttribute:function(e){const t=e.fullName;return"#"===t.charAt(0)||"slot-scope"===t||"v-slot"===t||t.startsWith("v-slot:")},isVueSfcBindingsAttribute:function(e,t){const r=e.parent;if(!gi(r,t))return!1;const n=r.fullName,i=e.fullName;return"script"===n&&"setup"===i||"style"===n&&"vars"===i},isDanglingSpaceSensitiveNode:function(e){return!(t=e.cssDisplay,pi(t)||"inline-block"===t||ri(e));var t},isIndentationSensitiveNode:ni,isLeadingSpaceSensitiveNode:function(e,t){const r=function(){if(Gn(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(Di(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||Di(e)&&e.parent||ri(e.parent)||mi(e.parent,t)||(r=e.parent.cssDisplay,pi(r)||"inline-block"===r)))return!1;var r;if(e.prev&&!function(e){return!pi(e)}(e.prev.cssDisplay))return!1;return!0}();return r&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:r},isPreLikeNode:Di,isScriptLikeTag:ri,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e,t){return!Gn(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!Di(e.parent)||!(!e.next&&("root"===e.parent.type||Di(e)&&e.parent||ri(e.parent)||mi(e.parent,t)||(r=e.parent.cssDisplay,pi(r)||"inline-block"===r)))&&!(e.next&&!function(e){return!pi(e)}(e.next.cssDisplay))));var r},isWhitespaceSensitiveNode:function(e){return ri(e)||"interpolation"===e.type||ni(e)},isUnknownNamespace:hi,preferHardlineAsLeadingSpaces:function(e){return ci(e)||e.prev&&si(e.prev)||oi(e)},preferHardlineAsTrailingSpaces:si,shouldNotPrintClosingTag:function(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(ti(e)||ei(e.parent,t))},shouldPreserveContent:ei,unescapeQuoteEntities:function(e){return e.replace(/'/g,"'").replace(/"/g,'"')}};var Ti={hasPragma:function(e){return/^\s*<!--\s*@(format|prettier)\s*-->/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};const{isNonEmptyArray:yi}=Un,Si={attrs:!0,children:!0};class _i{constructor(e={}){for(const[t,r]of Object.entries(e))t in Si?this._setNodes(t,r):this[t]=r}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map((e=>e instanceof _i?e.clone():new _i(e)));let n=null,i=r[0],s=r[1]||null;for(let e=0;e<r.length;e++)bi(i,{index:e,siblings:r,prev:n,next:s,parent:t}),n=i,i=s,s=r[e+2]||null;return r}(t,this),"attrs"===e&&bi(this,{attrMap:Object.fromEntries(this[e].map((e=>[e.fullName,e.value])))}))}map(e){let t=null;for(const r in Si){const n=this[r];if(n){const i=vi(n,(t=>t.map(e)));t!==n&&(t||(t=new _i),t._setNodes(r,i))}}if(t){for(const e in this)e in Si||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:i,parent:s}=this;bi(t,{index:e,siblings:r,prev:n,next:i,parent:s})}return e(t||this)}clone(e){return new _i(e?Object.assign(Object.assign({},this),e):this)}get firstChild(){return yi(this.children)?this.children[0]:null}get lastChild(){return yi(this.children)?M(this.children):null}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}}function vi(e,t){const r=e.map(t);return r.some(((t,r)=>t!==e[r]))?r:e}function bi(e,t){const r=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,{value:t,enumerable:!1}])));Object.defineProperties(e,r)}var Fi={Node:_i};const{ParseSourceSpan:Ai}=B,wi=[{regex:/^(\[if([^\]]*?)]>)(.*?)<!\s*\[endif]$/s,parse:function(e,t,r){const[,n,i,s]=r,o="\x3c!--".length+n.length,a=e.sourceSpan.start.moveBy(o),u=a.moveBy(s.length),[c,l]=(()=>{try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new Ai(a,u)}]]}})();return{type:"ieConditionalComment",complete:c,children:l,condition:i.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new Ai(e.sourceSpan.start,a),endSourceSpan:new Ai(u,e.sourceSpan.end)}}},{regex:/^\[if([^\]]*?)]><!$/,parse:function(e,t,r){const[,n]=r;return{type:"ieConditionalStartComment",condition:n.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan}}},{regex:/^<!\s*\[endif]$/,parse:function(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}}];var Ni={parseIeConditionalComment:function(e,t){if(e.value)for(const{regex:r,parse:n}of wi){const i=e.value.match(r);if(i)return n(e,t,i)}return null}};var ki={locStart:function(e){return e.sourceSpan.start.offset},locEnd:function(e){return e.sourceSpan.end.offset}},Oi=t((function(e,t){function r(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}
|
61
|
+
`,cliCategory:En},tabWidth:{type:"int",category:Cn,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:Cn,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:Cn,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const Tn=["cliName","cliCategory","cliDescription"],Sn={compare:pn,lt:hn,gte:Dn},_n="2.4.1",vn={CATEGORY_CONFIG:gn,CATEGORY_EDITOR:mn,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:En,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:Cn,CATEGORY_SPECIAL:yn,options:bn}.options;var An={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=_n.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(a),o=((e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r))))(Object.assign({},...e.map((({options:e})=>e)),vn),"name").filter((e=>a(e)&&u(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return Q(e,Tn)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(a).sort(((e,t)=>Sn.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>a(e)&&u(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let o=i.name;s&&s.name&&(o+=` (plugin: ${s.name})`),e.choices.push({value:t,description:o})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));return{languages:s,options:o};function a(e){return t||!("since"in e)||e.since&&Sn.gte(i,e.since)}function u(e){return r||!("deprecated"in e)||e.deprecated&&Sn.lt(i,e.deprecated)}}};const{getSupportInfo:Fn}=An,wn=/[^\x20-\x7F]/;function kn(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let o=r;for(;o>=0&&o<s;){const r=t.charAt(o);if(e instanceof RegExp){if(!e.test(r))return o}else if(!e.includes(r))return o;i?o--:o++}return(-1===o||o===s)&&o}}const Nn=kn(/\s/),On=kn(" \t"),xn=kn(",; \t"),In=kn(/[^\n\r]/);function Pn(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function Rn(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?In(e,t):t)}function Ln(e,t,r){const n=r&&r.backwards;if(!1===t)return!1;const i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Bn(e,t,r={}){const n=On(e,r.backwards?t-1:t,r);return n!==Ln(e,n,r)}function $n(e,t){let r=null,n=t;for(;n!==r;)r=n,n=xn(e,n),n=Pn(e,n),n=On(e,n);return n=Rn(e,n),n=Ln(e,n),!1!==n&&Bn(e,n)}function qn(e,t){let r=null,n=t;for(;n!==r;)r=n,n=On(e,n),n=Pn(e,n),n=Rn(e,n),n=Ln(e,n);return n}function Mn(e,t,r){return qn(e,r(t))}function jn(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function Un(e,t){const r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},s="'"===t?i:n,o=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(o.quote)){a=(r.match(s.regex)||[]).length>(r.match(o.regex)||[]).length?o.quote:s.quote}return a}function Vn(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t}function Gn(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){const t=e.type||e.kind||"(unknown type)";let r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");r.length>20&&(r=r.slice(0,19)+"\u2026");return t+(r?" "+r:"")}(e)}var Hn={inferParserByLanguage:function(e,t){const{languages:r}=Fn({plugins:t.plugins}),n=r.find((({name:t})=>t.toLowerCase()===e))||r.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||r.find((({extensions:t})=>Array.isArray(t)&&t.includes(`.${e}`)));return n&&n.parsers[0]},getStringWidth:function(e){return e?wn.test(e)?W(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp(`(${Y(t)})+`,"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;e<i;e++)if(!n.get(e))return e;return i+1},getPenultimate:e=>e[e.length-2],getLast:M,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:qn,getNextNonSpaceNonCommentCharacterIndex:Mn,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(Mn(e,t,r))},skip:kn,skipWhitespace:Nn,skipSpaces:On,skipToLineEnd:xn,skipEverythingButNewLine:In,skipInlineComment:Pn,skipTrailingComment:Rn,skipNewline:Ln,isNextLineEmptyAfterIndex:$n,isNextLineEmpty:function(e,t,r){return $n(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=On(e,n,{backwards:!0}),n=Ln(e,n,{backwards:!0}),n=On(e,n,{backwards:!0}),n!==Ln(e,n,{backwards:!0})},hasNewline:Bn,hasNewlineInRange:function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1},hasSpaces:function(e,t,r={}){return On(e,r.backwards?t-1:t,r)!==t},getAlignmentSize:jn,getIndentSize:function(e,t){const r=e.lastIndexOf("\n");return-1===r?0:jn(e.slice(r+1).match(/^[\t ]*/)[0],t)},getPreferredQuote:Un,printString:function(e,t){return Vn(e.slice(1,-1),"json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Un(e,t.singleQuote?"'":'"'),!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))},printNumber:function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},makeString:Vn,addLeadingComment:function(e,t){t.leading=!0,t.trailing=!1,Gn(e,t)},addDanglingComment:function(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Gn(e,t)},addTrailingComment:function(e,t){t.leading=!1,t.trailing=!0,Gn(e,t)},isFrontMatterNode:function(e){return e&&"front-matter"===e.type},getShebang:function(e){if(!e.startsWith("#!"))return"";const t=e.indexOf("\n");return-1===t?e:e.slice(0,t)},isNonEmptyArray:function(e){return Array.isArray(e)&&e.length>0},createGroupIdMapper:function(e){const t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}},Xn={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]};function Wn(e){return{type:"concat",parts:e}}function zn(e){return{type:"indent",contents:e}}function Yn(e,t){return{type:"align",contents:t,n:e}}function Qn(e,t={}){return{type:"group",id:t.id,contents:e,break:Boolean(t.shouldBreak),expandedStates:t.expandedStates}}const Jn={type:"break-parent"},Kn={type:"line",hard:!0},Zn={type:"line",hard:!0,literal:!0},ei=Wn([Kn,Jn]),ti=Wn([Zn,Jn]);var ri={concat:Wn,join:function(e,t){const r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return Wn(r)},line:{type:"line"},softline:{type:"line",soft:!0},hardline:ei,literalline:ti,group:Qn,conditionalGroup:function(e,t){return Qn(e[0],Object.assign(Object.assign({},t),{},{expandedStates:e}))},fill:function(e){return{type:"fill",parts:e}},lineSuffix:function(e){return{type:"line-suffix",contents:e}},lineSuffixBoundary:{type:"line-suffix-boundary"},cursor:{type:"cursor",placeholder:Symbol("cursor")},breakParent:Jn,ifBreak:function(e,t,r={}){return{type:"if-break",breakContents:e,flatContents:t,groupId:r.groupId}},trim:{type:"trim"},indent:zn,indentIfBreak:function(e,t){return{type:"indent-if-break",contents:e,groupId:t.groupId,negate:t.negate}},align:Yn,addAlignmentToDoc:function(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=zn(n);n=Yn(t%r,n),n=Yn(Number.NEGATIVE_INFINITY,n)}return n},markAsRoot:function(e){return Yn({type:"root"},e)},dedentToRoot:function(e){return Yn(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return Yn(-1,e)},hardlineWithoutBreakParent:Kn,literallineWithoutBreakParent:Zn,label:function(e,t){return{type:"label",label:e,contents:t}}};var ni={guessEndOfLine:function(e){const t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){let r;if("\n"===t)r=/\n/g;else if("\r"===t)r=/\r/g;else{if("\r\n"!==t)throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);r=/\r\n/g}const n=e.match(r);return n?n.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}};const{literalline:ii,join:si}=ri,oi=e=>Array.isArray(e)||e&&"concat"===e.type,ai=e=>{if(Array.isArray(e))return e;if("concat"!==e.type&&"fill"!==e.type)throw new Error("Expect doc type to be `concat` or `fill`.");return e.parts},ui={};function ci(e,t,r,n){const i=[e];for(;i.length>0;){const e=i.pop();if(e!==ui){if(r&&i.push(e,ui),!t||!1!==t(e))if(oi(e)||"fill"===e.type){const t=ai(e);for(let e=t.length-1;e>=0;--e)i.push(t[e])}else if("if-break"===e.type)e.flatContents&&i.push(e.flatContents),e.breakContents&&i.push(e.breakContents);else if("group"===e.type&&e.expandedStates)if(n)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);else e.contents&&i.push(e.contents)}else r(i.pop())}}function li(e,t){const r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);const i=function(e){if(Array.isArray(e))return t(e.map(n));if("concat"===e.type||"fill"===e.type){const r=e.parts.map(n);return t(Object.assign(Object.assign({},e),{},{parts:r}))}if("if-break"===e.type){const r=e.breakContents&&n(e.breakContents),i=e.flatContents&&n(e.flatContents);return t(Object.assign(Object.assign({},e),{},{breakContents:r,flatContents:i}))}if("group"===e.type&&e.expandedStates){const r=e.expandedStates.map(n),i=r[0];return t(Object.assign(Object.assign({},e),{},{contents:i,expandedStates:r}))}if(e.contents){const r=n(e.contents);return t(Object.assign(Object.assign({},e),{},{contents:r}))}return t(e)}(e);return r.set(e,i),i}}function pi(e,t,r){let n=r,i=!1;return ci(e,(function(e){const r=t(e);if(void 0!==r&&(i=!0,n=r),i)return!1})),n}function hi(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function Di(e){if(e.length>0){const t=M(e);t.expandedStates||t.break||(t.break="propagated")}return null}function fi(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}const di=(e,t)=>e&&"line"===e.type&&e.hard&&t&&"break-parent"===t.type;function gi(e){if(!e)return e;if(oi(e)||"fill"===e.type){const t=ai(e);for(;t.length>1&&di(...t.slice(-2));)t.length-=2;if(t.length>0){const e=gi(M(t));t[t.length-1]=e}return Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}switch(e.type){case"align":case"indent":case"indent-if-break":case"group":case"line-suffix":case"label":{const t=gi(e.contents);return Object.assign(Object.assign({},e),{},{contents:t})}case"if-break":{const t=gi(e.breakContents),r=gi(e.flatContents);return Object.assign(Object.assign({},e),{},{breakContents:t,flatContents:r})}}return e}function mi(e){return li(e,(e=>function(e){switch(e.type){case"fill":if(0===e.parts.length||e.parts.every((e=>""===e)))return"";break;case"group":if(!(e.contents||e.id||e.break||e.expandedStates))return"";if("group"===e.contents.type&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case"align":case"indent":case"indent-if-break":case"line-suffix":if(!e.contents)return"";break;case"if-break":if(!e.flatContents&&!e.breakContents)return""}if(!oi(e))return e;const t=[];for(const r of ai(e)){if(!r)continue;const[e,...n]=oi(r)?ai(r):[r];"string"==typeof e&&"string"==typeof M(t)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:Array.isArray(e)?t:Object.assign(Object.assign({},e),{},{parts:t})}(e)))}function Ei(e){const t=[],r=e.filter(Boolean);for(;r.length>0;){const e=r.shift();e&&(oi(e)?r.unshift(...ai(e)):t.length>0&&"string"==typeof M(t)&&"string"==typeof e?t[t.length-1]+=e:t.push(e))}return t}function Ci(e,t=ii){return si(t,e.split("\n")).parts}var yi={isConcat:oi,getDocParts:ai,willBreak:function(e){return pi(e,hi,!1)},traverseDoc:ci,findInDoc:pi,mapDoc:li,propagateBreaks:function(e){const t=new Set,r=[];ci(e,(function(e){if("break-parent"===e.type&&Di(r),"group"===e.type){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){if("group"===e.type){r.pop().break&&Di(r)}}),!0)},removeLines:function(e){return li(e,fi)},stripTrailingHardline:function(e){return gi(mi(e))},normalizeParts:Ei,normalizeDoc:function(e){return li(e,(e=>Array.isArray(e)?Ei(e):e.parts?Object.assign(Object.assign({},e),{},{parts:Ei(e.parts)}):e))},cleanDoc:mi,replaceTextEndOfLine:Ci,replaceEndOfLine:function(e){return li(e,(e=>"string"==typeof e&&e.includes("\n")?Ci(e):e))}};const{getStringWidth:bi,getLast:Ti}=Hn,{convertEndOfLineToChars:Si}=ni,{fill:_i,cursor:vi,indent:Ai}=ri,{isConcat:Fi,getDocParts:wi}=yi;let ki;function Ni(e,t){return xi(e,{type:"indent"},t)}function Oi(e,t,r){if(t===Number.NEGATIVE_INFINITY)return e.root||{value:"",length:0,queue:[]};if(t<0)return xi(e,{type:"dedent"},r);if(!t)return e;if("root"===t.type)return Object.assign(Object.assign({},e),{},{root:e});return xi(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r)}function xi(e,t,r){const n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t];let i="",s=0,o=0,a=0;for(const e of n)switch(e.type){case"indent":l(),r.useTabs?u(1):c(r.tabWidth);break;case"stringAlign":l(),i+=e.n,s+=e.n.length;break;case"numberAlign":o+=1,a+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),Object.assign(Object.assign({},e),{},{value:i,length:s,queue:n});function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function c(e){i+=" ".repeat(e),s+=e}function l(){r.useTabs?function(){o>0&&u(o);h()}():p()}function p(){a>0&&c(a),h()}function h(){o=0,a=0}}function Ii(e){if(0===e.length)return 0;let t=0;for(;e.length>0&&"string"==typeof Ti(e)&&/^[\t ]*$/.test(Ti(e));)t+=e.pop().length;if(e.length>0&&"string"==typeof Ti(e)){const r=Ti(e).replace(/[\t ]*$/,"");t+=Ti(e).length-r.length,e[e.length-1]=r}return t}function Pi(e,t,r,n,i,s){let o=t.length;const a=[e],u=[];for(;r>=0;){if(0===a.length){if(0===o)return!0;a.push(t[o-1]),o--;continue}const[e,c,l]=a.pop();if("string"==typeof l)u.push(l),r-=bi(l);else if(Fi(l)){const t=wi(l);for(let r=t.length-1;r>=0;r--)a.push([e,c,t[r]])}else switch(l.type){case"indent":a.push([Ni(e,n),c,l.contents]);break;case"align":a.push([Oi(e,l.n,n),c,l.contents]);break;case"trim":r+=Ii(u);break;case"group":{if(s&&l.break)return!1;const t=l.break?1:c;a.push([e,t,l.expandedStates&&1===t?Ti(l.expandedStates):l.contents]),l.id&&(ki[l.id]=t);break}case"fill":for(let t=l.parts.length-1;t>=0;t--)a.push([e,c,l.parts[t]]);break;case"if-break":case"indent-if-break":{const t=l.groupId?ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ai(l.contents);t&&a.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ai(l.contents):l.contents;t&&a.push([e,c,t])}break}case"line":switch(c){case 2:if(!l.hard){l.soft||(u.push(" "),r-=1);break}return!0;case 1:return!0}break;case"line-suffix":i=!0;break;case"line-suffix-boundary":if(i)return!1;break;case"label":a.push([e,c,l.contents])}}return!1}var Ri={printDocToString:function(e,t){ki={};const r=t.printWidth,n=Si(t.endOfLine);let i=0;const s=[[{value:"",length:0,queue:[]},1,e]],o=[];let a=!1,u=[];for(;s.length>0;){const[e,c,l]=s.pop();if("string"==typeof l){const e="\n"!==n?l.replace(/\n/g,n):l;o.push(e),i+=bi(e)}else if(Fi(l)){const t=wi(l);for(let r=t.length-1;r>=0;r--)s.push([e,c,t[r]])}else switch(l.type){case"cursor":o.push(vi.placeholder);break;case"indent":s.push([Ni(e,t),c,l.contents]);break;case"align":s.push([Oi(e,l.n,t),c,l.contents]);break;case"trim":i-=Ii(o);break;case"group":switch(c){case 2:if(!a){s.push([e,l.break?1:2,l.contents]);break}case 1:{a=!1;const n=[e,2,l.contents],o=r-i,c=u.length>0;if(!l.break&&Pi(n,s,o,t,c))s.push(n);else if(l.expandedStates){const r=Ti(l.expandedStates);if(l.break){s.push([e,1,r]);break}for(let n=1;n<l.expandedStates.length+1;n++){if(n>=l.expandedStates.length){s.push([e,1,r]);break}{const r=[e,2,l.expandedStates[n]];if(Pi(r,s,o,t,c)){s.push(r);break}}}}else s.push([e,1,l.contents]);break}}l.id&&(ki[l.id]=Ti(s)[1]);break;case"fill":{const n=r-i,{parts:o}=l;if(0===o.length)break;const[a,p]=o,h=[e,2,a],D=[e,1,a],f=Pi(h,[],n,t,u.length>0,!0);if(1===o.length){f?s.push(h):s.push(D);break}const d=[e,2,p],g=[e,1,p];if(2===o.length){f?s.push(d,h):s.push(g,D);break}o.splice(0,2);const m=[e,c,_i(o)];Pi([e,2,[a,p,o[0]]],[],n,t,u.length>0,!0)?s.push(m,d,h):f?s.push(m,g,h):s.push(m,g,D);break}case"if-break":case"indent-if-break":{const t=l.groupId?ki[l.groupId]:c;if(1===t){const t="if-break"===l.type?l.breakContents:l.negate?l.contents:Ai(l.contents);t&&s.push([e,c,t])}if(2===t){const t="if-break"===l.type?l.flatContents:l.negate?Ai(l.contents):l.contents;t&&s.push([e,c,t])}break}case"line-suffix":u.push([e,c,l.contents]);break;case"line-suffix-boundary":u.length>0&&s.push([e,c,{type:"line",hard:!0}]);break;case"line":switch(c){case 2:if(!l.hard){l.soft||(o.push(" "),i+=1);break}a=!0;case 1:if(u.length>0){s.push([e,c,l],...u.reverse()),u=[];break}l.literal?e.root?(o.push(n,e.root.value),i=e.root.length):(o.push(n),i=0):(i-=Ii(o),o.push(n+e.value),i=e.length)}break;case"label":s.push([e,c,l.contents])}0===s.length&&u.length>0&&(s.push(...u.reverse()),u=[])}const c=o.indexOf(vi.placeholder);if(-1!==c){const e=o.indexOf(vi.placeholder,c+1),t=o.slice(0,c).join(""),r=o.slice(c+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}};const{isConcat:Li,getDocParts:Bi}=yi;function $i(e){if(!e)return"";if(Li(e)){const t=[];for(const r of Bi(e))if(Li(r))t.push(...$i(r).parts);else{const e=$i(r);""!==e&&t.push(e)}return{type:"concat",parts:t}}return"if-break"===e.type?Object.assign(Object.assign({},e),{},{breakContents:$i(e.breakContents),flatContents:$i(e.flatContents)}):"group"===e.type?Object.assign(Object.assign({},e),{},{contents:$i(e.contents),expandedStates:e.expandedStates&&e.expandedStates.map($i)}):"fill"===e.type?{type:"fill",parts:e.parts.map($i)}:e.contents?Object.assign(Object.assign({},e),{},{contents:$i(e.contents)}):e}var qi={builders:ri,printer:Ri,utils:yi,debug:{printDocToDebug:function(e){const t=Object.create(null),r=new Set;return function e(t,r,i){if("string"==typeof t)return JSON.stringify(t);if(Li(t)){const r=Bi(t).map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if("line"===t.type){const e=Array.isArray(i)&&i[r+1]&&"break-parent"===i[r+1].type;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if("break-parent"===t.type){return Array.isArray(i)&&i[r-1]&&"line"===i[r-1].type&&i[r-1].hard?void 0:"breakParent"}if("trim"===t.type)return"trim";if("indent"===t.type)return"indent("+e(t.contents)+")";if("align"===t.type)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if("if-break"===t.type)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if("indent-if-break"===t.type){const r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);const i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if("group"===t.type){const r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);const i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if("fill"===t.type)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if("line-suffix"===t.type)return"lineSuffix("+e(t.contents)+")";if("line-suffix-boundary"===t.type)return"lineSuffixBoundary";if("label"===t.type)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}($i(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];const n=String(e).slice(7,-1)||"symbol";for(let i=0;;i++){const s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}}};const{inferParserByLanguage:Mi,isFrontMatterNode:ji}=Hn,{builders:{line:Ui,hardline:Vi,join:Gi},utils:{getDocParts:Hi,replaceTextEndOfLine:Xi}}=qi,{CSS_DISPLAY_TAGS:Wi,CSS_DISPLAY_DEFAULT:zi,CSS_WHITE_SPACE_TAGS:Yi,CSS_WHITE_SPACE_DEFAULT:Qi}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},Ji=rs(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),Ki=function(e,t){const r=Object.create(null);for(const[n,i]of Object.entries(e))r[n]=t(i,n);return r}(Xn,rs),Zi=new Set(["\t","\n","\f","\r"," "]),es=e=>e.replace(/[\t\n\f\r ]+$/,""),ts=e=>(e=>e.replace(/^[\t\f\r ]*?\n/g,""))(es(e));function rs(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function ns(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||fs(e)&&("script"===e.name||"style"===e.name))}function is(e){return ds(e).startsWith("pre")}function ss(e){return"element"===e.type&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function os(e){return ls(e)||"element"===e.type&&"br"===e.fullName||as(e)}function as(e){return us(e)&&cs(e)}function us(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:"root"===e.parent.type||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function cs(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function ls(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function ps(e){const{type:t,lang:r}=e.attrMap;return"module"===t||"text/javascript"===t||"text/babel"===t||"application/javascript"===t||"jsx"===r?"babel":"application/x-typescript"===t||"ts"===r||"tsx"===r?"typescript":"text/markdown"===t?"markdown":"text/html"===t?"html":t&&(t.endsWith("json")||t.endsWith("importmap"))?"json":"text/x-handlebars-template"===t?"glimmer":void 0}function hs(e){return"block"===e||"list-item"===e||e.startsWith("table")}function Ds(e){return ds(e).startsWith("pre")}function fs(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function ds(e){return"element"===e.type&&(!e.namespace||fs(e))&&Yi[e.name]||Qi}function gs(e,t=function(e){let t=Number.POSITIVE_INFINITY;for(const n of e.split("\n")){if(0===n.length)continue;if(!Zi.has(n[0]))return 0;const e=(r=n,r.match(/^[\t\n\f\r ]*/)[0]).length;n.length!==e&&e<t&&(t=e)}var r;return t===Number.POSITIVE_INFINITY?0:t}(e)){return 0===t?e:e.split("\n").map((e=>e.slice(t))).join("\n")}const ms=new Set(["template","style","script"]);function Es(e,t){return Cs(e,t)&&!ms.has(e.fullName)}function Cs(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function ys(e,t){return Cs(e,t)&&(Es(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var bs={HTML_ELEMENT_ATTRIBUTES:Ki,HTML_TAGS:Ji,htmlTrim:e=>(e=>e.replace(/^[\t\n\f\r ]+/,""))(es(e)),htmlTrimPreserveIndentation:ts,hasHtmlWhitespace:e=>/[\t\n\f\r ]/.test(e),getLeadingAndTrailingHtmlWhitespace:e=>{const[,t,r,n]=e.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s);return{leadingWhitespace:t,trailingWhitespace:n,text:r}},canHaveInterpolation:function(e){return e.children&&!ns(e)},countChars:function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r},countParents:function(e,t){let r=0;for(let n=e.stack.length-1;n>=0;n--){const i=e.stack[n];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&r++}return r},dedentString:gs,forceBreakChildren:ss,forceBreakContent:function(e){return ss(e)||"element"===e.type&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some((e=>function(e){return e.children&&e.children.some((e=>"text"!==e.type))}(e))))||e.firstChild&&e.firstChild===e.lastChild&&"text"!==e.firstChild.type&&us(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||cs(e.lastChild))},forceNextEmptyLine:function(e){return ji(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line},getLastDescendant:function e(t){return t.lastChild?e(t.lastChild):t},getNodeCssStyleDisplay:function(e,t){if(e.prev&&"comment"===e.prev.type){const t=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(t)return t[1]}let r=!1;if("element"===e.type&&"svg"===e.namespace){if(!function(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}(e,(e=>"svg:foreignObject"===e.fullName)))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"vue"===t.parser&&e.parent&&"root"===e.parent.type?"block":"element"===e.type&&(!e.namespace||r||fs(e))&&Wi[e.name]||zi}},getNodeCssStyleWhiteSpace:ds,hasPrettierIgnore:function(e){return"attribute"!==e.type&&(!!e.parent&&("number"==typeof e.index&&0!==e.index&&function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])))},inferScriptParser:function(e,t){return"script"!==e.name||e.attrMap.src?"style"===e.name?function(e){const{lang:t}=e.attrMap;return t&&"postcss"!==t&&"css"!==t?"scss"===t?"scss":"less"===t?"less":void 0:"css"}(e):t&&ys(e,t)?ps(e)||!("src"in e.attrMap)&&Mi(e.attrMap.lang,t):void 0:e.attrMap.lang||e.attrMap.type?ps(e):"babel"},isVueCustomBlock:Es,isVueNonHtmlBlock:ys,isVueSlotAttribute:function(e){const t=e.fullName;return"#"===t.charAt(0)||"slot-scope"===t||"v-slot"===t||t.startsWith("v-slot:")},isVueSfcBindingsAttribute:function(e,t){const r=e.parent;if(!Cs(r,t))return!1;const n=r.fullName,i=e.fullName;return"script"===n&&"setup"===i||"style"===n&&"vars"===i},isDanglingSpaceSensitiveNode:function(e){return!(t=e.cssDisplay,hs(t)||"inline-block"===t||ns(e));var t},isIndentationSensitiveNode:is,isLeadingSpaceSensitiveNode:function(e,t){const r=function(){if(ji(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(Ds(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||Ds(e)&&e.parent||ns(e.parent)||Es(e.parent,t)||(r=e.parent.cssDisplay,hs(r)||"inline-block"===r)))return!1;var r;if(e.prev&&!function(e){return!hs(e)}(e.prev.cssDisplay))return!1;return!0}();return r&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:r},isPreLikeNode:Ds,isScriptLikeTag:ns,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e,t){return!ji(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!Ds(e.parent)||!(!e.next&&("root"===e.parent.type||Ds(e)&&e.parent||ns(e.parent)||Es(e.parent,t)||(r=e.parent.cssDisplay,hs(r)||"inline-block"===r)))&&!(e.next&&!function(e){return!hs(e)}(e.next.cssDisplay))));var r},isWhitespaceSensitiveNode:function(e){return ns(e)||"interpolation"===e.type||is(e)},isUnknownNamespace:fs,preferHardlineAsLeadingSpaces:function(e){return ls(e)||e.prev&&os(e.prev)||as(e)},preferHardlineAsTrailingSpaces:os,shouldPreserveContent:function(e,t){return!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||(!(!Ds(e)||!e.children.some((e=>"text"!==e.type&&"interpolation"!==e.type)))||!(!ys(e,t)||ns(e)||"interpolation"===e.type)))},unescapeQuoteEntities:function(e){return e.replace(/'/g,"'").replace(/"/g,'"')},getTextValueParts:function(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?Xi(t):Xi(gs(ts(t)),Vi):Hi(Gi(Ui,t.split(/[\t\n\f\r ]+/)))}};var Ts={hasPragma:function(e){return/^\s*<!--\s*@(?:format|prettier)\s*-->/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};const{isNonEmptyArray:Ss}=Hn,_s={attrs:!0,children:!0};class vs{constructor(e={}){for(const[t,r]of Object.entries(e))t in _s?this._setNodes(t,r):this[t]=r}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map((e=>e instanceof vs?e.clone():new vs(e)));let n=null,i=r[0],s=r[1]||null;for(let e=0;e<r.length;e++)Fs(i,{index:e,siblings:r,prev:n,next:s,parent:t}),n=i,i=s,s=r[e+2]||null;return r}(t,this),"attrs"===e&&Fs(this,{attrMap:Object.fromEntries(this[e].map((e=>[e.fullName,e.value])))}))}map(e){let t=null;for(const r in _s){const n=this[r];if(n){const i=As(n,(t=>t.map(e)));t!==n&&(t||(t=new vs),t._setNodes(r,i))}}if(t){for(const e in this)e in _s||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:i,parent:s}=this;Fs(t,{index:e,siblings:r,prev:n,next:i,parent:s})}return e(t||this)}walk(e){for(const t in _s){const r=this[t];if(r)for(let t=0;t<r.length;t++)r[t].walk(e)}e(this)}clone(e){return new vs(e?Object.assign(Object.assign({},this),e):this)}setChildren(e){this._setNodes("children",e)}get firstChild(){return Ss(this.children)?this.children[0]:null}get lastChild(){return Ss(this.children)?M(this.children):null}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}}function As(e,t){const r=e.map(t);return r.some(((t,r)=>t!==e[r]))?r:e}function Fs(e,t){const r=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,{value:t,enumerable:!1}])));Object.defineProperties(e,r)}var ws={Node:vs};const{ParseSourceSpan:ks}=B,Ns=[{regex:/^(\[if([^\]]*?)]>)(.*?)<!\s*\[endif]$/s,parse:function(e,t,r){const[,n,i,s]=r,o="\x3c!--".length+n.length,a=e.sourceSpan.start.moveBy(o),u=a.moveBy(s.length),[c,l]=(()=>{try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new ks(a,u)}]]}})();return{type:"ieConditionalComment",complete:c,children:l,condition:i.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new ks(e.sourceSpan.start,a),endSourceSpan:new ks(u,e.sourceSpan.end)}}},{regex:/^\[if([^\]]*?)]><!$/,parse:function(e,t,r){const[,n]=r;return{type:"ieConditionalStartComment",condition:n.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan}}},{regex:/^<!\s*\[endif]$/,parse:function(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}}];var Os={parseIeConditionalComment:function(e,t){if(e.value)for(const{regex:r,parse:n}of Ns){const i=e.value.match(r);if(i)return n(e,t,i)}return null}};var xs={locStart:function(e){return e.sourceSpan.start.offset},locEnd:function(e){return e.sourceSpan.end.offset}},Is=t((function(e,t){function r(e){if(":"!=e[0])return[null,e];const t=e.indexOf(":",1);if(-1==t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}
|
62
62
|
/**
|
63
63
|
* @license
|
64
64
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -74,7 +74,7 @@ Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.RAW_TEXT=0]="RA
|
|
74
74
|
* Use of this source code is governed by an MIT-style license that can be
|
75
75
|
* found in the LICENSE file at https://angular.io/license
|
76
76
|
*/
|
77
|
-
class
|
77
|
+
class Ps{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=Is.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach((e=>this.closedByChildren[e]=!0)),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}var Rs=Ps;let Ls,Bs;var $s=function(e){return Bs||(Ls=new Ps,Bs={base:new Ps({isVoid:!0}),meta:new Ps({isVoid:!0}),area:new Ps({isVoid:!0}),embed:new Ps({isVoid:!0}),link:new Ps({isVoid:!0}),img:new Ps({isVoid:!0}),input:new Ps({isVoid:!0}),param:new Ps({isVoid:!0}),hr:new Ps({isVoid:!0}),br:new Ps({isVoid:!0}),source:new Ps({isVoid:!0}),track:new Ps({isVoid:!0}),wbr:new Ps({isVoid:!0}),p:new Ps({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Ps({closedByChildren:["tbody","tfoot"]}),tbody:new Ps({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Ps({closedByChildren:["tbody"],closedByParent:!0}),tr:new Ps({closedByChildren:["tr"],closedByParent:!0}),td:new Ps({closedByChildren:["td","th"],closedByParent:!0}),th:new Ps({closedByChildren:["td","th"],closedByParent:!0}),col:new Ps({isVoid:!0}),svg:new Ps({implicitNamespacePrefix:"svg"}),math:new Ps({implicitNamespacePrefix:"math"}),li:new Ps({closedByChildren:["li"],closedByParent:!0}),dt:new Ps({closedByChildren:["dt","dd"]}),dd:new Ps({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Ps({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Ps({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Ps({closedByChildren:["optgroup"],closedByParent:!0}),option:new Ps({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Ps({ignoreFirstLf:!0}),listing:new Ps({ignoreFirstLf:!0}),style:new Ps({contentType:Is.TagContentType.RAW_TEXT}),script:new Ps({contentType:Is.TagContentType.RAW_TEXT}),title:new Ps({contentType:Is.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new Ps({contentType:Is.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),Bs[e]||Ls},qs=Object.defineProperty({HtmlTagDefinition:Rs,getHtmlTagDefinition:$s},"__esModule",{value:!0});var Ms=
|
78
78
|
/**
|
79
79
|
* @license
|
80
80
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -82,7 +82,7 @@ class xi{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r
|
|
82
82
|
* Use of this source code is governed by an MIT-style license that can be
|
83
83
|
* found in the LICENSE file at https://angular.io/license
|
84
84
|
*/
|
85
|
-
class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}},
|
85
|
+
class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}},js=Object.defineProperty({AstPath:Ms},"__esModule",{value:!0});var Us=
|
86
86
|
/**
|
87
87
|
* @license
|
88
88
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -90,7 +90,7 @@ class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.pa
|
|
90
90
|
* Use of this source code is governed by an MIT-style license that can be
|
91
91
|
* found in the LICENSE file at https://angular.io/license
|
92
92
|
*/
|
93
|
-
class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r,this.type="text"}visit(e,t){return e.visitText(this,t)}};var
|
93
|
+
class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r,this.type="text"}visit(e,t){return e.visitText(this,t)}};var Vs=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}};var Gs=class{constructor(e,t,r,n,i,s){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=i,this.i18n=s}visit(e,t){return e.visitExpansion(this,t)}};var Hs=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}};var Xs=class{constructor(e,t,r,n=null,i=null,s=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=i,this.i18n=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}};class Ws{constructor(e,t,r,n,i=null,s=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=i,this.endSourceSpan=s,this.nameSpan=o,this.i18n=a,this.type="element"}visit(e,t){return e.visitElement(this,t)}}var zs=Ws;var Ys=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}};var Qs=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}};function Js(e,t,r=null){const n=[],i=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach((e=>{const t=i(e);t&&n.push(t)})),n}var Ks=Js;class Zs{constructor(){}visitElement(e,t){this.visitChildren(t,(t=>{t(e.attrs),t(e.children)}))}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,(t=>{t(e.cases)}))}visitExpansionCase(e,t){}visitChildren(e,t){let r=[],n=this;return t((function(t){t&&r.push(Js(n,t,e))})),Array.prototype.concat.apply([],r)}}var eo=Zs;function to(e){const t=e.sourceSpan.start.offset;let r=e.sourceSpan.end.offset;return e instanceof Ws&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=to(e.children[e.children.length-1]).end)),{start:t,end:r}}var ro=function(e,t){const r=[];return Js(new class extends Zs{visit(e,n){const i=to(e);if(!(i.start<=t&&t<i.end))return!0;r.push(e)}},e),new js.AstPath(r,t)},no=Object.defineProperty({Text:Us,CDATA:Vs,Expansion:Gs,ExpansionCase:Hs,Attribute:Xs,Element:zs,Comment:Ys,DocType:Qs,visitAll:Ks,RecursiveVisitor:eo,findNode:ro},"__esModule",{value:!0});var io=
|
94
94
|
/**
|
95
95
|
* @license
|
96
96
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -98,7 +98,7 @@ class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r,this.type="t
|
|
98
98
|
* Use of this source code is governed by an MIT-style license that can be
|
99
99
|
* found in the LICENSE file at https://angular.io/license
|
100
100
|
*/
|
101
|
-
function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error(`Expected '${e}' to be an array of strings.`);for(let r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error(`Expected '${e}' to be an array of strings.`)}};const
|
101
|
+
function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error(`Expected '${e}' to be an array of strings.`);for(let r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error(`Expected '${e}' to be an array of strings.`)}};const so=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];var oo=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(null!=t){const e=t[0],r=t[1];so.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}},ao=Object.defineProperty({assertArrayOfStrings:io,assertInterpolationSymbols:oo},"__esModule",{value:!0}),uo=t((function(e,t){
|
102
102
|
/**
|
103
103
|
* @license
|
104
104
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -106,7 +106,7 @@ function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error(`Expected '${e}'
|
|
106
106
|
* Use of this source code is governed by an MIT-style license that can be
|
107
107
|
* found in the LICENSE file at https://angular.io/license
|
108
108
|
*/
|
109
|
-
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(
|
109
|
+
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(ao.assertInterpolationSymbols("interpolation",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")})),co=t((function(e,t){
|
110
110
|
/**
|
111
111
|
* @license
|
112
112
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -114,7 +114,7 @@ Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.s
|
|
114
114
|
* Use of this source code is governed by an MIT-style license that can be
|
115
115
|
* found in the LICENSE file at https://angular.io/license
|
116
116
|
*/
|
117
|
-
Object.defineProperty(t,"__esModule",{value:!0});const n=r;var i;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(i=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class o extends B.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=o;class a{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=a,t.tokenize=function(e,t,r,n={}){return new D(new B.ParseSourceFile(e,t),r,n).tokenize()};const u=/\r\n?/g;function c(e){return`Unexpected character "${e===n.$EOF?"EOF":String.fromCharCode(e)}"`}function l(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}class p{constructor(e){this.error=e}}class D{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||os.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map((e=>e.codePointAt(0)||0)),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new C(e,n):new E(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(u,"\n")}tokenize(){for(;this._cursor.peek()!==n.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(n.$LT))if(this._attemptCharCode(n.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(n.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(n.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(i.EOF),this._endToken([]),new a(function(e){const t=[];let r;for(let n=0;n<e.length;n++){const s=e[n];r&&r.type==i.TEXT&&s.type==i.TEXT?(r.parts[0]+=s.parts[0],r.sourceSpan.end=s.sourceSpan.end):(r=s,t.push(r))}return t}(this.tokens),this.errors)}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(((e=this._cursor.peek())===n.$EQ||n.isAsciiLetter(e)||n.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._cursor.peek()===n.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t=this._cursor.clone()){if(null===this._currentTokenStart)throw new o("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new o("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const r=new s(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const r=new o(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new p(r)}handleError(e){if(e instanceof T&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof p))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=this._cursor.peek(),r=e,g(t)==g(r)&&(this._cursor.advance(),!0);var t,r}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const r=this._cursor.clone();for(let n=0;n<t;n++)if(!this._attemptCharCode(e.charCodeAt(n)))return this._cursor=r,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_requireStrCaseInsensitive(e){const t=this._cursor.clone();if(!this._attemptStrCaseInsensitive(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const r=this._cursor.clone();this._attemptCharCodeUntilFn(e);if(this._cursor.clone().diff(r)<t)throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(r))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&this._cursor.peek()===n.$AMPERSAND)return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(n.$HASH)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(m),this._cursor.peek()!=n.$SEMICOLON)return this._cursor=t,"&";const r=this._cursor.getChars(t);this._cursor.advance();const i=Oi.NAMED_ENTITIES[r];if(!i)throw this._createError(l(r),this._cursor.getSpan(e));return i}{const t=this._attemptCharCode(n.$x)||this._attemptCharCode(n.$X),r=this._cursor.clone();if(this._attemptCharCodeUntilFn(f),this._cursor.peek()!=n.$SEMICOLON)throw this._createError(c(this._cursor.peek()),this._cursor.getSpan());const i=this._cursor.getChars(r);this._cursor.advance();try{const e=parseInt(i,t?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(l(this._cursor.getChars(e)),this._cursor.getSpan())}}}_consumeRawText(e,t){this._beginToken(e?i.ESCAPABLE_RAW_TEXT:i.RAW_TEXT);const r=[];for(;;){const n=this._cursor.clone(),i=t();if(this._cursor=n,i)break;r.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(r.join(""))])}_consumeComment(e){this._beginToken(i.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._attemptStr("--\x3e"))),this._beginToken(i.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeBogusComment(e){this._beginToken(i.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(i.CDATA_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._attemptStr("]]>"))),this._beginToken(i.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(i.DOC_TYPE_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;this._cursor.peek()!==n.$COLON&&!(((r=this._cursor.peek())<n.$a||n.$z<r)&&(r<n.$A||n.$Z<r)&&(r<n.$0||r>n.$9));)this._cursor.advance();var r;let i;this._cursor.peek()===n.$COLON?(t=this._cursor.getChars(e),this._cursor.advance(),i=this._cursor.clone()):i=e,this._requireCharCodeUntilFn(d,""===t?0:1);return[t,this._cursor.getChars(i)]}_consumeTagOpen(e){let t,r,s,o=this.tokens.length;const a=this._cursor.clone(),u=[];try{if(!n.isAsciiLetter(this._cursor.peek()))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),r=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(h);this._cursor.peek()!==n.$SLASH&&this._cursor.peek()!==n.$GT;){const[e,t]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(h),this._attemptCharCode(n.$EQ)){this._attemptCharCodeUntilFn(h);const r=this._consumeAttributeValue();u.push({prefix:e,name:t,value:r})}else u.push({prefix:e,name:t});this._attemptCharCodeUntilFn(h)}this._consumeTagOpenEnd()}catch(t){if(t instanceof p)return this._cursor=a,s&&(this.tokens.length=o),this._beginToken(i.TEXT,e),void this._endToken(["<"]);throw t}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===i.TAG_OPEN_END_VOID)return;const l=this._getTagContentType(t,r,this._fullNameStack.length>0,u);this._handleFullNameStackForTagOpen(r,t),l===Oi.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):l===Oi.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,(()=>!!this._attemptCharCode(n.$LT)&&(!!this._attemptCharCode(n.$SLASH)&&(this._attemptCharCodeUntilFn(h),!!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t)&&(this._attemptCharCodeUntilFn(h),this._attemptCharCode(n.$GT)))))),this._beginToken(i.TAG_CLOSE),this._requireCharCodeUntilFn((e=>e===n.$GT),3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(i.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(e===n.$SQ||e===n.$DQ)throw this._createError(c(e),this._cursor.getSpan());this._beginToken(i.ATTR_NAME);const t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===n.$SQ||this._cursor.peek()===n.$DQ){this._beginToken(i.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(i.ATTR_VALUE);const r=[];for(;this._cursor.peek()!==t;)r.push(this._readChar(!0));e=this._processCarriageReturns(r.join("")),this._endToken([e]),this._beginToken(i.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(i.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(d,1),e=this._processCarriageReturns(this._cursor.getChars(t)),this._endToken([e])}return e}_consumeTagOpenEnd(){const e=this._attemptCharCode(n.$SLASH)?i.TAG_OPEN_END_VOID:i.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(n.$GT),this._endToken([])}_consumeTagClose(e){if(this._beginToken(i.TAG_CLOSE,e),this._attemptCharCodeUntilFn(h),this._allowHtmComponentClosingTags&&this._attemptCharCode(n.$SLASH))this._attemptCharCodeUntilFn(h),this._requireCharCode(n.$GT),this._endToken([]);else{const[e,t]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(h),this._requireCharCode(n.$GT),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}}_consumeExpansionFormStart(){this._beginToken(i.EXPANSION_FORM_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._expansionCaseStack.push(i.EXPANSION_FORM_START),this._beginToken(i.RAW_TEXT);const e=this._readUntil(n.$COMMA);this._endToken([e]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(h),this._beginToken(i.RAW_TEXT);const t=this._readUntil(n.$COMMA);this._endToken([t]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(h)}_consumeExpansionCaseStart(){this._beginToken(i.EXPANSION_CASE_VALUE);const e=this._readUntil(n.$LBRACE).trim();this._endToken([e]),this._attemptCharCodeUntilFn(h),this._beginToken(i.EXPANSION_CASE_EXP_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._attemptCharCodeUntilFn(h),this._expansionCaseStack.push(i.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(i.EXPANSION_CASE_EXP_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._attemptCharCodeUntilFn(h),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(i.EXPANSION_FORM_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(i.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(this._cursor.peek()===n.$LT||this._cursor.peek()===n.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(this._cursor.peek()===n.$RBRACE&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==n.$LBRACE)return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){const r=Oi.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]!==r||this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){const r=Oi.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}}function h(e){return!n.isWhitespace(e)||e===n.$EOF}function d(e){return n.isWhitespace(e)||e===n.$GT||e===n.$SLASH||e===n.$SQ||e===n.$DQ||e===n.$EQ}function f(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiHexDigit(e)}function m(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiLetter(e)}function g(e){return e>=n.$a&&e<=n.$z?e-n.$a+n.$A:e}class E{constructor(e,t){if(e instanceof E)this.file=e.file,this.input=e.input,this.end=e.end,this.state=Object.assign({},e.state);else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new E(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new B.ParseSourceSpan(new B.ParseLocation(e.file,e.state.offset,e.state.line,e.state.column),new B.ParseLocation(this.file,this.state.offset,this.state.line,this.state.column))}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new T('Unexpected character "EOF"',this);const t=this.charAt(e.offset);t===n.$LF?(e.line++,e.column=0):n.isNewLine(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?n.$EOF:this.charAt(e.offset)}}class C extends E{constructor(e,t){e instanceof C?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new C(this)}getChars(e){const t=e.clone();let r="";for(;t.internalState.offset<this.internalState.offset;)r+=String.fromCodePoint(t.peek()),t.advance();return r}processEscapeSequence(){const e=()=>this.internalState.peek;if(e()===n.$BACKSLASH)if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),e()===n.$n)this.state.peek=n.$LF;else if(e()===n.$r)this.state.peek=n.$CR;else if(e()===n.$v)this.state.peek=n.$VTAB;else if(e()===n.$t)this.state.peek=n.$TAB;else if(e()===n.$b)this.state.peek=n.$BSPACE;else if(e()===n.$f)this.state.peek=n.$FF;else if(e()===n.$u)if(this.advanceState(this.internalState),e()===n.$LBRACE){this.advanceState(this.internalState);const t=this.clone();let r=0;for(;e()!==n.$RBRACE;)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(t,r)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(e()===n.$x){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(n.isOctalDigit(e())){let t="",r=0,i=this.clone();for(;n.isOctalDigit(e())&&r<3;)i=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),r++;this.state.peek=parseInt(t,8),this.internalState=i.internalState}else n.isNewLine(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const r=this.input.substr(e.internalState.offset,t),n=parseInt(r,16);if(isNaN(n))throw e.state=e.internalState,new T("Invalid hexadecimal escape sequence",e);return n}}class T{constructor(e,t){this.msg=e,this.cursor=t}}t.CursorError=T}));
|
117
|
+
Object.defineProperty(t,"__esModule",{value:!0});const n=r;var i;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(i=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class o extends B.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=o;class a{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=a,t.tokenize=function(e,t,r,n={}){return new h(new B.ParseSourceFile(e,t),r,n).tokenize()};const u=/\r\n?/g;function c(e){return`Unexpected character "${e===n.$EOF?"EOF":String.fromCharCode(e)}"`}function l(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}class p{constructor(e){this.error=e}}class h{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||uo.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map((e=>e.codePointAt(0)||0)),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new C(e,n):new E(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(u,"\n")}tokenize(){for(;this._cursor.peek()!==n.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(n.$LT))if(this._attemptCharCode(n.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(n.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(n.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(i.EOF),this._endToken([]),new a(function(e){const t=[];let r;for(let n=0;n<e.length;n++){const s=e[n];r&&r.type==i.TEXT&&s.type==i.TEXT?(r.parts[0]+=s.parts[0],r.sourceSpan.end=s.sourceSpan.end):(r=s,t.push(r))}return t}(this.tokens),this.errors)}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(((e=this._cursor.peek())===n.$EQ||n.isAsciiLetter(e)||n.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._cursor.peek()===n.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t=this._cursor.clone()){if(null===this._currentTokenStart)throw new o("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new o("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));const r=new s(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');const r=new o(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new p(r)}handleError(e){if(e instanceof y&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof p))throw e;this.errors.push(e.error)}_attemptCharCode(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}_attemptCharCodeCaseInsensitive(e){return t=this._cursor.peek(),r=e,m(t)==m(r)&&(this._cursor.advance(),!0);var t,r}_requireCharCode(e){const t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){const t=e.length;if(this._cursor.charsLeft()<t)return!1;const r=this._cursor.clone();for(let n=0;n<t;n++)if(!this._attemptCharCode(e.charCodeAt(n)))return this._cursor=r,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){const t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_requireStrCaseInsensitive(e){const t=this._cursor.clone();if(!this._attemptStrCaseInsensitive(e))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){const r=this._cursor.clone();this._attemptCharCodeUntilFn(e);if(this._cursor.clone().diff(r)<t)throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(r))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(e){if(e&&this._cursor.peek()===n.$AMPERSAND)return this._decodeEntity();{const e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}}_decodeEntity(){const e=this._cursor.clone();if(this._cursor.advance(),!this._attemptCharCode(n.$HASH)){const t=this._cursor.clone();if(this._attemptCharCodeUntilFn(g),this._cursor.peek()!=n.$SEMICOLON)return this._cursor=t,"&";const r=this._cursor.getChars(t);this._cursor.advance();const i=Is.NAMED_ENTITIES[r];if(!i)throw this._createError(l(r),this._cursor.getSpan(e));return i}{const t=this._attemptCharCode(n.$x)||this._attemptCharCode(n.$X),r=this._cursor.clone();if(this._attemptCharCodeUntilFn(d),this._cursor.peek()!=n.$SEMICOLON)throw this._createError(c(this._cursor.peek()),this._cursor.getSpan());const i=this._cursor.getChars(r);this._cursor.advance();try{const e=parseInt(i,t?16:10);return String.fromCharCode(e)}catch(t){throw this._createError(l(this._cursor.getChars(e)),this._cursor.getSpan())}}}_consumeRawText(e,t){this._beginToken(e?i.ESCAPABLE_RAW_TEXT:i.RAW_TEXT);const r=[];for(;;){const n=this._cursor.clone(),i=t();if(this._cursor=n,i)break;r.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(r.join(""))])}_consumeComment(e){this._beginToken(i.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._attemptStr("--\x3e"))),this._beginToken(i.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeBogusComment(e){this._beginToken(i.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(i.CDATA_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._attemptStr("]]>"))),this._beginToken(i.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(i.DOC_TYPE_START,e),this._endToken([]),this._consumeRawText(!1,(()=>this._cursor.peek()===n.$GT)),this._beginToken(i.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;this._cursor.peek()!==n.$COLON&&!(((r=this._cursor.peek())<n.$a||n.$z<r)&&(r<n.$A||n.$Z<r)&&(r<n.$0||r>n.$9));)this._cursor.advance();var r;let i;this._cursor.peek()===n.$COLON?(t=this._cursor.getChars(e),this._cursor.advance(),i=this._cursor.clone()):i=e,this._requireCharCodeUntilFn(f,""===t?0:1);return[t,this._cursor.getChars(i)]}_consumeTagOpen(e){let t,r,s,o=this.tokens.length;const a=this._cursor.clone(),u=[];try{if(!n.isAsciiLetter(this._cursor.peek()))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),r=s.parts[0],t=s.parts[1],this._attemptCharCodeUntilFn(D);this._cursor.peek()!==n.$SLASH&&this._cursor.peek()!==n.$GT;){const[e,t]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(D),this._attemptCharCode(n.$EQ)){this._attemptCharCodeUntilFn(D);const r=this._consumeAttributeValue();u.push({prefix:e,name:t,value:r})}else u.push({prefix:e,name:t});this._attemptCharCodeUntilFn(D)}this._consumeTagOpenEnd()}catch(t){if(t instanceof p)return this._cursor=a,s&&(this.tokens.length=o),this._beginToken(i.TEXT,e),void this._endToken(["<"]);throw t}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===i.TAG_OPEN_END_VOID)return;const l=this._getTagContentType(t,r,this._fullNameStack.length>0,u);this._handleFullNameStackForTagOpen(r,t),l===Is.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):l===Is.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,(()=>!!this._attemptCharCode(n.$LT)&&(!!this._attemptCharCode(n.$SLASH)&&(this._attemptCharCodeUntilFn(D),!!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t)&&(this._attemptCharCodeUntilFn(D),this._attemptCharCode(n.$GT)))))),this._beginToken(i.TAG_CLOSE),this._requireCharCodeUntilFn((e=>e===n.$GT),3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(i.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(e===n.$SQ||e===n.$DQ)throw this._createError(c(e),this._cursor.getSpan());this._beginToken(i.ATTR_NAME);const t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===n.$SQ||this._cursor.peek()===n.$DQ){this._beginToken(i.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(i.ATTR_VALUE);const r=[];for(;this._cursor.peek()!==t;)r.push(this._readChar(!0));e=this._processCarriageReturns(r.join("")),this._endToken([e]),this._beginToken(i.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(i.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(f,1),e=this._processCarriageReturns(this._cursor.getChars(t)),this._endToken([e])}return e}_consumeTagOpenEnd(){const e=this._attemptCharCode(n.$SLASH)?i.TAG_OPEN_END_VOID:i.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(n.$GT),this._endToken([])}_consumeTagClose(e){if(this._beginToken(i.TAG_CLOSE,e),this._attemptCharCodeUntilFn(D),this._allowHtmComponentClosingTags&&this._attemptCharCode(n.$SLASH))this._attemptCharCodeUntilFn(D),this._requireCharCode(n.$GT),this._endToken([]);else{const[e,t]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(D),this._requireCharCode(n.$GT),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}}_consumeExpansionFormStart(){this._beginToken(i.EXPANSION_FORM_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._expansionCaseStack.push(i.EXPANSION_FORM_START),this._beginToken(i.RAW_TEXT);const e=this._readUntil(n.$COMMA);this._endToken([e]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(D),this._beginToken(i.RAW_TEXT);const t=this._readUntil(n.$COMMA);this._endToken([t]),this._requireCharCode(n.$COMMA),this._attemptCharCodeUntilFn(D)}_consumeExpansionCaseStart(){this._beginToken(i.EXPANSION_CASE_VALUE);const e=this._readUntil(n.$LBRACE).trim();this._endToken([e]),this._attemptCharCodeUntilFn(D),this._beginToken(i.EXPANSION_CASE_EXP_START),this._requireCharCode(n.$LBRACE),this._endToken([]),this._attemptCharCodeUntilFn(D),this._expansionCaseStack.push(i.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(i.EXPANSION_CASE_EXP_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._attemptCharCodeUntilFn(D),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(i.EXPANSION_FORM_END),this._requireCharCode(n.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(i.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(this._cursor.peek()===n.$LT||this._cursor.peek()===n.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(this._cursor.peek()===n.$RBRACE&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===i.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==n.$LBRACE)return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){const r=Is.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]!==r||this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){const r=Is.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}}function D(e){return!n.isWhitespace(e)||e===n.$EOF}function f(e){return n.isWhitespace(e)||e===n.$GT||e===n.$SLASH||e===n.$SQ||e===n.$DQ||e===n.$EQ}function d(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiHexDigit(e)}function g(e){return e==n.$SEMICOLON||e==n.$EOF||!n.isAsciiLetter(e)}function m(e){return e>=n.$a&&e<=n.$z?e-n.$a+n.$A:e}class E{constructor(e,t){if(e instanceof E)this.file=e.file,this.input=e.input,this.end=e.end,this.state=Object.assign({},e.state);else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new E(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new B.ParseSourceSpan(new B.ParseLocation(e.file,e.state.offset,e.state.line,e.state.column),new B.ParseLocation(this.file,this.state.offset,this.state.line,this.state.column))}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new y('Unexpected character "EOF"',this);const t=this.charAt(e.offset);t===n.$LF?(e.line++,e.column=0):n.isNewLine(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?n.$EOF:this.charAt(e.offset)}}class C extends E{constructor(e,t){e instanceof C?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new C(this)}getChars(e){const t=e.clone();let r="";for(;t.internalState.offset<this.internalState.offset;)r+=String.fromCodePoint(t.peek()),t.advance();return r}processEscapeSequence(){const e=()=>this.internalState.peek;if(e()===n.$BACKSLASH)if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),e()===n.$n)this.state.peek=n.$LF;else if(e()===n.$r)this.state.peek=n.$CR;else if(e()===n.$v)this.state.peek=n.$VTAB;else if(e()===n.$t)this.state.peek=n.$TAB;else if(e()===n.$b)this.state.peek=n.$BSPACE;else if(e()===n.$f)this.state.peek=n.$FF;else if(e()===n.$u)if(this.advanceState(this.internalState),e()===n.$LBRACE){this.advanceState(this.internalState);const t=this.clone();let r=0;for(;e()!==n.$RBRACE;)this.advanceState(this.internalState),r++;this.state.peek=this.decodeHexDigits(t,r)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(e()===n.$x){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(n.isOctalDigit(e())){let t="",r=0,i=this.clone();for(;n.isOctalDigit(e())&&r<3;)i=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),r++;this.state.peek=parseInt(t,8),this.internalState=i.internalState}else n.isNewLine(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const r=this.input.substr(e.internalState.offset,t),n=parseInt(r,16);if(isNaN(n))throw e.state=e.internalState,new y("Invalid hexadecimal escape sequence",e);return n}}class y{constructor(e,t){this.msg=e,this.cursor=t}}t.CursorError=y}));
|
118
118
|
/**
|
119
119
|
* @license
|
120
120
|
* Copyright Google Inc. All Rights Reserved.
|
@@ -122,11 +122,11 @@ Object.defineProperty(t,"__esModule",{value:!0});const n=r;var i;!function(e){e[
|
|
122
122
|
* Use of this source code is governed by an MIT-style license that can be
|
123
123
|
* found in the LICENSE file at https://angular.io/license
|
124
124
|
*/
|
125
|
-
class
|
125
|
+
class lo extends B.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,r){return new lo(e,t,r)}}var po=lo;class ho{constructor(e,t){this.rootNodes=e,this.errors=t}}var Do=ho;var fo=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){const s=e=>(t,...r)=>e(t.toLowerCase(),...r),o=n?this.getTagDefinition:s(this.getTagDefinition),a=e=>o(e).contentType,u=n?i:s(i),c=i?(e,t,r,n)=>{const i=u(e,t,r,n);return void 0!==i?i:a(e)}:a,l=co.tokenize(e,t,c,r),p=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,D=new go(l.tokens,o,p,h,n).build();return new ho(D.rootNodes,l.errors.concat(D.errors))}};class go{constructor(e,t,r,n,i){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=i,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==co.TokenType.EOF;)this._peek.type===co.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===co.TokenType.TAG_CLOSE?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===co.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===co.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===co.TokenType.TEXT||this._peek.type===co.TokenType.RAW_TEXT||this._peek.type===co.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===co.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===co.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new ho(this._rootNodes,this._errors)}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){const t=this._advance(),r=this._getText(t),n=this._advanceIf(co.TokenType.CDATA_END);this._addToParent(new no.CDATA(r,new B.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}_consumeComment(e){const t=this._advanceIf(co.TokenType.RAW_TEXT),r=this._advanceIf(co.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,i=new B.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new no.Comment(n,i))}_consumeDocType(e){const t=this._advanceIf(co.TokenType.RAW_TEXT),r=this._advanceIf(co.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,i=new B.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new no.DocType(n,i))}_consumeExpansion(e){const t=this._advance(),r=this._advance(),n=[];for(;this._peek.type===co.TokenType.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;n.push(e)}if(this._peek.type!==co.TokenType.EXPANSION_FORM_END)return void this._errors.push(lo.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const i=new B.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new no.Expansion(t.parts[0],r.parts[0],n,i,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==co.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(lo.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),r=this._collectExpansionExpTokens(t);if(!r)return null;const n=this._advance();r.push(new co.Token(co.TokenType.EOF,[],n.sourceSpan));const i=new go(r,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive).build();if(i.errors.length>0)return this._errors=this._errors.concat(i.errors),null;const s=new B.ParseSourceSpan(e.sourceSpan.start,n.sourceSpan.end),o=new B.ParseSourceSpan(t.sourceSpan.start,n.sourceSpan.end);return new no.ExpansionCase(e.parts[0],i.rootNodes,s,e.sourceSpan,o)}_collectExpansionExpTokens(e){const t=[],r=[co.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==co.TokenType.EXPANSION_FORM_START&&this._peek.type!==co.TokenType.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===co.TokenType.EXPANSION_CASE_EXP_END){if(!mo(r,co.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===co.TokenType.EXPANSION_FORM_END){if(!mo(r,co.TokenType.EXPANSION_FORM_START))return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===co.TokenType.EOF)return this._errors.push(lo.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_getText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}return t}_consumeText(e){const t=this._getText(e);t.length>0&&this._addToParent(new no.Text(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const t=e.parts[0],r=e.parts[1],n=[];for(;this._peek.type===co.TokenType.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));const i=this._getElementFullName(t,r,this._getParentElement());let s=!1;if(this._peek.type===co.TokenType.TAG_OPEN_END_VOID){this._advance(),s=!0;const t=this.getTagDefinition(i);this.canSelfClose||t.canSelfClose||null!==Is.getNsPrefix(i)||t.isVoid||this._errors.push(lo.create(i,e.sourceSpan,`Only void and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===co.TokenType.TAG_OPEN_END&&(this._advance(),s=!1);const o=this._peek.sourceSpan.start,a=new B.ParseSourceSpan(e.sourceSpan.start,o),u=new B.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),c=new no.Element(i,n,[],a,a,void 0,u);this._pushElement(c),s&&(this._popElement(i),c.endSourceSpan=a)}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(lo.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popElement(t)){const r=`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this._errors.push(lo.create(t,e.sourceSpan,r))}}_popElement(e){for(let t=this._elementStack.length-1;t>=0;t--){const r=this._elementStack[t];if(!e||(Is.getNsPrefix(r.name)?r.name==e:r.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=Is.mergeNsAndName(e.parts[0],e.parts[1]);let r,n,i=e.sourceSpan.end,s="";if(this._peek.type===co.TokenType.ATTR_QUOTE){n=this._advance().sourceSpan.start}if(this._peek.type===co.TokenType.ATTR_VALUE){const e=this._advance();s=e.parts[0],i=e.sourceSpan.end,r=e.sourceSpan}if(this._peek.type===co.TokenType.ATTR_QUOTE){i=this._advance().sourceSpan.end,r=new B.ParseSourceSpan(n,i)}return new no.Attribute(t,s,new B.ParseSourceSpan(e.sourceSpan.start,i),r,e.sourceSpan)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_getParentElementSkippingContainers(){let e=null;for(let t=this._elementStack.length-1;t>=0;t--){if(!Is.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}_insertBeforeContainer(e,t,r){if(t){if(e){const n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)}_getElementFullName(e,t,r){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=r&&(e=Is.getNsPrefix(r.name)),Is.mergeNsAndName(e,t)}}function mo(e,t){return e.length>0&&e[e.length-1]===t}var Eo=Object.defineProperty({TreeError:po,ParseTreeResult:Do,Parser:fo},"__esModule",{value:!0}),Co=Eo,yo=Co.ParseTreeResult,bo=Co.TreeError;
|
126
126
|
/**
|
127
127
|
* @license
|
128
128
|
* Copyright Google Inc. All Rights Reserved.
|
129
129
|
*
|
130
130
|
* Use of this source code is governed by an MIT-style license that can be
|
131
131
|
* found in the LICENSE file at https://angular.io/license
|
132
|
-
*/class
|
132
|
+
*/class To extends Eo.Parser{constructor(){super(qs.getHtmlTagDefinition)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}}var So=To,_o=Object.defineProperty({ParseTreeResult:yo,TreeError:bo,HtmlParser:So},"__esModule",{value:!0}),vo=Is.TagContentType;let Ao=null;var Fo=function(e,t={}){const{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s}=t;return(Ao||(Ao=new _o.HtmlParser),Ao).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n},i,s)},wo=Object.defineProperty({TagContentType:vo,parse:Fo},"__esModule",{value:!0});const{ParseSourceSpan:ko,ParseLocation:No,ParseSourceFile:Oo}=B,{inferParserByLanguage:xo}=Hn,{HTML_ELEMENT_ATTRIBUTES:Io,HTML_TAGS:Po,isUnknownNamespace:Ro}=bs,{hasPragma:Lo}=Ts,{Node:Bo}=ws,{parseIeConditionalComment:$o}=Os,{locStart:qo,locEnd:Mo}=xs;function jo(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o},a){const u=wo,{RecursiveVisitor:c,visitAll:l}=no,{ParseSourceSpan:p}=B,{getHtmlTagDefinition:h}=qs;let{rootNodes:D,errors:f}=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o});if("vue"===a.parser){if(D.some((e=>"docType"===e.type&&"html"===e.value||"element"===e.type&&"html"===e.name.toLowerCase()))){t=!0,r=!0,n=!0,i=!0,s=!1;const o=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s});D=o.rootNodes,f=o.errors}else{const r=e=>{if(!e)return!1;if("element"!==e.type||"template"!==e.name)return!1;const t=e.attrs.find((e=>"lang"===e.name)),r=t&&t.value;return!r||"html"===xo(r,a)};if(D.some(r)){let n;const o=()=>u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s}),a=()=>n||(n=o()),c=e=>a().rootNodes.find((({startSourceSpan:t})=>t&&t.start.offset===e.startSourceSpan.start.offset));for(let e=0;e<D.length;e++){const t=D[e],{endSourceSpan:n,startSourceSpan:i}=t;if(null===n){f=a().errors,D[e]=c(t)||t}else if(r(t)){const r=a(),s=i.end.offset,o=n.start.offset;for(const e of r.errors){const{offset:t}=e.span.start;if(s<t&&t<o){f=[e];break}}D[e]=c(t)||t}}}}}if(f.length>0){const{msg:e,span:{start:t,end:r}}=f[0];throw j(e,{start:{line:t.line+1,column:t.col+1},end:{line:r.line+1,column:r.col+1}})}const d=e=>{const t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=null!==t&&r.startsWith(`${t}:`),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},g=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return l(new class extends c{visit(e){(e=>{if("element"===e.type){d(e);for(const t of e.attrs)d(t),t.valueSpan?(t.value=t.valueSpan.toString(),/["']/.test(t.value[0])&&(t.value=t.value.slice(1,-1))):t.value=null}else"comment"===e.type?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):"text"===e.type&&(e.value=e.sourceSpan.toString())})(e),(e=>{if("element"===e.type){const t=h(s?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||Ro(e)?e.tagDefinition=t:e.tagDefinition=h("")}})(e),(e=>{if("element"===e.type&&(!r||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix&&!Ro(e)||(e.name=g(e.name,(e=>e in Po))),n)){const t=Io[e.name]||Object.create(null);for(const r of e.attrs)r.namespace||(r.name=g(r.name,(r=>e.name in Io&&(r in Io["*"]||r in t))))}})(e),(e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new p(e.sourceSpan.start,e.endSourceSpan.end))})(e)}},D),D}function Uo(e,t,r,n=!0){const{frontMatter:i,content:s}=n?q(e):{frontMatter:null,content:e},o=new Oo(e,t.filepath),a=new No(o,0,0,0),u=a.moveBy(e.length),c={type:"root",sourceSpan:new ko(a,u),children:jo(s,r,t)};if(i){const e=new No(o,0,0,0),t=e.moveBy(i.raw.length);i.sourceSpan=new ko(e,t),c.children.unshift(i)}const l=new Bo(c),p=(n,i)=>{const{offset:s}=i,o=Uo(e.slice(0,s).replace(/[^\n\r]/g," ")+n,t,r,!1);o.sourceSpan=new ko(i,M(o.children).sourceSpan.end);const a=o.children[0];return a.length===s?o.children.shift():(a.sourceSpan=new ko(a.sourceSpan.start.moveBy(s),a.sourceSpan.end),a.value=a.value.slice(s)),o};return l.map((e=>{if("comment"===e.type){const t=$o(e,p);if(t)return t}return e}))}function Vo({recognizeSelfClosing:e=!1,normalizeTagName:t=!1,normalizeAttributeName:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s}={}){return{parse:(o,a,u)=>Uo(o,u,{recognizeSelfClosing:e,normalizeTagName:t,normalizeAttributeName:r,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:i,getTagContentType:s}),hasPragma:Lo,astFormat:"html",locStart:qo,locEnd:Mo}}return{parsers:{html:Vo({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Vo(),vue:Vo({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0,getTagContentType:(e,t,r,n)=>{if("html"!==e.toLowerCase()&&!r&&("template"!==e||n.some((({name:e,value:t})=>"lang"===e&&"html"!==t))))return wo.TagContentType.RAW_TEXT}}),lwc:Vo()}}}));
|