introduce prettierrc formatting
This commit is contained in:
100 files changed
+85607
-11585
No files matched your search
+6
@@ -0,0 +1,6 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
acorn: Parser;
|
||||
espree: Parser;
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var Ii=Object.create;var me=Object.defineProperty;var Ni=Object.getOwnPropertyDescriptor;var Li=Object.getOwnPropertyNames;var Ri=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty;var ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oi=(e,t)=>{for(var i in t)me(e,i,{get:t[i],enumerable:!0})},ut=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Li(t))!Vi.call(e,r)&&r!==i&&me(e,r,{get:()=>t[r],enumerable:!(s=Ni(t,r))||s.enumerable});return e};var ht=(e,t,i)=>(i=e!=null?Ii(Ri(e)):{},ut(t||!e||!e.__esModule?me(i,"default",{value:e,enumerable:!0}):i,e)),Bi=e=>ut(me({},"__esModule",{value:!0}),e);var Yt=ot((yr,Qt)=>{Qt.exports={}});var $e=ot((gr,Ye)=>{"use strict";var _s=Yt(),Cs=/^[\da-fA-F]+$/,Ts=/^\d+$/,$t=new WeakMap;function Zt(e){e=e.Parser.acorn||e;let t=$t.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,o=new s("<tag",!1),u=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),h={tc_oTag:o,tc_cTag:u,tc_expr:p},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(o),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(m){let S=this.context.pop();S===o&&m===i.slash||S===u?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},$t.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}Ye.exports=function(e){return e=e||{},function(t){return Es({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Ye.exports,"tokTypes",{get:function(){return Zt(void 0).tokTypes},configurable:!0,enumerable:!0});function Es(e,t){let i=t.acorn||void 0,s=Zt(i),r=i.tokTypes,o=s.tokTypes,u=i.tokContexts,p=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,m=i.isNewLine,S=i.isIdentifierStart,E=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let c="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:return this.pos===this.start?y===60&&this.exprAllowed?(++this.pos,this.finishToken(o.jsxTagStart)):this.getTokenFromCode(y):(c+=this.input.slice(x,this.pos),this.finishToken(o.jsxText,c));case 38:c+=this.input.slice(x,this.pos),c+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(y===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(y)?(c+=this.input.slice(x,this.pos),c+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(c){let x=this.input.charCodeAt(this.pos),y;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,y=c?`
|
||||
`:`\r
|
||||
`):y=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),y}jsx_readString(c){let x="",y=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let v=this.input.charCodeAt(this.pos);if(v===c)break;v===38?(x+=this.input.slice(y,this.pos),x+=this.jsx_readEntity(),y=this.pos):m(v)?(x+=this.input.slice(y,this.pos),x+=this.jsx_readNewLine(!1),y=this.pos):++this.pos}return x+=this.input.slice(y,this.pos++),this.finishToken(r.string,x)}jsx_readEntity(){let c="",x=0,y,v=this.input[this.pos];v!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let I=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(v=this.input[this.pos++],v===";"){c[0]==="#"?c[1]==="x"?(c=c.substr(2),Cs.test(c)&&(y=String.fromCharCode(parseInt(c,16)))):(c=c.substr(1),Ts.test(c)&&(y=String.fromCharCode(parseInt(c,10)))):y=_s[c];break}c+=v}return y||(this.pos=I,"&")}jsx_readWord(){let c,x=this.pos;do c=this.input.charCodeAt(++this.pos);while(E(c)||c===45);return this.finishToken(o.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let c=this.startNode();return this.type===o.jsxName?c.name=this.value:this.type.keyword?c.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(c,"JSXIdentifier")}jsx_parseNamespacedName(){let c=this.start,x=this.startLoc,y=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return y;var v=this.startNodeAt(c,x);return v.namespace=y,v.name=this.jsx_parseIdentifier(),this.finishNode(v,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let c=this.start,x=this.startLoc,y=this.jsx_parseNamespacedName();for(this.type===r.dot&&y.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let v=this.startNodeAt(c,x);v.object=y,v.property=this.jsx_parseIdentifier(),y=this.finishNode(v,"JSXMemberExpression")}return y}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let c=this.jsx_parseExpressionContainer();return c.expression.type==="JSXEmptyExpression"&&this.raise(c.start,"JSX attributes must only be assigned a non-empty expression"),c;case o.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let c=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(c,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let c=this.startNode();return this.next(),c.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(c,"JSXExpressionContainer")}jsx_parseAttribute(){let c=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),c.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(c,"JSXSpreadAttribute")):(c.name=this.jsx_parseNamespacedName(),c.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(c,"JSXAttribute"))}jsx_parseOpeningElementAt(c,x){let y=this.startNodeAt(c,x);y.attributes=[];let v=this.jsx_parseElementName();for(v&&(y.name=v);this.type!==r.slash&&this.type!==o.jsxTagEnd;)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(r.slash),this.expect(o.jsxTagEnd),this.finishNode(y,v?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(c,x){let y=this.startNodeAt(c,x),v=this.jsx_parseElementName();return v&&(y.name=v),this.expect(o.jsxTagEnd),this.finishNode(y,v?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(c,x){let y=this.startNodeAt(c,x),v=[],I=this.jsx_parseOpeningElementAt(c,x),de=null;if(!I.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(c=this.start,x=this.startLoc,this.next(),this.eat(r.slash)){de=this.jsx_parseClosingElementAt(c,x);break e}v.push(this.jsx_parseElementAt(c,x));break;case o.jsxText:v.push(this.parseExprAtom());break;case r.braceL:v.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(de.name)!==pe(I.name)&&this.raise(de.start,"Expected corresponding JSX closing tag for <"+pe(I.name)+">")}let Be=I.name?"Element":"Fragment";return y["opening"+Be]=I,y["closing"+Be]=de,y.children=v,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(y,"JSX"+Be)}jsx_parseText(){let c=this.parseLiteral(this.value);return c.type="JSXText",c}jsx_parseElement(){let c=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(c,x)}parseExprAtom(c){return this.type===o.jsxText?this.jsx_parseText():this.type===o.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(c)}readToken(c){let x=this.curContext();if(x===l)return this.jsx_readToken();if(x===p||x===h){if(S(c))return this.jsx_readWord();if(c==62)return++this.pos,this.finishToken(o.jsxTagEnd);if((c===34||c===39)&&x==p)return this.jsx_readString(c)}return c===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),pt(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return pt(t.onComment)&&(t.onComment=Wi(t,t.onComment)),t}function Wi(e,t){return function(i,s,r,o,u,p){var h={type:i?"Block":"Line",value:s,start:r,end:o};e.locations&&(h.loc=new Se(this,u,p)),e.ranges&&(h.range=[r,o]),t.push(h)}}var oe=1,Z=2,Ke=4,St=8,He=16,_t=32,_e=64,Ct=128,z=256,ue=512,Ce=oe|Z|z;function Xe(e,t){return Z|(e?Ke:0)|(t?St:0)}var ye=0,We=1,K=2,Tt=3,Et=4,At=5,A=function(t,i,s){this.options=t=Xi(t),this.sourceFile=t.sourceFile,this.keywords=H(Fi[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=De[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var o=(r?r+" ":"")+De.strict;this.reservedWordsStrict=H(o),this.reservedWordsStrictBind=H(o+" "+De.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||||
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(L).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(oe),this.regexpState=null,this.privateNameStack=[]},U={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};A.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};U.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};U.inGenerator.get=function(){return(this.currentVarScope().flags&St)>0};U.inAsync.get=function(){return(this.currentVarScope().flags&Ke)>0};U.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(z|ue))return!1;if(i&Z)return(i&Ke)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};U.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&_e)>0||this.options.allowSuperOutsideMethod};U.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ct)>0};U.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};U.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(z|ue)||i&Z&&!(i&He))return!0}return!1};U.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&z)>0};A.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};A.parse=function(t,i){return new this(i,t).parse()};A.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};A.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(A.prototype,U);var w=A.prototype,zi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;w.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){k.lastIndex=e,e+=k.exec(this.input)[0].length;var t=zi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){k.lastIndex=e+t[0].length;var i=k.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||L.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,k.lastIndex=e,e+=k.exec(this.input)[0].length,this.input[e]===";"&&e++}};w.eat=function(e){return this.type===e?(this.next(),!0):!1};w.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};w.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};w.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};w.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||L.test(this.input.slice(this.lastTokEnd,this.start))};w.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};w.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};w.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};w.expect=function(e){this.eat(e)||this.unexpected()};w.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Te=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};w.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};w.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};w.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!L.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,r,t),i.properties.push(o)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),s,r,o,u;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(o=this.start,u=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,o,u,t,p),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,s,r,o,u,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,u),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,o,this.copyNode(e.key)):this.type===a.eq&&u?(u.shorthandAssign<0&&(u.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,o,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Xe(t,s.generator)|_e|(i?Ct:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(s,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.enterScope(Xe(i,!1)|He),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return q(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(X(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var o=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var u=this.readCodePoint();(t?j:X)(u,s)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=q(u),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Je[e]),this.finishToken(t,e)};var bs="8.15.0";A.acorn={Parser:A,version:bs,defaultOptions:Ue,Position:ne,SourceLocation:Se,getLineInfo:bt,Node:Ee,TokenType:C,tokTypes:a,keywordTypes:Je,TokContext:F,tokContexts:T,isIdentifierChar:X,isIdentifierStart:j,Token:Qe,isNewLine:Y,lineBreak:L,lineBreakG:qi,nonASCIIwhitespace:gt};var _i=ht($e(),1);function As(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var ke=As;function we(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var te=(e,t)=>(i,s,...r)=>i|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,r);var ks=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let i=this[t];if(e(i,t,this))return i}},ws=te("findLast",function(){if(Array.isArray(this))return ks}),ei=ws;function Ps(e){return this[e<0?this.length+e:e]}var Is=te("at",function(){if(Array.isArray(this)||typeof this=="string")return Ps}),ie=Is;function M(e){let t=e.range?.[0]??e.start,i=(e.declaration?.decorators??e.decorators)?.[0];return i?Math.min(M(i),t):t}function R(e){return e.range?.[1]??e.end}function Ns(e){let t=new Set(e);return i=>t.has(i?.type)}var se=Ns;var Ls=se(["Block","CommentBlock","MultiLine"]),re=Ls;var Rs=se(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ti=Rs;var Ze=new WeakMap;function Vs(e){return Ze.has(e)||Ze.set(e,re(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Ze.get(e)}var ii=Vs;function Os(e){if(!re(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var et=new WeakMap;function Bs(e){return et.has(e)||et.set(e,Os(e)),et.get(e)}var tt=Bs;function Ds(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&R(s)===M(t)&&tt(s)&&tt(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[M(s),R(t)]),!ti(s)&&!re(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var si=Ds;function Ms(e){return e!==null&&typeof e=="object"}var ri=Ms;var ce=null;function le(e){if(ce!==null&&typeof ce.property){let t=ce;return ce=le.prototype=null,t}return ce=le.prototype=e??Object.create(null),new le}var Fs=10;for(let e=0;e<=Fs;e++)le();function it(e){return le(e)}function js(e,t="type"){it(e);function i(s){let r=s[t],o=e[r];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return o}return i}var ai=js;var n=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],ni={AccessorProperty:n[0],AnyTypeAnnotation:n[1],ArgumentPlaceholder:n[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:n[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:n[3],AsExpression:n[4],AssignmentExpression:n[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:n[6],BigIntLiteral:n[1],BigIntLiteralTypeAnnotation:n[1],BigIntTypeAnnotation:n[1],BinaryExpression:n[5],BindExpression:["object","callee"],BlockStatement:n[7],BooleanLiteral:n[1],BooleanLiteralTypeAnnotation:n[1],BooleanTypeAnnotation:n[1],BreakStatement:n[8],CallExpression:n[9],CatchClause:["param","body"],ChainExpression:n[3],ClassAccessorProperty:n[0],ClassBody:n[10],ClassDeclaration:n[11],ClassExpression:n[11],ClassImplements:n[12],ClassMethod:n[13],ClassPrivateMethod:n[13],ClassPrivateProperty:n[14],ClassProperty:n[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:n[15],ConditionalExpression:n[16],ConditionalTypeAnnotation:n[17],ContinueStatement:n[8],DebuggerStatement:n[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:n[18],DeclareEnum:n[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:n[20],DeclareFunction:["id","predicate"],DeclareHook:n[21],DeclareInterface:n[22],DeclareModule:n[19],DeclareModuleExports:n[23],DeclareNamespace:n[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:n[24],DeclareVariable:n[21],Decorator:n[3],Directive:n[18],DirectiveLiteral:n[1],DoExpression:n[10],DoWhileStatement:n[25],EmptyStatement:n[1],EmptyTypeAnnotation:n[1],EnumBigIntBody:n[26],EnumBigIntMember:n[27],EnumBooleanBody:n[26],EnumBooleanMember:n[27],EnumDeclaration:n[19],EnumDefaultedMember:n[21],EnumNumberBody:n[26],EnumNumberMember:n[27],EnumStringBody:n[26],EnumStringMember:n[27],EnumSymbolBody:n[26],ExistsTypeAnnotation:n[1],ExperimentalRestProperty:n[6],ExperimentalSpreadProperty:n[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:n[28],ExportNamedDeclaration:n[20],ExportNamespaceSpecifier:n[28],ExportSpecifier:["local","exported"],ExpressionStatement:n[3],File:["program"],ForInStatement:n[29],ForOfStatement:n[29],ForStatement:["init","test","update","body"],FunctionDeclaration:n[30],FunctionExpression:n[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(pi,"").trimEnd();let s=Object.create(null),r=fe(0,e,ci,"").replace(pi,"").trimEnd(),o;for(;o=ci.exec(e);){let u=fe(0,o[2],Ws,"");if(typeof s[o[1]]=="string"||Array.isArray(s[o[1]])){let p=s[o[1]];s[o[1]]=[...Ys,...Array.isArray(p)?p:[p],u]}else s[o[1]]=u}return{comments:r,pragmas:s}}var di=["noformat","noprettier"],mi=["format","prettier"];function $s(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var xi=$s;function yi(e){let t=xi(e);t&&(e=e.slice(t.length+1));let i=li(e),{pragmas:s,comments:r}=fi(i);return{shebang:t,text:e,pragmas:s,comments:r}}function gi(e){let{pragmas:t}=yi(e);return mi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function vi(e){let{pragmas:t}=yi(e);return di.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Zs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:gi,hasIgnorePragma:vi,locStart:M,locEnd:R,...e}}var Ne=Zs;var Le="module",bi="script",Re="commonjs",Ve=[Le,Re];function Oe(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return Le;if(/\.(?:cjs|cts)$/iu.test(e))return Re}}var er={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function tr(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return ke(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var Si,ir=()=>(Si??(Si=A.extend((0,_i.default)())),Si);function sr(e,t){let i=ir(),s=[],r=i.parse(e,{...er,sourceType:t===Re?bi:t,allowImportExportEverywhere:t===Le,onComment:s});return r.comments=s,r}function rr(e,t){let i=Oe(t?.filepath),s=(i?[i]:Ve).map(o=>()=>sr(e,o)),r;try{r=we(s)}catch({errors:[o]}){throw tr(o)}return Ie(r,{text:e})}var Ci=Ne(rr);var ki=ht($e(),1);var P={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ar(e,t){let i=e[0],s=ie(0,e,-1),r={type:P.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function rt(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}rt.prototype={constructor:rt,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=P.Identifier,e.value==="static"&&(e.type=P.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=P.Keyword);else if(i===s.privateId)e.type=P.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=P.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=P.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=P.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=P.Boolean:i.keyword==="null"?e.type=P.Null:e.type=P.Keyword;else if(i===s.num)e.type=P.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=P.JSXText):e.type=P.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=P.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,o=()=>{s.push(ar(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&o();return}if(e.type===i.dollarBraceL){r.push(e),o();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var Ti=rt;var Ei=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function nr(){return ie(0,Ei,-1)}function or(e=5){let t=e==="latest"?nr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ei.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ur(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ai(e){let t=or(e.ecmaVersion),i=ur(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let o=t===3?e.allowReserved||"never":!1,u=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!u.globalReturn;if(i==="module"&&t<6)throw new Error("sourc
Line truncated
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[at](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var pr={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=A.extend(nt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=A.extend((0,ki.default)(),nt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function wi(e,t){let i=pr.get(t);return new i(t,e).parse()}var cr={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,impliedStrict:!1}};function lr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:ke(t,{loc:{start:{line:i,column:s}},cause:e})}function fr(e,t){let i=Oe(t?.filepath),s=(i?[i]:Ve).map(o=>()=>wi(e,{...cr,sourceType:o})),r;try{r=we(s)}catch({errors:[o]}){throw lr(o)}return Ie(r,{parser:"espree",text:e})}var Pi=Ne(fr);var dr={acorn:Ci,espree:Pi};return Bi(mr);});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
var Ii=Object.create;var Be=Object.defineProperty;var Ni=Object.getOwnPropertyDescriptor;var Li=Object.getOwnPropertyNames;var Ri=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty;var ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oi=(e,t)=>{for(var i in t)Be(e,i,{get:t[i],enumerable:!0})},Bi=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Li(t))!Vi.call(e,r)&&r!==i&&Be(e,r,{get:()=>t[r],enumerable:!(s=Ni(t,r))||s.enumerable});return e};var ut=(e,t,i)=>(i=e!=null?Ii(Ri(e)):{},Bi(t||!e||!e.__esModule?Be(i,"default",{value:e,enumerable:!0}):i,e));var Qt=ot((xr,zt)=>{zt.exports={}});var $e=ot((yr,Ye)=>{"use strict";var _s=Qt(),Cs=/^[\da-fA-F]+$/,Ts=/^\d+$/,Yt=new WeakMap;function $t(e){e=e.Parser.acorn||e;let t=Yt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,o=new s("<tag",!1),u=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),h={tc_oTag:o,tc_cTag:u,tc_expr:p},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(o),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(m){let S=this.context.pop();S===o&&m===i.slash||S===u?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},Yt.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}Ye.exports=function(e){return e=e||{},function(t){return Es({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Ye.exports,"tokTypes",{get:function(){return $t(void 0).tokTypes},configurable:!0,enumerable:!0});function Es(e,t){let i=t.acorn||void 0,s=$t(i),r=i.tokTypes,o=s.tokTypes,u=i.tokContexts,p=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,m=i.isNewLine,S=i.isIdentifierStart,E=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let c="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:return this.pos===this.start?y===60&&this.exprAllowed?(++this.pos,this.finishToken(o.jsxTagStart)):this.getTokenFromCode(y):(c+=this.input.slice(x,this.pos),this.finishToken(o.jsxText,c));case 38:c+=this.input.slice(x,this.pos),c+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(y===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(y)?(c+=this.input.slice(x,this.pos),c+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(c){let x=this.input.charCodeAt(this.pos),y;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,y=c?`
|
||||
`:`\r
|
||||
`):y=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),y}jsx_readString(c){let x="",y=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let v=this.input.charCodeAt(this.pos);if(v===c)break;v===38?(x+=this.input.slice(y,this.pos),x+=this.jsx_readEntity(),y=this.pos):m(v)?(x+=this.input.slice(y,this.pos),x+=this.jsx_readNewLine(!1),y=this.pos):++this.pos}return x+=this.input.slice(y,this.pos++),this.finishToken(r.string,x)}jsx_readEntity(){let c="",x=0,y,v=this.input[this.pos];v!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let I=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(v=this.input[this.pos++],v===";"){c[0]==="#"?c[1]==="x"?(c=c.substr(2),Cs.test(c)&&(y=String.fromCharCode(parseInt(c,16)))):(c=c.substr(1),Ts.test(c)&&(y=String.fromCharCode(parseInt(c,10)))):y=_s[c];break}c+=v}return y||(this.pos=I,"&")}jsx_readWord(){let c,x=this.pos;do c=this.input.charCodeAt(++this.pos);while(E(c)||c===45);return this.finishToken(o.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let c=this.startNode();return this.type===o.jsxName?c.name=this.value:this.type.keyword?c.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(c,"JSXIdentifier")}jsx_parseNamespacedName(){let c=this.start,x=this.startLoc,y=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return y;var v=this.startNodeAt(c,x);return v.namespace=y,v.name=this.jsx_parseIdentifier(),this.finishNode(v,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let c=this.start,x=this.startLoc,y=this.jsx_parseNamespacedName();for(this.type===r.dot&&y.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let v=this.startNodeAt(c,x);v.object=y,v.property=this.jsx_parseIdentifier(),y=this.finishNode(v,"JSXMemberExpression")}return y}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let c=this.jsx_parseExpressionContainer();return c.expression.type==="JSXEmptyExpression"&&this.raise(c.start,"JSX attributes must only be assigned a non-empty expression"),c;case o.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let c=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(c,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let c=this.startNode();return this.next(),c.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(c,"JSXExpressionContainer")}jsx_parseAttribute(){let c=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),c.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(c,"JSXSpreadAttribute")):(c.name=this.jsx_parseNamespacedName(),c.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(c,"JSXAttribute"))}jsx_parseOpeningElementAt(c,x){let y=this.startNodeAt(c,x);y.attributes=[];let v=this.jsx_parseElementName();for(v&&(y.name=v);this.type!==r.slash&&this.type!==o.jsxTagEnd;)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(r.slash),this.expect(o.jsxTagEnd),this.finishNode(y,v?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(c,x){let y=this.startNodeAt(c,x),v=this.jsx_parseElementName();return v&&(y.name=v),this.expect(o.jsxTagEnd),this.finishNode(y,v?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(c,x){let y=this.startNodeAt(c,x),v=[],I=this.jsx_parseOpeningElementAt(c,x),de=null;if(!I.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(c=this.start,x=this.startLoc,this.next(),this.eat(r.slash)){de=this.jsx_parseClosingElementAt(c,x);break e}v.push(this.jsx_parseElementAt(c,x));break;case o.jsxText:v.push(this.parseExprAtom());break;case r.braceL:v.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(de.name)!==pe(I.name)&&this.raise(de.start,"Expected corresponding JSX closing tag for <"+pe(I.name)+">")}let Oe=I.name?"Element":"Fragment";return y["opening"+Oe]=I,y["closing"+Oe]=de,y.children=v,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(y,"JSX"+Oe)}jsx_parseText(){let c=this.parseLiteral(this.value);return c.type="JSXText",c}jsx_parseElement(){let c=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(c,x)}parseExprAtom(c){return this.type===o.jsxText?this.jsx_parseText():this.type===o.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(c)}readToken(c){let x=this.curContext();if(x===l)return this.jsx_readToken();if(x===p||x===h){if(S(c))return this.jsx_readWord();if(c==62)return++this.pos,this.finishToken(o.jsxTagEnd);if((c===34||c===39)&&x==p)return this.jsx_readString(c)}return c===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ht(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return ht(t.onComment)&&(t.onComment=Wi(t,t.onComment)),t}function Wi(e,t){return function(i,s,r,o,u,p){var h={type:i?"Block":"Line",value:s,start:r,end:o};e.locations&&(h.loc=new be(this,u,p)),e.ranges&&(h.range=[r,o]),t.push(h)}}var oe=1,Z=2,Ke=4,bt=8,He=16,St=32,Se=64,_t=128,z=256,ue=512,_e=oe|Z|z;function Xe(e,t){return Z|(e?Ke:0)|(t?bt:0)}var xe=0,We=1,K=2,Ct=3,Tt=4,Et=5,A=function(t,i,s){this.options=t=Xi(t),this.sourceFile=t.sourceFile,this.keywords=H(Fi[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=De[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var o=(r?r+" ":"")+De.strict;this.reservedWordsStrict=H(o),this.reservedWordsStrictBind=H(o+" "+De.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||||
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(L).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(oe),this.regexpState=null,this.privateNameStack=[]},U={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};A.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};U.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};U.inGenerator.get=function(){return(this.currentVarScope().flags&bt)>0};U.inAsync.get=function(){return(this.currentVarScope().flags&Ke)>0};U.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(z|ue))return!1;if(i&Z)return(i&Ke)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};U.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Se)>0||this.options.allowSuperOutsideMethod};U.allowDirectSuper.get=function(){return(this.currentThisScope().flags&_t)>0};U.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};U.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(z|ue)||i&Z&&!(i&He))return!0}return!1};U.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&z)>0};A.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};A.parse=function(t,i){return new this(i,t).parse()};A.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};A.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(A.prototype,U);var w=A.prototype,zi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;w.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){k.lastIndex=e,e+=k.exec(this.input)[0].length;var t=zi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){k.lastIndex=e+t[0].length;var i=k.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||L.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,k.lastIndex=e,e+=k.exec(this.input)[0].length,this.input[e]===";"&&e++}};w.eat=function(e){return this.type===e?(this.next(),!0):!1};w.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};w.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};w.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};w.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||L.test(this.input.slice(this.lastTokEnd,this.start))};w.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};w.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};w.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};w.expect=function(e){this.eat(e)||this.unexpected()};w.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Ce=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};w.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};w.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};w.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!L.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,r,t),i.properties.push(o)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),s,r,o,u;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(o=this.start,u=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,o,u,t,p),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,s,r,o,u,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,u),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,o,this.copyNode(e.key)):this.type===a.eq&&u?(u.shorthandAssign<0&&(u.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,o,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Xe(t,s.generator)|Se|(i?_t:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(s,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.enterScope(Xe(i,!1)|He),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return q(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(X(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var o=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var u=this.readCodePoint();(t?j:X)(u,s)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=q(u),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Je[e]),this.finishToken(t,e)};var bs="8.15.0";A.acorn={Parser:A,version:bs,defaultOptions:Ue,Position:ne,SourceLocation:be,getLineInfo:vt,Node:Te,TokenType:C,tokTypes:a,keywordTypes:Je,TokContext:F,tokContexts:T,isIdentifierChar:X,isIdentifierStart:j,Token:Qe,isNewLine:Y,lineBreak:L,lineBreakG:qi,nonASCIIwhitespace:yt};var Si=ut($e(),1);function As(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ae=As;function ke(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var te=(e,t)=>(i,s,...r)=>i|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,r);var ks=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let i=this[t];if(e(i,t,this))return i}},ws=te("findLast",function(){if(Array.isArray(this))return ks}),Zt=ws;function Ps(e){return this[e<0?this.length+e:e]}var Is=te("at",function(){if(Array.isArray(this)||typeof this=="string")return Ps}),ie=Is;function M(e){let t=e.range?.[0]??e.start,i=(e.declaration?.decorators??e.decorators)?.[0];return i?Math.min(M(i),t):t}function R(e){return e.range?.[1]??e.end}function Ns(e){let t=new Set(e);return i=>t.has(i?.type)}var se=Ns;var Ls=se(["Block","CommentBlock","MultiLine"]),re=Ls;var Rs=se(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ei=Rs;var Ze=new WeakMap;function Vs(e){return Ze.has(e)||Ze.set(e,re(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Ze.get(e)}var ti=Vs;function Os(e){if(!re(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var et=new WeakMap;function Bs(e){return et.has(e)||et.set(e,Os(e)),et.get(e)}var tt=Bs;function Ds(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&R(s)===M(t)&&tt(s)&&tt(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[M(s),R(t)]),!ei(s)&&!re(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var ii=Ds;function Ms(e){return e!==null&&typeof e=="object"}var si=Ms;var ce=null;function le(e){if(ce!==null&&typeof ce.property){let t=ce;return ce=le.prototype=null,t}return ce=le.prototype=e??Object.create(null),new le}var Fs=10;for(let e=0;e<=Fs;e++)le();function it(e){return le(e)}function js(e,t="type"){it(e);function i(s){let r=s[t],o=e[r];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return o}return i}var ri=js;var n=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],ai={AccessorProperty:n[0],AnyTypeAnnotation:n[1],ArgumentPlaceholder:n[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:n[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:n[3],AsExpression:n[4],AssignmentExpression:n[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:n[6],BigIntLiteral:n[1],BigIntLiteralTypeAnnotation:n[1],BigIntTypeAnnotation:n[1],BinaryExpression:n[5],BindExpression:["object","callee"],BlockStatement:n[7],BooleanLiteral:n[1],BooleanLiteralTypeAnnotation:n[1],BooleanTypeAnnotation:n[1],BreakStatement:n[8],CallExpression:n[9],CatchClause:["param","body"],ChainExpression:n[3],ClassAccessorProperty:n[0],ClassBody:n[10],ClassDeclaration:n[11],ClassExpression:n[11],ClassImplements:n[12],ClassMethod:n[13],ClassPrivateMethod:n[13],ClassPrivateProperty:n[14],ClassProperty:n[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:n[15],ConditionalExpression:n[16],ConditionalTypeAnnotation:n[17],ContinueStatement:n[8],DebuggerStatement:n[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:n[18],DeclareEnum:n[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:n[20],DeclareFunction:["id","predicate"],DeclareHook:n[21],DeclareInterface:n[22],DeclareModule:n[19],DeclareModuleExports:n[23],DeclareNamespace:n[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:n[24],DeclareVariable:n[21],Decorator:n[3],Directive:n[18],DirectiveLiteral:n[1],DoExpression:n[10],DoWhileStatement:n[25],EmptyStatement:n[1],EmptyTypeAnnotation:n[1],EnumBigIntBody:n[26],EnumBigIntMember:n[27],EnumBooleanBody:n[26],EnumBooleanMember:n[27],EnumDeclaration:n[19],EnumDefaultedMember:n[21],EnumNumberBody:n[26],EnumNumberMember:n[27],EnumStringBody:n[26],EnumStringMember:n[27],EnumSymbolBody:n[26],ExistsTypeAnnotation:n[1],ExperimentalRestProperty:n[6],ExperimentalSpreadProperty:n[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:n[28],ExportNamedDeclaration:n[20],ExportNamespaceSpecifier:n[28],ExportSpecifier:["local","exported"],ExpressionStatement:n[3],File:["program"],ForInStatement:n[29],ForOfStatement:n[29],ForStatement:["init","test","update","body"],FunctionDeclaration:n[30],FunctionExpression:n[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(hi,"").trimEnd();let s=Object.create(null),r=fe(0,e,pi,"").replace(hi,"").trimEnd(),o;for(;o=pi.exec(e);){let u=fe(0,o[2],Ws,"");if(typeof s[o[1]]=="string"||Array.isArray(s[o[1]])){let p=s[o[1]];s[o[1]]=[...Ys,...Array.isArray(p)?p:[p],u]}else s[o[1]]=u}return{comments:r,pragmas:s}}var fi=["noformat","noprettier"],di=["format","prettier"];function $s(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var mi=$s;function xi(e){let t=mi(e);t&&(e=e.slice(t.length+1));let i=ci(e),{pragmas:s,comments:r}=li(i);return{shebang:t,text:e,pragmas:s,comments:r}}function yi(e){let{pragmas:t}=xi(e);return di.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function gi(e){let{pragmas:t}=xi(e);return fi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Zs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:yi,hasIgnorePragma:gi,locStart:M,locEnd:R,...e}}var Ie=Zs;var Ne="module",vi="script",Le="commonjs",Re=[Ne,Le];function Ve(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return Ne;if(/\.(?:cjs|cts)$/iu.test(e))return Le}}var er={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function tr(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return Ae(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var bi,ir=()=>(bi??(bi=A.extend((0,Si.default)())),bi);function sr(e,t){let i=ir(),s=[],r=i.parse(e,{...er,sourceType:t===Le?vi:t,allowImportExportEverywhere:t===Ne,onComment:s});return r.comments=s,r}function rr(e,t){let i=Ve(t?.filepath),s=(i?[i]:Re).map(o=>()=>sr(e,o)),r;try{r=ke(s)}catch({errors:[o]}){throw tr(o)}return Pe(r,{text:e})}var _i=Ie(rr);var Ai=ut($e(),1);var P={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ar(e,t){let i=e[0],s=ie(0,e,-1),r={type:P.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function rt(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}rt.prototype={constructor:rt,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=P.Identifier,e.value==="static"&&(e.type=P.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=P.Keyword);else if(i===s.privateId)e.type=P.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=P.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=P.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=P.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=P.Boolean:i.keyword==="null"?e.type=P.Null:e.type=P.Keyword;else if(i===s.num)e.type=P.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=P.JSXText):e.type=P.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=P.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,o=()=>{s.push(ar(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&o();return}if(e.type===i.dollarBraceL){r.push(e),o();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var Ci=rt;var Ti=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function nr(){return ie(0,Ti,-1)}function or(e=5){let t=e==="latest"?nr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ti.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ur(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ei(e){let t=or(e.ecmaVersion),i=ur(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let o=t===3?e.allowReserved||"never":!1,u=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!u.globalReturn;if(i==="module"&&t<6)throw new Error("sourc
Line truncated
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[at](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var pr={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=A.extend(nt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=A.extend((0,Ai.default)(),nt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function ki(e,t){let i=pr.get(t);return new i(t,e).parse()}var cr={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,impliedStrict:!1}};function lr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:Ae(t,{loc:{start:{line:i,column:s}},cause:e})}function fr(e,t){let i=Ve(t?.filepath),s=(i?[i]:Re).map(o=>()=>ki(e,{...cr,sourceType:o})),r;try{r=ke(s)}catch({errors:[o]}){throw lr(o)}return Pe(r,{parser:"espree",text:e})}var wi=Ie(fr);var dr={acorn:_i,espree:wi};export{Pi as default,dr as parsers};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__ng_action: Parser;
|
||||
__ng_binding: Parser;
|
||||
__ng_directive: Parser;
|
||||
__ng_interpolation: Parser;
|
||||
};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var nt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var _i=Object.getOwnPropertyNames;var Ti=Object.getPrototypeOf,ki=Object.prototype.hasOwnProperty;var bi=Reflect.get;var ln=t=>{throw TypeError(t)};var cn=(t,e)=>{for(var n in e)nt(t,n,{get:e[n],enumerable:!0})},Ai=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _i(e))!ki.call(t,i)&&i!==n&&nt(t,i,{get:()=>e[i],enumerable:!(s=Ci(e,i))||s.enumerable});return t};var Ii=t=>Ai(nt({},"__esModule",{value:!0}),t);var st=(t,e,n)=>e.has(t)||ln("Cannot "+n);var U=(t,e,n)=>(st(t,e,"read from private field"),n?n.call(t):e.get(t)),ke=(t,e,n)=>e.has(t)?ln("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),it=(t,e,n,s)=>(st(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),v=(t,e,n)=>(st(t,e,"access private method"),n);var un=(t,e,n)=>bi(Ti(t),n,e);var Gr={};cn(Gr,{parsers:()=>rn});var rn={};cn(rn,{__ng_action:()=>Wr,__ng_binding:()=>qr,__ng_directive:()=>zr,__ng_interpolation:()=>jr});function Ni(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function hn(t,e,n){let s=Ni(e);for(let i=n;i<t.length;i++){let r=t[i];if(s(r))return i}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function fn(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function be(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function pn(t){return!!t.extra?.parenthesized}function ue(t){return t.type==="TSNonNullExpression"&&!pn(t)?ue(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!pn(t)}var Qr=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var dn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(dn||(dn={}));var mn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(mn||(mn={}));var gn;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(gn||(gn={}));var N;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(N||(N={}));var vn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(vn||(vn={}));var xn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(xn||(xn={}));var wn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(wn||(wn={}));var Sn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Sn||(Sn={}));var En;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(En||(En={}));var yn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(yn||(yn={}));var Cn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(Cn||(Cn={}));var _n;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(_n||(_n={}));var c;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEquals=17]="BiggerEquals",t[t.NullishCoalesce=18]="NullishCoalesce",t[t.Exponentiation=19]="Exponentiation",t[t.In=20]="In",t[t.AdditionAssignment=21]="AdditionAssignment",t[t.SubtractionAssignment=22]="SubtractionAssignment",t[t.MultiplicationAssignment=23]="MultiplicationAssignment",t[t.DivisionAssignment=24]="DivisionAssignment",t[t.RemainderAssignment=25]="RemainderAssignment",t[t.ExponentiationAssignment=26]="ExponentiationAssignment",t[t.AndAssignment=27]="AndAssignment",t[t.OrAssignment=28]="OrAssignment",t[t.NullishCoalesceAssignment=29]="NullishCoalesceAssignment"})(c||(c={}));function Pi(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function Li(t,e,n){let s=t.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(!n(t[i],e[i]))return!1;return!0}function Ge(t,e){return Li(t,e,(Line truncated
|
||||
`&&++u==n)););for(a=0,u=0;a<e&&r<s.length-1&&(r++,a++,!(s[r]==`
|
||||
`&&++u==n)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,r+1)}}return null}},He=class{content;url;constructor(e,n){this.content=e,this.url=n}},We=class{start;end;fullStart;details;constructor(e,n,s=e,i=null){this.start=e,this.end=n,this.fullStart=s,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},qe;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(qe||(qe={}));var Ce=class extends Error{span;msg;level;relatedError;constructor(e,n,s=qe.ERROR,i){super(n),this.span=e,this.msg=n,this.level=s,this.relatedError=i,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${qe[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var $n;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})($n||($n={}));var Dn;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local"})(Dn||(Dn={}));var Bn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Bn||(Bn={}));var er="(:(where|is)\\()?";var gs="-shadowcsshost",tr="-shadowcsscontext",Ot="[^)(]*",nr=`(?:\\(${Ot}\\)|${Ot})+?`,sr=`(?:\\(${nr}\\)|${Ot})+?`,Gt=`(?:\\((${sr})\\))`,to=new RegExp("(:nth-[-\\w]+)"+Gt,"g"),no=new RegExp(gs+Gt+"?([^,{]*)","gim"),ir=tr+Gt+"?([^{]*)",so=new RegExp(`${er}(${ir})`,"gim"),rr=gs+"-no-combinator",io=new RegExp(`${rr}(?![^(]*\\))`,"g");var vs="%COMMENT%",ro=new RegExp(vs,"g");var oo=new RegExp(`(\\s*(?:${vs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var or="%COMMA_IN_PLACEHOLDER%",ar="%SEMI_IN_PLACEHOLDER%",lr="%COLON_IN_PLACEHOLDER%",ao=new RegExp(or,"g"),lo=new RegExp(ar,"g"),co=new RegExp(lr,"g");var f;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.Projection=35]="Projection",t[t.RepeaterCreate=36]="RepeaterCreate",t[t.Repeater=37]="Repeater",t[t.TwoWayProperty=38]="TwoWayProperty",t[t.TwoWayListener=39]="TwoWayListener",t[t.DeclareLet=40]="DeclareLet",t[t.StoreLet=41]="StoreLet",t[t.I18nStart=42]="I18nStart",t[t.I18n=43]="I18n",t[t.I18nEnd=44]="I18nEnd",t[t.I18nExpression=45]="I18nExpression",t[t.I18nApply=46]="I18nApply",t[t.IcuStart=47]="IcuStart",t[t.IcuEnd=48]="IcuEnd",t[t.IcuPlaceholder=49]="IcuPlaceholder",t[t.I18nContext=50]="I18nContext",t[t.I18nAttributes=51]="I18nAttributes",t[t.SourceLocation=52]="SourceLocation",t[t.Animation=53]="Animation",t[t.AnimationString=54]="AnimationString",t[t.AnimationBinding=55]="AnimationBinding",t[t.AnimationListener=56]="AnimationListener",t[t.Control=57]="Control",t[t.ControlCreate=58]="ControlCreate"})(f||(f={}));var ie;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeInvokeFunction=17]="SafeInvokeFunction",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSet"})(ie||(ie={}));var On;(function(t){t[t.None=0]="None",t[t.AlwaysInline=1]="AlwaysInline"})(On||(On={}));var Fn;
Line truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,So=new RegExp(`[^${ws}]`),Eo=new RegExp(`[${ws}]{2,}`,"g");var h;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(h||(h={}));var F;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(F||(F={}));var hr=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],_e=class{tokenize(e){return new Vt(e).scan()}},A=class{index;end;type;numValue;strValue;constructor(e,n,s,i,r){this.index=e,this.end=n,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===h.Character&&this.numValue===e}isNumber(){return this.type===h.Number}isString(){return this.type===h.String}isOperator(e){return this.type===h.Operator&&this.strValue===e}isIdentifier(){return this.type===h.Identifier}isPrivateIdentifier(){return this.type===h.PrivateIdentifier}isKeyword(){return this.type===h.Keyword}isKeywordLet(){return this.type===h.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===h.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===h.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===h.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===h.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===h.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===h.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===h.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===h.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===h.Keyword&&this.strValue==="in"}isError(){return this.type===h.Error}isRegExpBody(){return this.type===h.RegExpBody}isRegExpFlags(){return this.type===h.RegExpFlags}toNumber(){return this.type===h.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===F.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===F.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case h.Character:case h.Identifier:case h.Keyword:case h.Operator:case h.PrivateIdentifier:case h.String:case h.Error:case h.RegExpBody:case h.RegExpFlags:return this.strValue;case h.Number:return this.numValue.toString();default:return null}}},xe=class extends A{kind;constructor(e,n,s,i){super(e,n,h.String,0,s),this.kind=i}};function he(t,e,n){return new A(t,e,h.Character,n,String.fromCharCode(n))}function fr(t,e,n){return new A(t,e,h.Identifier,0,n)}function dr(t,e,n){return new A(t,e,h.PrivateIdentifier,0,n)}function mr(t,e,n){return new A(t,e,h.Keyword,0,n)}function Y(t,e,n){return new A(t,e,h.Operator,0,n)}function gr(t,e,n){return new A(t,e,h.Number,n,"")}function vr(t,e,n){return new A(t,e,h.Error,0,n)}function xr(t,e,n){return new A(t,e,h.RegExpBody,0,n)}function wr(t,e,n){return new A(t,e,h.RegExpFlags,0,n)}var Ae=new A(-1,-1,h.Character,0,""),Vt=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?pe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,i=this.index;for(;s<=ls;)if(++i>=n){s=pe;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=n)return null;if(es(s))return this.scanIdentifier();if(W(s))return this.scanNumber(i);let r=i;switch(s){case H:return this.advance(),W(this.peek)?this.scanNumber(r):this.peek!==H?he(r,this.index,H):(this.advance(),this.peek===H?(this.advance(),Y(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(s)}]`,0));case ve:case q:case te:case G:case Q:case j:case fe:return this.scanCharacter(r,s);case Ve:return this.scanOpenBrace(r,s);case K:return this.scanCloseBrace(r,s);case us:case cs:return this.scanString();case Dt:return this.advance(),this.scanTemplateLiteralPart(r);case Oi:return this.scanPrivateIdentifier();case ps:return this.scanComplexOperator(r,"+",k,"=");case hs:return this.scanComplexOperator(r,"-",k,"=");case Fe:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",k,"=");case Fi:return this.scanComplexOperator(r,"%",k,"=");case ji:return this.scanOperator(r,"^");case Pn:return this.scanStar(r);case Ln:return this.scanQuestion(r);case Vi:case Ui:return this.scanComplexOperator(r,String.fromCharCode(s),k,"=");case Bi:case k:return this.scanComplexOperator(r,String.fromCharCode(s),k,"=",k,"=");case Nn:return this.scanComplexOperator(r,"&",Nn,"&",k,"=");case Mn:return this.scanComplexOperator(r,"|",Mn,"|",k,"=");case msLine truncated
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
var Ci=Object.defineProperty;var _i=Object.getPrototypeOf;var Ti=Reflect.get;var an=t=>{throw TypeError(t)};var ln=(t,e)=>{for(var n in e)Ci(t,n,{get:e[n],enumerable:!0})};var nt=(t,e,n)=>e.has(t)||an("Cannot "+n);var U=(t,e,n)=>(nt(t,e,"read from private field"),n?n.call(t):e.get(t)),ke=(t,e,n)=>e.has(t)?an("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),st=(t,e,n,s)=>(nt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),v=(t,e,n)=>(nt(t,e,"access private method"),n);var cn=(t,e,n)=>Ti(_i(t),n,e);var Ei={};ln(Ei,{parsers:()=>sn});var sn={};ln(sn,{__ng_action:()=>Fr,__ng_binding:()=>Vr,__ng_directive:()=>Hr,__ng_interpolation:()=>Ur});function ki(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function pn(t,e,n){let s=ki(e);for(let i=n;i<t.length;i++){let r=t[i];if(s(r))return i}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function hn(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function be(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function un(t){return!!t.extra?.parenthesized}function ue(t){return t.type==="TSNonNullExpression"&&!un(t)?ue(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!un(t)}var zr=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var fn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(fn||(fn={}));var dn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(dn||(dn={}));var mn;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(mn||(mn={}));var N;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(N||(N={}));var gn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(gn||(gn={}));var vn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(vn||(vn={}));var xn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(xn||(xn={}));var wn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(wn||(wn={}));var Sn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Sn||(Sn={}));var En;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(En||(En={}));var yn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(yn||(yn={}));var Cn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(Cn||(Cn={}));var c;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEquals=17]="BiggerEquals",t[t.NullishCoalesce=18]="NullishCoalesce",t[t.Exponentiation=19]="Exponentiation",t[t.In=20]="In",t[t.AdditionAssignment=21]="AdditionAssignment",t[t.SubtractionAssignment=22]="SubtractionAssignment",t[t.MultiplicationAssignment=23]="MultiplicationAssignment",t[t.DivisionAssignment=24]="DivisionAssignment",t[t.RemainderAssignment=25]="RemainderAssignment",t[t.ExponentiationAssignment=26]="ExponentiationAssignment",t[t.AndAssignment=27]="AndAssignment",t[t.OrAssignment=28]="OrAssignment",t[t.NullishCoalesceAssignment=29]="NullishCoalesceAssignment"})(c||(c={}));function bi(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function Ai(t,e,n){let s=t.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(!n(t[i],e[i]))return!1;return!0}function Ge(t,e){return Ai(t,e,(n,s)=>n.isEquivalent(s))}var S=class{type;sourceSpan;constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new ht(this,e,null,n)}key(e,n,s){return new ft(this,e,n,s)}callFn(e,n,s){return new at(this,e,null,n,s)}instantiate(e,n,s){return new lt(this,e,n,s)}conditional(e,n=null,s){return new pt(this,e,n,null,s)}equals(e,n){return new x(c.Equals,this,e,null,n)}notEquals(e,n){return new x(c.NotEquals,this,e,null,n)}identical(e,n){return new x(c.Identical,this,e,null,n)}notIdentical(e,n){return new x(c.NotIdentical,this,e,null,n)}minus(e,n){return new x(c.Minus,this,e,null,n)}plus(e,n){return new x(c.Plus,this,e,null,n)}divide(e,n){return new x(c.Divide,this,e,null,n)}multiply(e,n){rLine truncated
|
||||
`&&++u==n)););for(a=0,u=0;a<e&&r<s.length-1&&(r++,a++,!(s[r]==`
|
||||
`&&++u==n)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,r+1)}}return null}},He=class{content;url;constructor(e,n){this.content=e,this.url=n}},We=class{start;end;fullStart;details;constructor(e,n,s=e,i=null){this.start=e,this.end=n,this.fullStart=s,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},qe;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(qe||(qe={}));var Ce=class extends Error{span;msg;level;relatedError;constructor(e,n,s=qe.ERROR,i){super(n),this.span=e,this.msg=n,this.level=s,this.relatedError=i,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${qe[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Rn;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})(Rn||(Rn={}));var $n;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local"})($n||($n={}));var Dn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Dn||(Dn={}));var Yi="(:(where|is)\\()?";var ms="-shadowcsshost",Qi="-shadowcsscontext",Bt="[^)(]*",Ki=`(?:\\(${Bt}\\)|${Bt})+?`,Zi=`(?:\\(${Ki}\\)|${Bt})+?`,zt=`(?:\\((${Zi})\\))`,Yr=new RegExp("(:nth-[-\\w]+)"+zt,"g"),Qr=new RegExp(ms+zt+"?([^,{]*)","gim"),er=Qi+zt+"?([^{]*)",Kr=new RegExp(`${Yi}(${er})`,"gim"),tr=ms+"-no-combinator",Zr=new RegExp(`${tr}(?![^(]*\\))`,"g");var gs="%COMMENT%",eo=new RegExp(gs,"g");var to=new RegExp(`(\\s*(?:${gs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var nr="%COMMA_IN_PLACEHOLDER%",sr="%SEMI_IN_PLACEHOLDER%",ir="%COLON_IN_PLACEHOLDER%",no=new RegExp(nr,"g"),so=new RegExp(sr,"g"),io=new RegExp(ir,"g");var f;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.Projection=35]="Projection",t[t.RepeaterCreate=36]="RepeaterCreate",t[t.Repeater=37]="Repeater",t[t.TwoWayProperty=38]="TwoWayProperty",t[t.TwoWayListener=39]="TwoWayListener",t[t.DeclareLet=40]="DeclareLet",t[t.StoreLet=41]="StoreLet",t[t.I18nStart=42]="I18nStart",t[t.I18n=43]="I18n",t[t.I18nEnd=44]="I18nEnd",t[t.I18nExpression=45]="I18nExpression",t[t.I18nApply=46]="I18nApply",t[t.IcuStart=47]="IcuStart",t[t.IcuEnd=48]="IcuEnd",t[t.IcuPlaceholder=49]="IcuPlaceholder",t[t.I18nContext=50]="I18nContext",t[t.I18nAttributes=51]="I18nAttributes",t[t.SourceLocation=52]="SourceLocation",t[t.Animation=53]="Animation",t[t.AnimationString=54]="AnimationString",t[t.AnimationBinding=55]="AnimationBinding",t[t.AnimationListener=56]="AnimationListener",t[t.Control=57]="Control",t[t.ControlCreate=58]="ControlCreate"})(f||(f={}));var ie;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeInvokeFunction=17]="SafeInvokeFunction",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSet"})(ie||(ie={}));var Bn;(function(t){t[t.None=0]="None",t[t.AlwaysInline=1]="AlwaysInline"})(Bn||(Bn={}));var On;
Line truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,mo=new RegExp(`[^${xs}]`),go=new RegExp(`[${xs}]{2,}`,"g");var h;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(h||(h={}));var F;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(F||(F={}));var lr=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],_e=class{tokenize(e){return new Ft(e).scan()}},A=class{index;end;type;numValue;strValue;constructor(e,n,s,i,r){this.index=e,this.end=n,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===h.Character&&this.numValue===e}isNumber(){return this.type===h.Number}isString(){return this.type===h.String}isOperator(e){return this.type===h.Operator&&this.strValue===e}isIdentifier(){return this.type===h.Identifier}isPrivateIdentifier(){return this.type===h.PrivateIdentifier}isKeyword(){return this.type===h.Keyword}isKeywordLet(){return this.type===h.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===h.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===h.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===h.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===h.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===h.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===h.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===h.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===h.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===h.Keyword&&this.strValue==="in"}isError(){return this.type===h.Error}isRegExpBody(){return this.type===h.RegExpBody}isRegExpFlags(){return this.type===h.RegExpFlags}toNumber(){return this.type===h.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===F.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===F.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case h.Character:case h.Identifier:case h.Keyword:case h.Operator:case h.PrivateIdentifier:case h.String:case h.Error:case h.RegExpBody:case h.RegExpFlags:return this.strValue;case h.Number:return this.numValue.toString();default:return null}}},xe=class extends A{kind;constructor(e,n,s,i){super(e,n,h.String,0,s),this.kind=i}};function he(t,e,n){return new A(t,e,h.Character,n,String.fromCharCode(n))}function cr(t,e,n){return new A(t,e,h.Identifier,0,n)}function ur(t,e,n){return new A(t,e,h.PrivateIdentifier,0,n)}function pr(t,e,n){return new A(t,e,h.Keyword,0,n)}function Y(t,e,n){return new A(t,e,h.Operator,0,n)}function hr(t,e,n){return new A(t,e,h.Number,n,"")}function fr(t,e,n){return new A(t,e,h.Error,0,n)}function dr(t,e,n){return new A(t,e,h.RegExpBody,0,n)}function mr(t,e,n){return new A(t,e,h.RegExpFlags,0,n)}var Ae=new A(-1,-1,h.Character,0,""),Ft=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?pe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,i=this.index;for(;s<=as;)if(++i>=n){s=pe;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=n)return null;if(Zn(s))return this.scanIdentifier();if(W(s))return this.scanNumber(i);let r=i;switch(s){case H:return this.advance(),W(this.peek)?this.scanNumber(r):this.peek!==H?he(r,this.index,H):(this.advance(),this.peek===H?(this.advance(),Y(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(s)}]`,0));case ve:case q:case te:case G:case Q:case j:case fe:return this.scanCharacter(r,s);case Ve:return this.scanOpenBrace(r,s);case K:return this.scanCloseBrace(r,s);case cs:case ls:return this.scanString();case $t:return this.advance(),this.scanTemplateLiteralPart(r);case Ri:return this.scanPrivateIdentifier();case us:return this.scanComplexOperator(r,"+",k,"=");case ps:return this.scanComplexOperator(r,"-",k,"=");case Fe:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",k,"=");case $i:return this.scanComplexOperator(r,"%",k,"=");case Ui:return this.scanOperator(r,"^");case Nn:return this.scanStar(r);case Pn:return this.scanQuestion(r);case Di:case Bi:return this.scanComplexOperator(r,String.fromCharCode(s),k,"=");case Mi:case k:return this.scanComplexOperator(r,String.fromCharCode(s),k,"=",k,"=");case In:return this.scanComplexOperator(r,"&",In,"&",k,"=");case Ln:return this.scanComplexOperator(r,"|",Ln,"|",k,"=");case dsLine truncated
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__babel_estree: Parser;
|
||||
__js_expression: Parser;
|
||||
__ts_expression: Parser;
|
||||
__vue_event_binding: Parser;
|
||||
__vue_expression: Parser;
|
||||
__vue_ts_event_binding: Parser;
|
||||
__vue_ts_expression: Parser;
|
||||
babel: Parser;
|
||||
"babel-flow": Parser;
|
||||
"babel-ts": Parser;
|
||||
json: Parser;
|
||||
"json-stringify": Parser;
|
||||
json5: Parser;
|
||||
jsonc: Parser;
|
||||
};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var Re=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Js=Object.prototype.hasOwnProperty;var Ue=(a,t)=>{for(var e in t)Re(a,e,{get:t[e],enumerable:!0})},Gs=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ws(t))!Js.call(a,i)&&i!==e&&Re(a,i,{get:()=>t[i],enumerable:!(s=Hs(t,i))||s.enumerable});return a};var Xs=a=>Gs(Re({},"__esModule",{value:!0}),a);var ca={};Ue(ca,{parsers:()=>ha});var vt={};Ue(vt,{__babel_estree:()=>ta,__js_expression:()=>Zr,__ts_expression:()=>ea,__vue_event_binding:()=>Yr,__vue_expression:()=>Zr,__vue_ts_event_binding:()=>Qr,__vue_ts_expression:()=>ea,babel:()=>Yr,"babel-flow":()=>$s,"babel-ts":()=>Qr});function Ys(a,t){if(a==null)return{};var e={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(t.indexOf(s)!==-1)continue;e[s]=a[s]}return e}var R=class{line;column;index;constructor(t,e,s){this.line=t,this.column=e,this.index=s}},Q=class{start;end;filename;identifierName;constructor(t,e){this.start=t,this.end=e}};function D(a,t){let{line:e,column:s,index:i}=a;return new R(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Qs={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},be=a=>a.type==="UpdateExpression"?Ot.UpdateExpression[`${a.prefix}`]:Ot[a.type],Zs={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import d
Line truncated
|
||||
- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${be(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${be(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${be(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the
Line truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):G(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(e,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(K(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:bt(this.state.type)?e.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(U.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(U.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(U.UnexpectedSequenceExpression,i.expressions[1]),e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],r=this.jsxParseOpeningElementAt(e),n=null;if(!r.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e);break e}i.push(this.jsxParseElementAt(e));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(E.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,E.j_expr));break}default:this.unexpected()}V(r)&&!V(n)&&n!==null?this.raise(U.MissingClosingTagFragment,n):!V(r)&&V(n)?this.raise(U.MissingClosingTagElement,n,{openingTagName:J(r.name)}):!V(r)&&!V(n)&&J(n.name)!==J(r.name)&&this.raise(U.MissingClosingTagElement,n,{openingTagName:J(r.name)})}if(V(r)?(s.openingFragment=r,s.closingFragment=n):(s.openingElement=r,s.closingElement=n),s.children=i,this.match(47))throw this.raise(U
Line truncated
|
||||
`,++e,x===13&&t.charCodeAt(e)===10&&++e,++i,f=s=e):r.unterminated(n,o,h):++e}return{pos:e,str:l,firstInvalidLoc:u,lineStart:s,curLine:i}}function qi(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function $i(a,t,e,s,i,r){let n=!i;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),h=a.charCodeAt(t++);switch(h){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=tt(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=as(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,f=/^[0-7]+/.exec(a.slice(l,t+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),t+=f.length-1;let x=a.charCodeAt(t);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function tt(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=rs(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function rs(a,t,e,s,i,r,n,o,h,l){let u=t,f=i===16?jt.hex:jt.decBinOct,d=i===16?Te.hex:i===10?Te.dec:i===8?Te.oct:Te.bin,x=!1,A=0;for(let k=0,N=r??1/0;k<N;++k){let C=a.charCodeAt(t),I;if(C===95&&o!=="bail"){let Pe=a.charCodeAt(t-1),ae=a.charCodeAt(t+1);if(o){if(Number.isNaN(ae)||!d(ae)||f.has(Pe)||f.has(ae)){if(l)return{n:null,pos:t};h.unexpectedNumericSeparator(t,e,s)}}else{if(l)return{n:null,pos:t};h.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(C>=97?I=C-97+10:C>=65?I=C-65+10:zi(C)?I=C-48:I=1/0,I>=i){if(I<=9&&l)return{n:null,pos:t};if(I<=9&&h.invalidDigit(t,e,s,i))I=0;else if(n)I=0,x=!0;else break}++t,A=A*i+I}return t===u||r!=null&&t-u!==r||x?{n:null,pos:t}:{n:A,pos:t}}function as(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=tt(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=tt(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function he(a,t,e){return new R(e,a-t,a)}var Ki=new Set([103,109,115,105,121,117,100,118]),st=class{constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new Q(t.startLoc,t.endLoc)}},it=class extends Ze{isLookahead;tokens=[];constructor(t,e){super(),this.state=new et,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new st(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return je.lastIndex=t,je.test(this.input)?je.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ve.lastIndex=t,Ve.test(this.input)?Ve.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,ge.lastIndex=s+2;ge.test(this.input)&&ge.lastIndex<=i;)++this.state.curLine,this.state.lineStart=ge.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+t.length),loc:new Q(e,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(thi
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,D(this.state.lastTokEndLoc,l)),f}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(i),n=this.checkProto(u,s,n,i)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,u),h.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:l}=s,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=u,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(O(s))r=this.parseIdentifier(!0);else switch(s){case 135:r=this.parseNumericLiteral(i);break;case 134:r=this.parseStringLiteral(i);break;case 136:r=this.parseBigIntLiteral(i);break;case 139:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Se(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let r=this.start
Line truncated
|
||||
`||a==="\r"||a==="\u2028"||a==="\u2029";function ur(a,t,e){let s=!!e?.backwards;if(t===!1)return!1;let i=a.charAt(t);if(s){if(a.charAt(t-1)==="\r"&&i===`
|
||||
`)return t-2;if(fs(i))return t-1}else{if(i==="\r"&&a.charAt(t+1)===`
|
||||
`)return t+2;if(fs(i))return t+1}return t}var ds=ur;function fr(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?ps(a,t):t}var ms=fr;function dr(a,t){let e=null,s=t;for(;s!==e;)e=s,s=ls(a,s),s=us(a,s),s=ms(a,s),s=ds(a,s);return s}var ys=dr;function xs(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}function mr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(`
|
||||
`);return t===-1?a:a.slice(0,t)}var ve=mr;var ee=(a,t)=>(e,s,...i)=>e|1&&s==null?void 0:(t.call(s)??s[a]).apply(s,i);var yr=Array.prototype.findLast??function(a){for(let t=this.length-1;t>=0;t--){let e=this[t];if(a(e,t,this))return e}},xr=ee("findLast",function(){if(Array.isArray(this))return yr}),Ps=xr;function Pr(a){return this[a<0?this.length+a:a]}var gr=ee("at",function(){if(Array.isArray(this)||typeof this=="string")return Pr}),gs=gr;function M(a){let t=a.range?.[0]??a.start,e=(a.declaration?.decorators??a.decorators)?.[0];return e?Math.min(M(e),t):t}function L(a){return a.range?.[1]??a.end}function Tr(a){let t=new Set(a);return e=>t.has(e?.type)}var te=Tr;var br=te(["Block","CommentBlock","MultiLine"]),se=br;var Ar=te(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Ts=Ar;var wt=new WeakMap;function Sr(a){return wt.has(a)||wt.set(a,se(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(a.value)),wt.get(a)}var bs=Sr;function wr(a){if(!se(a))return!1;let t=`*${a.value}*`.split(`
|
||||
`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var Ct=new WeakMap;function Cr(a){return Ct.has(a)||Ct.set(a,wr(a)),Ct.get(a)}var Et=Cr;function Er(a){if(a.length<2)return;let t;for(let e=a.length-1;e>=0;e--){let s=a[e];if(t&&L(s)===M(t)&&Et(s)&&Et(t)&&(a.splice(e+1,1),s.value+="*//*"+t.value,s.range=[M(s),L(t)]),!Ts(s)&&!se(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var As=Er;function Ir(a){return a!==null&&typeof a=="object"}var Ss=Ir;var me=null;function ye(a){if(me!==null&&typeof me.property){let t=me;return me=ye.prototype=null,t}return me=ye.prototype=a??Object.create(null),new ye}var Nr=10;for(let a=0;a<=Nr;a++)ye();function It(a){return ye(a)}function kr(a,t="type"){It(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var ws=kr;var c=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],Cs={AccessorProperty:c[0],AnyTypeAnnotation:c[1],ArgumentPlaceholder:c[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:c[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:c[3],AsExpression:c[4],AssignmentExpression:c[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:c[6],BigIntLiteral:c[1],BigIntLiteralTypeAnnotation:c[1],BigIntTypeAnnotation:c[1],BinaryExpression:c[5],BindExpression:["object","callee"],BlockStatement:c[7],BooleanLiteral:c[1],BooleanLiteralTypeAnnotation:c[1],BooleanTypeAnnotation:c[1],BreakStatement:c[8],CallExpression:c[9],CatchClause:["param","body"],ChainExpression:c[3],ClassAccessorProperty:c[0],ClassBody:c[10],ClassDeclaration:c[11],ClassExpression:c[11],ClassImplements:c[12],ClassMethod:c[13],ClassPrivateMethod:c[13],ClassPrivateProperty:c[14],ClassProperty:c[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:c[15],ConditionalExpression:c[16],ConditionalTypeAnnotation:c[17],ContinueStatement:c[8],DebuggerStatement:c[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:c[18],DeclareEnum:c[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:c[20],DeclareFunction:["id","predicate"],DeclareHook:c[21],DeclareInterface:c[22],DeclareModule:c[19],DeclareModuleExports:c[23],DeclareNamespace:c[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:c[24],DeclareVariable:c[21],Decorator:c[3],Directive:c[18],DirectiveLiteral:c[1],DoExpression:c[10],DoWhileStatement:c[25],EmptyStatement:c[1],EmptyTypeAnnotation:c[1],EnumBigIntBody:c[26],EnumBigIntMember:c[27],EnumBooleanBody:c[26],EnumBooleanMember:c[27],EnumDeclaration:c[19],EnumDefaultedMember:c[21],EnumNumberBody:c[26],EnumNumberMember:c[27],EnumStringBody:c[26],EnumStringMember:c[27],EnumSymbolBody:c[26],ExistsTypeAnnotation:c[1],ExperimentalRestProperty:c[6],ExperimentalSpreadProperty:c[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:c[28],ExportNamedDeclaration:c[20],ExportNamespaceSpecifier:c[28],ExportSpecifier:["local","exported"],ExpressionStatement:c[3],File:["program"],ForInStatement:c[29],ForOfStatement:c[29],ForStatement:["init","test","update","body"],FunctionDeclaration:c[30],FunctionExpression:c[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);a=a.replace(Ls,"").trimEnd();let s=Object.create(null),i=xe(0,a,Ds,"").replace(Ls,"").trimEnd(),r;for(;r=Ds.exec(a);){let n=xe(0,r[2],_r,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...zr,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Fs=["noformat","noprettier"],Bs=["format","prettier"];function Rs(a){let t=ve(a);t&&(a=a.slice(t.length+1));let e=Ms(a),{pragmas:s,comments:i}=Os(e);return{shebang:t,text:a,pragmas:s,comments:i}}function Us(a){let{pragmas:t}=Rs(a);return Bs.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function _s(a){let{pragmas:t}=Rs(a);return Fs.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function qr(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Us,hasIgnorePragma:_s,locStart:M,locEnd:L,...a}}var H=qr;var Oe="module";var kt="commonjs";function js(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/iu.test(a))return Oe;if(/\.(?:cjs|cts)$/iu.test(a))return kt}}function $r(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Fe=$r;var ie=a=>H(Gr(a)),Kr={sourceType:Oe,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Vs="v8intrinsic",zs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],_=(a,t=Kr)=>({...t,plugins:[...t.plugins,...a]}),Hr=/@(?:no)?flow\b/u;function Wr(a,t){if(t?.endsWith(".js.flow"))return!0;let e=ve(a);e&&(a=a.slice(e.length));let s=ys(a,0);return s!==!1&&(a=a.slice(0,s)),Hr.test(a)}function Jr(a,t,e){let s=a(t,e),i=s.errors.find(r=>!Xr.has(r.reasonCode));if(i)throw i;return s}function Gr({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&Wr(e,i))return s.parser="babel-flow",$s.parse(e,s);let r=t,n=s.__babelSourceType??js(i);n&&n!==Oe&&(r=r.map(u=>({...u,sourceType:n,...n===kt?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/u.test(e);e.includes("|>")?r=(o?[...zs,Vs]:zs).flatMap(f=>r.map(d=>_([f],d))):o&&(r=r.map(u=>_([Vs],u)));let h=a?Ne:Ie,l;try{l=xs(r.map(u=>()=>Jr(h,e,u)))}catch({errors:[u]}){throw Me(u)}return a&&(l=Fe(l,{text:e,rootMarker:s.rootMarker})),ks(l,{text:e})}}var Xr=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),qs=[_(["jsx"])],Yr=ie({optionsCombinations:qs}),Qr=ie({optionsCombinations:[_(["jsx","typescript"]),_(["typescript"])]}),Zr=ie({isExpression:!0,optionsCombinations:[_(["jsx"])]}),ea=ie({isExpression:!0,optionsCombinations:[_(["typescript"])]}),$s=ie({optionsCombinations:[_(["jsx",["flow",{all:!0}],"flowComments"])]}),ta=ie({optionsCombinations:qs.map(a=>_(["estree"],a))});var Dt={};Ue(Dt,{json:()=>ra,"json-stringify":()=>oa,json5:()=>aa,jsonc:()=>na});function sa(a){return Array.isArray(a)&&a.length>0}var Lt=sa;var Ks={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function ia(a){let t=Ie(a,Ks),{program:e}=t;if(e.body.length===0&&e.directives.length===0&&!e.interpreter)return t}function Be(a,t={}){let{allowComments:e=!0,allowEmpty:s=!1}=t,i;try{i=Ne(a,Ks)}catch(r){if(s&&r.code==="BABEL_PARSER_SYNTAX_ERROR"&&r.reasonCode==="ParseExpressionEmptyInput")try{i=ia(a)}catch{}if(!i)throw Me(r)}if(!e&&Lt(i.comments))throw q(i.comments[0],"Comment");return i=Fe(i,{type:"JsonRoot",text:a}),i.node.type==="File"?delete i.node:re(i.node),i}function q(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return De(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function re(a){switch(a.type){case"ArrayExpression":for(let t of a.eleme
Line truncated
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
var Hs=Object.defineProperty;var Re=(a,t)=>{for(var e in t)Hs(a,e,{get:t[e],enumerable:!0})};var Ks={};Re(Ks,{parsers:()=>ra});var kt={};Re(kt,{__babel_estree:()=>Yr,__js_expression:()=>Gr,__ts_expression:()=>Xr,__vue_event_binding:()=>Wr,__vue_expression:()=>Gr,__vue_ts_event_binding:()=>Jr,__vue_ts_expression:()=>Xr,babel:()=>Wr,"babel-flow":()=>qs,"babel-ts":()=>Jr});function Ws(a,t){if(a==null)return{};var e={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(t.indexOf(s)!==-1)continue;e[s]=a[s]}return e}var R=class{line;column;index;constructor(t,e,s){this.line=t,this.column=e,this.index=s}},Q=class{start;end;filename;identifierName;constructor(t,e){this.start=t,this.end=e}};function D(a,t){let{line:e,column:s,index:i}=a;return new R(e,s+t,i+t)}var Dt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Js={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Dt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Dt}},Mt={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},be=a=>a.type==="UpdateExpression"?Mt.UpdateExpression[`${a.prefix}`]:Mt[a.type],Gs={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({lLine truncated
|
||||
- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${be(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${be(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${be(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the
Line truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):G(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(e,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(K(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:Tt(this.state.type)?e.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(U.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(U.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(U.UnexpectedSequenceExpression,i.expressions[1]),e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],r=this.jsxParseOpeningElementAt(e),n=null;if(!r.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e);break e}i.push(this.jsxParseElementAt(e));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(E.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,E.j_expr));break}default:this.unexpected()}V(r)&&!V(n)&&n!==null?this.raise(U.MissingClosingTagFragment,n):!V(r)&&V(n)?this.raise(U.MissingClosingTagElement,n,{openingTagName:J(r.name)}):!V(r)&&!V(n)&&J(n.name)!==J(r.name)&&this.raise(U.MissingClosingTagElement,n,{openingTagName:J(r.name)})}if(V(r)?(s.openingFragment=r,s.closingFragment=n):(s.openingElement=r,s.closingElement=n),s.children=i,this.match(47))throw this.raise(U
Line truncated
|
||||
`,++e,x===13&&t.charCodeAt(e)===10&&++e,++i,f=s=e):r.unterminated(n,o,h):++e}return{pos:e,str:l,firstInvalidLoc:u,lineStart:s,curLine:i}}function _i(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function ji(a,t,e,s,i,r){let n=!i;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),h=a.charCodeAt(t++);switch(h){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=et(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=rs(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,f=/^[0-7]+/.exec(a.slice(l,t+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),t+=f.length-1;let x=a.charCodeAt(t);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function et(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=is(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function is(a,t,e,s,i,r,n,o,h,l){let u=t,f=i===16?_t.hex:_t.decBinOct,d=i===16?Te.hex:i===10?Te.dec:i===8?Te.oct:Te.bin,x=!1,A=0;for(let k=0,N=r??1/0;k<N;++k){let C=a.charCodeAt(t),I;if(C===95&&o!=="bail"){let Pe=a.charCodeAt(t-1),ae=a.charCodeAt(t+1);if(o){if(Number.isNaN(ae)||!d(ae)||f.has(Pe)||f.has(ae)){if(l)return{n:null,pos:t};h.unexpectedNumericSeparator(t,e,s)}}else{if(l)return{n:null,pos:t};h.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(C>=97?I=C-97+10:C>=65?I=C-65+10:Ui(C)?I=C-48:I=1/0,I>=i){if(I<=9&&l)return{n:null,pos:t};if(I<=9&&h.invalidDigit(t,e,s,i))I=0;else if(n)I=0,x=!0;else break}++t,A=A*i+I}return t===u||r!=null&&t-u!==r||x?{n:null,pos:t}:{n:A,pos:t}}function rs(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=et(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=et(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function he(a,t,e){return new R(e,a-t,a)}var Vi=new Set([103,109,115,105,121,117,100,118]),tt=class{constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new Q(t.startLoc,t.endLoc)}},st=class extends Qe{isLookahead;tokens=[];constructor(t,e){super(),this.state=new Ze,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new tt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return _e.lastIndex=t,_e.test(this.input)?_e.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return je.lastIndex=t,je.test(this.input)?je.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,ge.lastIndex=s+2;ge.test(this.input)&&ge.lastIndex<=i;)++this.state.curLine,this.state.lineStart=ge.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+t.length),loc:new Q(e,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(thi
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,D(this.state.lastTokEndLoc,l)),f}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=!1,o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(i),n=this.checkProto(u,s,n,i)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,u),h.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:l}=s,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=u,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(O(s))r=this.parseIdentifier(!0);else switch(s){case 135:r=this.parseNumericLiteral(i);break;case 134:r=this.parseStringLiteral(i);break;case 136:r=this.parseBigIntLiteral(i);break;case 139:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Se(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let r=this.start
Line truncated
|
||||
`||a==="\r"||a==="\u2028"||a==="\u2029";function hr(a,t,e){let s=!!e?.backwards;if(t===!1)return!1;let i=a.charAt(t);if(s){if(a.charAt(t-1)==="\r"&&i===`
|
||||
`)return t-2;if(us(i))return t-1}else{if(i==="\r"&&a.charAt(t+1)===`
|
||||
`)return t+2;if(us(i))return t+1}return t}var fs=hr;function cr(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?ls(a,t):t}var ds=cr;function lr(a,t){let e=null,s=t;for(;s!==e;)e=s,s=cs(a,s),s=ps(a,s),s=ds(a,s),s=fs(a,s);return s}var ms=lr;function ys(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}function pr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(`
|
||||
`);return t===-1?a:a.slice(0,t)}var ve=pr;var ee=(a,t)=>(e,s,...i)=>e|1&&s==null?void 0:(t.call(s)??s[a]).apply(s,i);var ur=Array.prototype.findLast??function(a){for(let t=this.length-1;t>=0;t--){let e=this[t];if(a(e,t,this))return e}},fr=ee("findLast",function(){if(Array.isArray(this))return ur}),xs=fr;function dr(a){return this[a<0?this.length+a:a]}var mr=ee("at",function(){if(Array.isArray(this)||typeof this=="string")return dr}),Ps=mr;function M(a){let t=a.range?.[0]??a.start,e=(a.declaration?.decorators??a.decorators)?.[0];return e?Math.min(M(e),t):t}function L(a){return a.range?.[1]??a.end}function yr(a){let t=new Set(a);return e=>t.has(e?.type)}var te=yr;var xr=te(["Block","CommentBlock","MultiLine"]),se=xr;var Pr=te(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),gs=Pr;var St=new WeakMap;function gr(a){return St.has(a)||St.set(a,se(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(a.value)),St.get(a)}var Ts=gr;function Tr(a){if(!se(a))return!1;let t=`*${a.value}*`.split(`
|
||||
`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var wt=new WeakMap;function br(a){return wt.has(a)||wt.set(a,Tr(a)),wt.get(a)}var Ct=br;function Ar(a){if(a.length<2)return;let t;for(let e=a.length-1;e>=0;e--){let s=a[e];if(t&&L(s)===M(t)&&Ct(s)&&Ct(t)&&(a.splice(e+1,1),s.value+="*//*"+t.value,s.range=[M(s),L(t)]),!gs(s)&&!se(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var bs=Ar;function Sr(a){return a!==null&&typeof a=="object"}var As=Sr;var me=null;function ye(a){if(me!==null&&typeof me.property){let t=me;return me=ye.prototype=null,t}return me=ye.prototype=a??Object.create(null),new ye}var wr=10;for(let a=0;a<=wr;a++)ye();function Et(a){return ye(a)}function Cr(a,t="type"){Et(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var Ss=Cr;var c=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],ws={AccessorProperty:c[0],AnyTypeAnnotation:c[1],ArgumentPlaceholder:c[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:c[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:c[3],AsExpression:c[4],AssignmentExpression:c[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:c[6],BigIntLiteral:c[1],BigIntLiteralTypeAnnotation:c[1],BigIntTypeAnnotation:c[1],BinaryExpression:c[5],BindExpression:["object","callee"],BlockStatement:c[7],BooleanLiteral:c[1],BooleanLiteralTypeAnnotation:c[1],BooleanTypeAnnotation:c[1],BreakStatement:c[8],CallExpression:c[9],CatchClause:["param","body"],ChainExpression:c[3],ClassAccessorProperty:c[0],ClassBody:c[10],ClassDeclaration:c[11],ClassExpression:c[11],ClassImplements:c[12],ClassMethod:c[13],ClassPrivateMethod:c[13],ClassPrivateProperty:c[14],ClassProperty:c[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:c[15],ConditionalExpression:c[16],ConditionalTypeAnnotation:c[17],ContinueStatement:c[8],DebuggerStatement:c[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:c[18],DeclareEnum:c[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:c[20],DeclareFunction:["id","predicate"],DeclareHook:c[21],DeclareInterface:c[22],DeclareModule:c[19],DeclareModuleExports:c[23],DeclareNamespace:c[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:c[24],DeclareVariable:c[21],Decorator:c[3],Directive:c[18],DirectiveLiteral:c[1],DoExpression:c[10],DoWhileStatement:c[25],EmptyStatement:c[1],EmptyTypeAnnotation:c[1],EnumBigIntBody:c[26],EnumBigIntMember:c[27],EnumBooleanBody:c[26],EnumBooleanMember:c[27],EnumDeclaration:c[19],EnumDefaultedMember:c[21],EnumNumberBody:c[26],EnumNumberMember:c[27],EnumStringBody:c[26],EnumStringMember:c[27],EnumSymbolBody:c[26],ExistsTypeAnnotation:c[1],ExperimentalRestProperty:c[6],ExperimentalSpreadProperty:c[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:c[28],ExportNamedDeclaration:c[20],ExportNamespaceSpecifier:c[28],ExportSpecifier:["local","exported"],ExpressionStatement:c[3],File:["program"],ForInStatement:c[29],ForOfStatement:c[29],ForStatement:["init","test","update","body"],FunctionDeclaration:c[30],FunctionExpression:c[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);a=a.replace(vs,"").trimEnd();let s=Object.create(null),i=xe(0,a,Ls,"").replace(vs,"").trimEnd(),r;for(;r=Ls.exec(a);){let n=xe(0,r[2],Fr,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...Ur,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Os=["noformat","noprettier"],Fs=["format","prettier"];function Bs(a){let t=ve(a);t&&(a=a.slice(t.length+1));let e=Ds(a),{pragmas:s,comments:i}=Ms(e);return{shebang:t,text:a,pragmas:s,comments:i}}function Rs(a){let{pragmas:t}=Bs(a);return Fs.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function Us(a){let{pragmas:t}=Bs(a);return Os.some(e=>Object.prototype.hasOwnProperty.call(t,e))}function _r(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Rs,hasIgnorePragma:Us,locStart:M,locEnd:L,...a}}var H=_r;var Oe="module";var Nt="commonjs";function _s(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/iu.test(a))return Oe;if(/\.(?:cjs|cts)$/iu.test(a))return Nt}}function jr(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Fe=jr;var ie=a=>H(Kr(a)),Vr={sourceType:Oe,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},js="v8intrinsic",Vs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],_=(a,t=Vr)=>({...t,plugins:[...t.plugins,...a]}),zr=/@(?:no)?flow\b/u;function qr(a,t){if(t?.endsWith(".js.flow"))return!0;let e=ve(a);e&&(a=a.slice(e.length));let s=ms(a,0);return s!==!1&&(a=a.slice(0,s)),zr.test(a)}function $r(a,t,e){let s=a(t,e),i=s.errors.find(r=>!Hr.has(r.reasonCode));if(i)throw i;return s}function Kr({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&qr(e,i))return s.parser="babel-flow",qs.parse(e,s);let r=t,n=s.__babelSourceType??_s(i);n&&n!==Oe&&(r=r.map(u=>({...u,sourceType:n,...n===Nt?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/u.test(e);e.includes("|>")?r=(o?[...Vs,js]:Vs).flatMap(f=>r.map(d=>_([f],d))):o&&(r=r.map(u=>_([js],u)));let h=a?Ne:Ie,l;try{l=ys(r.map(u=>()=>$r(h,e,u)))}catch({errors:[u]}){throw Me(u)}return a&&(l=Fe(l,{text:e,rootMarker:s.rootMarker})),Ns(l,{text:e})}}var Hr=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),zs=[_(["jsx"])],Wr=ie({optionsCombinations:zs}),Jr=ie({optionsCombinations:[_(["jsx","typescript"]),_(["typescript"])]}),Gr=ie({isExpression:!0,optionsCombinations:[_(["jsx"])]}),Xr=ie({isExpression:!0,optionsCombinations:[_(["typescript"])]}),qs=ie({optionsCombinations:[_(["jsx",["flow",{all:!0}],"flowComments"])]}),Yr=ie({optionsCombinations:zs.map(a=>_(["estree"],a))});var Lt={};Re(Lt,{json:()=>ea,"json-stringify":()=>ia,json5:()=>ta,jsonc:()=>sa});function Qr(a){return Array.isArray(a)&&a.length>0}var vt=Qr;var $s={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Zr(a){let t=Ie(a,$s),{program:e}=t;if(e.body.length===0&&e.directives.length===0&&!e.interpreter)return t}function Be(a,t={}){let{allowComments:e=!0,allowEmpty:s=!1}=t,i;try{i=Ne(a,$s)}catch(r){if(s&&r.code==="BABEL_PARSER_SYNTAX_ERROR"&&r.reasonCode==="ParseExpressionEmptyInput")try{i=Zr(a)}catch{}if(!i)throw Me(r)}if(!e&&vt(i.comments))throw q(i.comments[0],"Comment");return i=Fe(i,{type:"JsonRoot",text:a}),i.node.type==="File"?delete i.node:re(i.node),i}function q(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return De(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function re(a){switch(a.type){case"ArrayExpression":for(let t of a.eleme
Line truncated
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Printer } from "../index.js";
|
||||
|
||||
export declare const printers: {
|
||||
estree: Printer;
|
||||
"estree-json": Printer;
|
||||
};
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var jn=Object.defineProperty;var Ba=Object.getOwnPropertyDescriptor;var ba=Object.getOwnPropertyNames;var Pa=Object.prototype.hasOwnProperty;var vn=(e,t)=>{for(var r in t)jn(e,r,{get:t[r],enumerable:!0})},ka=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ba(t))!Pa.call(e,s)&&s!==r&&jn(e,s,{get:()=>t[s],enumerable:!(n=Ba(t,s))||n.enumerable});return e};var Ia=e=>ka(jn({},"__esModule",{value:!0}),e);var hD={};vn(hD,{languages:()=>gD,options:()=>Ta,printers:()=>xD});var zs=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var Xs={};vn(Xs,{canAttachComment:()=>ki,embed:()=>Ao,features:()=>FD,getVisitorKeys:()=>Mr,handleComments:()=>Gi,hasPrettierIgnore:()=>nr,insertPragma:()=>Oo,isBlockComment:()=>ce,isGap:()=>Wi,massageAstNode:()=>bi,print:()=>Hs,printComment:()=>_o,printPrettierIgnored:()=>Hs,willPrintOwnComments:()=>qi});var Wt=(e,t)=>(r,n,...s)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,s);var La=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Oa=Wt("replaceAll",function(){if(typeof this=="string")return La}),W=Oa;function wa(e){return this[e<0?this.length+e:e]}var _a=Wt("at",function(){if(Array.isArray(this)||typeof this=="string")return wa}),N=_a;function Ma(e){return e!==null&&typeof e=="object"}var Lr=Ma;function*Na(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=i=>Lr(i)&&n(i);for(let i of r(e)){let o=e[i];if(Array.isArray(o))for(let u of o)s(u)&&(yield u);else s(o)&&(yield o)}}function*ja(e,t){let r=[e];for(let n=0;n<r.length;n++){let s=r[n];for(let i of Na(s,t))yield i,r.push(i)}}function Zs(e,{getVisitorKeys:t,predicate:r}){for(let n of ja(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}var ei=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uLine truncated
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function Ga(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let s=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&s===`
|
||||
`)return t-2;if(si(s))return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(si(s))return t+1}return t}var Ze=Ga;function Wa(e,t,r={}){let n=ze(e,r.backwards?t-1:t,r),s=Ze(e,n,r);return n!==s}var Z=Wa;function qa(e,t){if(t===!1)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}var qt=qa;function Ua(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ni(e,t):t}var Ut=Ua;function Ya(e,t){let r=null,n=t;for(;n!==r;)r=n,n=ri(e,n),n=qt(e,n),n=ze(e,n);return n=Ut(e,n),n=Ze(e,n),n!==!1&&Z(e,n)}var Yt=Ya;function Ha(e){return Array.isArray(e)&&e.length>0}var R=Ha;var Xa=()=>{},Le=Xa;var ii=Object.freeze({character:"'",codePoint:39}),oi=Object.freeze({character:'"',codePoint:34}),Va=Object.freeze({preferred:ii,alternate:oi}),$a=Object.freeze({preferred:oi,alternate:ii});function Ka(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?Va:$a,{length:s}=e,i=0,o=0;for(let u=0;u<s;u++){let p=e.charCodeAt(u);p===r.codePoint?i++:p===n.codePoint&&o++}return(i>o?n:r).character}var wr=Ka;var Qa=/\\(["'\\])|(["'])/gu;function za(e,t){let r=t==='"'?"'":'"',n=W(0,e,Qa,(s,i,o)=>i?i===r?r:s:o===t?"\\"+o:o);return t+n+t}var ui=za;function Za(e,t){Le(/^(?<quote>["']).*\k<quote>$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":wr(r,t.singleQuote);return e.charAt(0)===n?e:ui(r,n)}var ut=Za;var ai=e=>Number.isInteger(e)&&e>=0;function w(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(w(r),t):t}function I(e){return e.range?.[1]??e.end}function bt(e,t){let r=w(e);return ai(r)&&r===w(t)}function ep(e,t){let r=I(e);return ai(r)&&r===I(t)}function pi(e,t){return bt(e,t)&&ep(e,t)}var Dr=null;function fr(e){if(Dr!==null&&typeof Dr.property){let t=Dr;return Dr=fr.prototype=null,t}return Dr=fr.prototype=e??Object.create(null),new fr}var tp=10;for(let e=0;e<=tp;e++)fr();function Wn(e){return fr(e)}function rp(e,t="type"){Wn(e);function r(n){let s=n[t],i=e[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var _r=rp;var a=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],ci={AccessorProperty:a[0],AnyTypeAnnotation:a[1],ArgumentPlaceholder:a[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:a[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:a[3],AsExpression:a[4],AssignmentExpression:a[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:a[6],BigIntLiteral:a[1],BigIntLiteralTypeAnnotation:a[1],BigIntTypeAnnotation:a[1],BinaryExpression:a[5],BindExpression:["object","callee"],BlockStatement:a[7],BooleanLiteral:a[1],BooleanLiteralTypeAnnotation:a[1],BooleanTypeAnnotation:a[1],BreakStatement:a[8],CallExpression:a[9],CatchClause:["param","body"],ChainExpression:a[3],ClassAccessorProperty:a[0],ClassBody:a[10],ClassDeclaration:a[11],ClassExpression:a[11],ClassImplements:a[12],ClassMethod:a[13],ClassPrivateMethod:a[13],ClassPrivateProperty:a[14],ClassProperty:a[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:a[15],ConditionalExpression:a[16],ConditionalTypeAnnotation:a[17],ContinueStatement:a[8],DebuggerStatement:a[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:a[18],De
Line truncated
|
||||
`):e.type==="UnaryExpression"?Fr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:Jr(e)}function Ee(e,t){return H(t)?Ot(t):T(t,x.Leading,r=>Z(e,I(r)))}function li(e){return e.quasis.some(t=>t.value.raw.includes(`
|
||||
`))}function Wr(e,t){return(e.type==="TemplateLiteral"&&li(e)||e.type==="TaggedTemplateExpression"&&li(e.quasi))&&!Z(t,w(e),{backwards:!0})}function qr(e){if(!T(e))return!1;let t=N(0,et(e,x.Dangling),-1);return t&&!ce(t)}function Ai(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Ht(r)){if(t+=1,t>1)return!0}else if(M(r)){for(let n of le(r))if(Ht(n))return!0}return!1}function Ur(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&M(t)&&M(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Ap=new Set(["!","-","+","~"]);function Re(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return Re(e.expression,t);let r=n=>Re(n,t-1);if(Vn(e))return ot(e.pattern??e.regex.pattern)<=5;if(Jr(e)||Dp(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(se(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(q(e))return e.elements.every(n=>n===null||r(n));if(Dt(e)){if(e.type==="ImportExpression"||Re(e.callee,t)){let n=le(e);return n.length<=t&&n.every(r)}return!1}return J(e)?Re(e.object,t)&&Re(e.property,t):e.type==="UnaryExpression"&&Ap.has(e.operator)||e.type==="UpdateExpression"?Re(e.argument,t):!1}function ie(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ye(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ye(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ye(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ye(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ye(e.callee,t);case"ConditionalExpression":return ye(e.test,t);case"UpdateExpression":return!e.prefix&&ye(e.argument,t);case"BindExpression":return e.object&&ye(e.object,t);case"SequenceExpression":return ye(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ye(e.expression,t);default:return t(e)}}var mi={"==":!0,"!=":!0,"===":!0,"!==":!0},vr={"*":!0,"/":!0,"%":!0},Hn={">>":!0,">>>":!0,"<<":!0};function dr(e,t){return!(yr(t)!==yr(e)||e==="**"||mi[e]&&mi[t]||t==="%"&&vr[e]||e==="%"&&vr[t]||t!==e&&vr[t]&&vr[e]||Hn[e]&&Hn[t])}var Tp=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function yr(e){return Tp.get(e)}function Ti(e){return!!Hn[e]||e==="|"||e==="^"||e==="&"}function xi(e){if(e.rest)return!0;let t=K(e);return N(0,t,-1)?.type==="RestElement"}var Un=new WeakMap;function K(e){if(Un.has(e))return Un.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),Un.set(e,t),t}function gi(e,t){let{node:r}=e,n=0,s=()=>t(e,n++);r.this&&e.call(s,"this"),e.each(s,"params"),r.rest&&e.call(s,"rest")}var Yn=new WeakMap;function le(e){if(Yn.has(e))return Yn.get(e);if(e.type==="ChainExpression")return le(e.expression);let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,Yn.set(e,t),t}function $t(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>$t(e,t),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function Kn(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return[...r,"source"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}else if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return[...r,"expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[...r,"arguments",t];throw new RangeError("Invalid argument index")}function Lt(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Ot(e){return e?.prettierIgnore||T(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},hi=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!ce(r)||e&x.Line&&!At(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!Lt(r)||t&&!t(r))};function T(e,t,r){if(!R(e?.comments))return!1;let n=hi(t,r);return n?e.comments.some(n):!0}function et(e,t,r){if(!Array.isArray(e?.comments))return[];let n=hi(t,r);return n?e.comments.filter(n):e.comments}var oe=(e,{originalText:t})=>Yt(t,I(e));function Dt(e){return M(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Oe(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!mt(e))}var Ae=k(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Se=k(["TSUnionType","UnionTypeAnnotation"]),xt=k(["TSIntersectionType","IntersectionTypeAnnotation"]),Ue=k(["TSConditionalType","ConditionalTypeAnnotation"]),Si=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const",Cr=k(["TSTypeAliasDeclaration","TypeAlias"]);function Yr({key:e,parent:t}){return!(e==="types"&&Se(t)||e==="types"&&xt(t))}var xp=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","s
Line truncated
|
||||
`)return!0;return!1}var ue=Lp;var zn=new WeakMap;function Op(e){return zn.has(e)||zn.set(e,ce(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),zn.get(e)}var Hr=Op;var es=(e,t)=>At(e)||!ue(t,w(e),I(e));function wp(e){return[vi,Li,Mi,Up,jp,ts,rs,Ii,Oi,$p,Hp,Xp,ss,ji,Kp,wi,Ni,ns,vp,nc,Ri,is].some(t=>t(e))}function _p(e){return[Np,Mi,Li,ji,ts,rs,Ii,Oi,Ni,Yp,Vp,ss,Zp,ns,tc,rc,sc,Ri,oc,ic,is].some(t=>t(e))}function Mp(e){return[vi,ts,rs,qp,wi,ss,Wp,Gp,ns,ec,is].some(t=>t(e))}function wt(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?te(r,t):we(e,t)}function Zn(e,t){e.type==="BlockStatement"?wt(e,t):te(e,t)}function Np({comment:e,followingNode:t}){return t&&Hr(e)?(te(t,e),!0):!1}function ts({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if(r?.type!=="IfStatement"||!n)return!1;if(_e(s,I(e))===")")return $(t,e),!0;if(n.type==="BlockStatement"&&n===r.consequent&&w(e)>=I(t)&&I(e)<=w(n))return te(n,e),!0;if(t===r.consequent&&n===r.alternate){let o=at(s,I(r.consequent));if(n.type==="BlockStatement"&&w(e)>=o&&I(e)<=w(n))return te(n,e),!0;if(w(e)<o||r.alternate.type==="BlockStatement")return t.type==="BlockStatement"?($(t,e),!0):es(e,s)&&!ue(s,w(t),w(e))?($(t,e),!0):(we(r,e),!0)}return n.type==="BlockStatement"?(wt(n,e),!0):n.type==="IfStatement"?(Zn(n.consequent,e),!0):r.consequent===n?(te(n,e),!0):!1}function rs({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return r?.type!=="WhileStatement"||!n?!1:_e(s,I(e))===")"?($(t,e),!0):n.type==="BlockStatement"?(wt(n,e),!0):r.body===n?(te(n,e),!0):!1}function Ii({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?($(t,e),!0):n.type==="BlockStatement"?(wt(n,e),!0):n.type==="TryStatement"?(Zn(n.finalizer,e),!0):n.type==="CatchClause"?(Zn(n.body,e),!0):!1}function jp({comment:e,enclosingNode:t,followingNode:r}){return J(t)&&r?.type==="Identifier"?(te(t,e),!0):!1}function vp({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!(t?.type==="ConditionalExpression"||Ue(t))?!1:r?.type==="ConditionalExpression"||Ue(r)?(we(t,e),!0):!1}function Li({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:i}){let o=t&&!ue(s,I(t),w(e));return(!t||!o)&&(r?.type==="ConditionalExpression"||Ue(r))&&n?i.experimentalTernaries&&r.alternate===n&&!(ce(e)&&!ue(i.originalText,w(e),I(e)))?(we(r,e),!0):(te(n,e),!0):!1}var Rp=k(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Oi({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Rp(r)){if(R(r.decorators)&&n?.type!=="Decorator")return $(N(0,r.decorators,-1),e),!0;if(r.body&&n===r.body)return wt(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return $(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?$(t,e):we(r,e,s),!0}}return!1}var Jp=k(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);function wi({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&_e(n,I(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&_e(n,I(t))!==":"?($(t,e),!0):t?.type==="Decorator"&&Jp(r)&&(At(e)||e.placement==="ownLine")?($(t,e),!0):!1}var _i=k(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Gp({comment:e,precedingNode:t,enclosingNode:r,text:n}){return _e(n,I(e))!=="("?!1:t&&_i(r)?($(t,e),!0):!1}function Wp({comment:e,enclosingNode:t,text:r}){if(t?.type!=="ArrowFunctionExpression")return!1;let n=at(r,I(e));return n!==!1&&r.slice(n,n+2)==="=>"?(we(t,e),!0):!1}function qp({comment:e,enclosingNode:t,text:r}){return _e(r,I(e))!==")"?!1:t&&(Ji(t)&&K(t).length===0||Dt(t)&&le(t).length===0)?(we(t,e),!0):(t?.type==="MethodDefinition"||t?.type==="TSAbstractMethodDefinition")&&K(t.value).length===0?(we(t.value,e),!0):!1}function Up({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return t?.type==="ComponentTypeParameter"&&(r?.type==="DeclareComponent"||r?.type==="ComponentTypeAnnotation")&&n?.type!=="ComponentTypeParameter"?($(t,e),!0):(t?.type==="ComponentParameter"||t?.type==="RestElement")&&r?.type==="ComponentDeclaration"&&_e(s,I(e))===")"?($(t,e),!0):!1}function Mi({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return t?.type==="FunctionTypeParam"&&r?.type==="FunctionTypeAnnotation"&&n?.type!=="FunctionTypeParam"?($(t,e),!0):(t?.type==="Identifier"||t?.type==="AssignmentPattern"||t?.type==="ObjectPattern"||t?.type==="ArrayPattern"||t?.type==="RestElement"||t?
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(We(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=mc([...Xr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var os=class extends Error{name="InvalidDocError";constructor(t){super(Dc(t)),this.doc=t}},gt=os;var Ui={};function fc(e,t,r,n){let s=[e];for(;s.length>0;){let i=s.pop();if(i===Ui){r(s.pop());continue}r&&s.push(i,Ui);let o=We(i);if(!o)throw new gt(i);if(t?.(i)!==!1)switch(o){case Be:case Me:{let u=o===Be?i:i.parts;for(let p=u.length,c=p-1;c>=0;--c)s.push(u[c]);break}case be:s.push(i.flatContents,i.breakContents);break;case Fe:if(n&&i.expandedStates)for(let u=i.expandedStates.length,p=u-1;p>=0;--p)s.push(i.expandedStates[p]);else s.push(i.contents);break;case Xe:case He:case Ve:case Pe:case $e:s.push(i.contents);break;case Ye:case tt:case rt:case Ge:case me:case Ne:break;default:throw new gt(i)}}}var Vr=fc;function ft(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let o=s(i);return r.set(i,o),o}function s(i){switch(We(i)){case Be:return t(i.map(n));case Me:return t({...i,parts:i.parts.map(n)});case be:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Fe:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(n),u=o[0]):u=n(u),t({...i,contents:u,expandedStates:o})}case Xe:case He:case Ve:case Pe:case $e:return t({...i,contents:n(i.contents)});case Ye:case tt:case rt:case Ge:case me:case Ne:return t(i);default:throw new gt(i)}}}function Hi(e,t,r){let n=r,s=!1;function i(o){if(s)return!1;let u=t(o);u!==void 0&&(s=!0,n=u)}return Vr(e,i),n}function yc(e){if(e.type===Fe&&e.break||e.type===me&&e.hard||e.type===Ne)return!0}function ne(e){return Hi(e,yc,!1)}function Yi(e){if(e.length>0){let t=N(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Xi(e){let t=new Set,r=[];function n(i){if(i.type===Ne&&Yi(r),i.type===Fe){if(r.push(i),t.has(i))return!1;t.add(i)}}function s(i){i.type===Fe&&r.pop().break&&Yi(r)}Vr(e,n,s,!0)}function Ec(e){return e.type===me&&!e.hard?e.soft?"":" ":e.type===be?e.flatContents:e}function _t(e){return ft(e,Ec)}function Fc(e){switch(We(e)){case Me:if(e.parts.every(t=>t===""))return"";break;case Fe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Fe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Xe:case He:case Ve:case $e:if(!e.contents)return"";break;case be:if(!e.flatContents&&!e.breakContents)return"";break;case Be:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof N(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case Ye:case tt:case rt:case Ge:case me:case Pe:case Ne:break;default:throw new gt(e)}return e}function Qt(e){return ft(e,t=>Fc(t))}function qe(e,t=$r){return ft(e,r=>typeof r=="string"?L(t,r.split(`
|
||||
`)):r)}function dc(e){if(e.type===me)return!0}function Vi(e){return Hi(e,dc,!1)}function Ar(e,t){return e.type===Pe?{...e,contents:t(e.contents)}:t(e)}function $i(e){let t=!0;return Vr(e,r=>{switch(We(r)){case Ye:if(r==="")break;case rt:case Ge:case me:case Ne:return t=!1,!1}}),t}var de=Le,Kr=Le,Ki=Le,Qi=Le;function m(e){return de(e),{type:He,contents:e}}function xe(e,t){return Qi(e),de(t),{type:Xe,contents:t,n:e}}function zi(e){return xe(Number.NEGATIVE_INFINITY,e)}function Qr(e){return xe(-1,e)}function Zi(e,t,r){de(e);let n=e;if(t>0){for(let s=0;s<Math.floor(t/r);++s)n=m(n);n=xe(t%r,n),n=xe(Number.NEGATIVE_INFINITY,n)}return n}var ke={type:Ne};var Tr={type:tt};function zr(e){return Ki(e),{type:Me,parts:e}}function l(e,t={}){return de(e),Kr(t.expandedStates,!0),{type:Fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function nt(e,t){return l(e[0],{...t,expandedStates:e})}function P(e,t="",r={}){return de(e),t!==""&&de(t),{type:be,breakContents:e,flatContents:t,groupId:r.groupId}}function yt(e,t){return de(e),{type:Ve,contents:e,groupId:t.groupId,negate:t.negate}}function L(e,t){de(e),Kr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function pt(e,t){return de(t),e?{type:Pe,label:e,contents:t}:t}var A={type:me},f={type:me,soft:!0},us={type:me,hard:!0},E=[us,ke],Cc={type:me,hard:!0,literal:!0},$r=[Cc,ke];function as(e){return de(e),{type:$e,contents:e}}var je={type:Ge};var Ac="cr",Tc="crlf";var xc="\r",gc=`\r
|
||||
`,hc=`
|
||||
`,Sc=hc;function eo(e){return e===Ac?xc:e===Tc?gc:Sc}var Bc={type:0},bc={type:1},ps={value:"",length:0,queue:[],get root(){return ps}};function to(e,t,r){let n=t.type===1?e.queue.slice(0,-1):[...e.queue,t],s="",i=0,o=0,u=0;for(let d of n)switch(d.type){case 0:y(),r.useTabs?p(1):c(r.tabWidth);break;case 3:{let{string:b}=d;y(),s+=b,i+=b.length;break}case 2:{let{width:b}=d;o+=1,u+=b;break}default:throw new Error(`Unexpected indent comment '${d.type}'.`)}return F(),{...e,value:s,length:i,queue:n};function p(d){s+=" ".repeat(d),i+=r.tabWidth*d}function c(d){s+=" ".repeat(d),i+=d}function y(){r.useTabs?D():F()}function D(){o>0&&p(o),C()}function F(){u>0&&c(u),C()}function C(){o=0,u=0}}function ro(e,t,r){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let n;return typeof t=="number"?t<0?n=bc:n={type:2,width:t}:n={type:3,string:t},to(e,n,r)}function no(e,t){return to(e,Bc,t)}function Pc(e){let t=0;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n===" "||n===" ")t++;else break}return t}function cs(e){let t=Pc(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var ve=Symbol("MODE_BREAK"),ct=Symbol("MODE_FLAT"),ls=Symbol("DOC_FILL_PRINTED_LENGTH");function Zr(e,t,r,n,s,i){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,u=!1,p=[e],c="";for(;r>=0;){if(p.length===0){if(o===0)return!0;p.push(t[--o]);continue}let{mode:y,doc:D}=p.pop(),F=We(D);switch(F){case Ye:D&&(u&&(c+=" ",r-=1,u=!1),c+=D,r-=ot(D));break;case Be:case Me:{let C=F===Be?D:D.parts,d=D[ls]??0;for(let b=C.length-1;b>=d;b--)p.push({mode:y,doc:C[b]});break}case He:case Xe:case Ve:case Pe:p.push({mode:y,doc:D.contents});break;case rt:{let{text:C,count:d}=cs(c);c=C,r+=d;break}case Fe:{if(i&&D.break)return!1;let C=D.break?ve:y,d=D.expandedStates&&C===ve?N(0,D.expandedStates,-1):D.contents;p.push({mode:C,doc:d});break}case be:{let d=(D.groupId?s[D.groupId]||ct:y)===ve?D.breakContents:D.flatContents;d&&p.push({mode:y,doc:d});break}case me:if(y===ve||D.hard)return!0;D.soft||(u=!0);break;case $e:n=!0;break;case Ge:if(n)return!1;break}}return!1}function ms(e,t){let r=Object.create(null),n=t.printWidth,s=eo(t.endOfLine),i=0,o=[{indent:ps,mode:ve,doc:e}],u="",p=!1,c=[],y=[],D=[],F=[],C=0;for(Xi(e);o.length>0;){let{indent:h,mode:g,doc:S}=o.pop();switch(We(S)){case Ye:{let j=s!==`
|
||||
`?W(0,S,`
|
||||
`,s):S;j&&(u+=j,o.length>0&&(i+=ot(j)));break}case Be:for(let j=S.length-1;j>=0;j--)o.push({indent:h,mode:g,doc:S[j]});break;case tt:if(y.length>=2)throw new Error("There are too many 'cursor' in doc.");y.push(C+u.length);break;case He:o.push({indent:no(h,t),mode:g,doc:S.contents});break;case Xe:o.push({indent:ro(h,S.n,t),mode:g,doc:S.contents});break;case rt:O();break;case Fe:switch(g){case ct:if(!p){o.push({indent:h,mode:S.break?ve:ct,doc:S.contents});break}case ve:{p=!1;let j={indent:h,mode:ct,doc:S.contents},U=n-i,fe=c.length>0;if(!S.break&&Zr(j,o,U,fe,r))o.push(j);else if(S.expandedStates){let Y=N(0,S.expandedStates,-1);if(S.break){o.push({indent:h,mode:ve,doc:Y});break}else for(let z=1;z<S.expandedStates.length+1;z++)if(z>=S.expandedStates.length){o.push({indent:h,mode:ve,doc:Y});break}else{let ee=S.expandedStates[z],Ie={indent:h,mode:ct,doc:ee};if(Zr(Ie,o,U,fe,r)){o.push(Ie);break}}}else o.push({indent:h,mode:ve,doc:S.contents});break}}S.id&&(r[S.id]=N(0,o,-1).mode);break;case Me:{let j=n-i,U=S[ls]??0,{parts:fe}=S,Y=fe.length-U;if(Y===0)break;let z=fe[U+0],ee=fe[U+1],Ie={indent:h,mode:ct,doc:z},st={indent:h,mode:ve,doc:z},_=Zr(Ie,[],j,c.length>0,r,!0);if(Y===1){_?o.push(Ie):o.push(st);break}let re={indent:h,mode:ct,doc:ee},ae={indent:h,mode:ve,doc:ee};if(Y===2){_?o.push(re,Ie):o.push(ae,st);break}let it=fe[U+2],Bt={indent:h,mode:g,doc:{...S,[ls]:U+2}},Pr=Zr({indent:h,mode:ct,doc:[z,ee,it]},[],j,c.length>0,r,!0);o.push(Bt),Pr?o.push(re,Ie):_?o.push(ae,Ie):o.push(ae,st);break}case be:case Ve:{let j=S.groupId?r[S.groupId]:g;if(j===ve){let U=S.type===be?S.breakContents:S.negate?S.contents:m(S.contents);U&&o.push({indent:h,mode:g,doc:U})}if(j===ct){let U=S.type===be?S.flatContents:S.negate?m(S.contents):S.contents;U&&o.push({indent:h,mode:g,doc:U})}break}case $e:c.push({indent:h,mode:g,doc:S.contents});break;case Ge:c.length>0&&o.push({indent:h,mode:g,doc:us});break;case me:switch(g){case ct:if(S.hard)p=!0;else{S.soft||(u+=" ",i+=1);break}case ve:if(c.length>0){o.push({indent:h,mode:g,doc:S},...c.reverse()),c.length=0;break}S.literal?(u+=s,i=0,h.root&&(h.root.value&&(u+=h.root.value),i=h.root.length)):(O(),u+=s+h.value,i=h.length);break}break;case Pe:o.push({indent:h,mode:g,doc:S.contents});break;case Ne:break;default:throw new gt(S)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let d=D.join("")+u,b=[...F,...y];if(b.length!==2)return{formatted:d};let B=b[0];return{formatted:d,cursorNodeStart:B,cursorNodeText:d.slice(B,N(0,b,-1))};function O(){let{text:h,count:g}=cs(u);h&&(D.push(h),C+=h.length),u="",i-=g,y.length>0&&(F.push(...y.map(S=>Math.min(S,C))),y.length=0)}}function kc(e,t,r=0){let n=0;for(let s=r;s<e.length;++s)e[s]===" "?n=n+t-n%t:n++;return n}var so=kc;function Ic(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:so(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var io=Ic;function en(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&wc(e)){let c=Lc(e,t,r);if(c)return c}let i="expressions";n.type==="TSTemplateLiteralType"&&(i="types");let o=[],u=e.map(r,i);o.push(je,"`");let p=0;return e.each(({index:c,node:y})=>{if(o.push(r()),y.tail)return;let{tabWidth:D}=t,F=y.value.raw,C=F.includes(`
|
||||
`)?io(F,D):p;p=C;let d=u[c],b=n[i][c],B=ue(t.originalText,I(y),w(n.quasis[c+1]));if(!B){let h=ms(d,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;h.includes(`
|
||||
`)?B=!0:d=h}B&&(T(b)||b.type==="Identifier"||J(b)||b.type==="ConditionalExpression"||b.type==="SequenceExpression"||Ae(b)||Te(b))&&(d=[m([f,d]),f]);let O=C===0&&F.endsWith(`
|
||||
`)?xe(Number.NEGATIVE_INFINITY,d):Zi(d,C,D);o.push(l(["${",O,je,"}"]))},"quasis"),o.push("`"),o}function oo(e,t,r){let n=r("quasi"),{node:s}=e,i="",o=et(s.quasi,x.Leading)[0];return o&&(ue(t.originalText,I(s.typeArguments??s.tag),w(o))?i=f:i=" "),pt(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,je,n])}function Lc(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(s.length>1||s.some(i=>i.length>0)){t.__inJestEach=!0;let i=e.map(r,"expressions");t.__inJestEach=!1;let o=i.map(D=>"${"+ms(D,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),u=[{hasLineBreak:!1,cells:[]}];for(let D=1;D<n.quasis.length;D++){let F=N(0,u,-1),C=o[D-1];F.cells.push(C),C.includes(`
|
||||
`)&&(F.hasLineBreak=!0),n.quasis[D].value.raw.includes(`
|
||||
`)&&u.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...u.map(D=>D.cells.length)),c=Array.from({length:p}).fill(0),y=[{cells:s},...u.filter(D=>D.cells.length>0)];for(let{cells:D}of y.filter(F=>!F.hasLineBreak))for(let[F,C]of D.entries())c[F]=Math.max(c[F],ot(C));return[je,"`",m([E,L(E,y.map(D=>L(" | ",D.cells.map((F,C)=>D.hasLineBreak?F:F+" ".repeat(c[C]-ot(F))))))]),E,"`"]}}function Oc(e,t){let{node:r}=e,n=t();return T(r)&&(n=l([m([f,n]),f])),["${",n,je,"}"]}function zt(e,t){return e.map(()=>Oc(e,t),"expressions")}function tn(e,t){return ft(e,r=>typeof r=="string"?t?W(0,r,/(\\*)`/gu,"$1$1\\`"):Ds(r):r)}function Ds(e){return W(0,e,/([\\`]|\$\{)/gu,"\\$1")}function wc({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var ys=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function uo(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Oe(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>q(n)&&s==="elements",r,...ys)||e.match(t,r,...ys)}function Es(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Oe(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ys)}function fs(e,t){return T(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function rn({node:e,parent:t},r){return fs(e,r)||_c(t)&&fs(t,r)||t.type==="ExpressionStatement"&&fs(t,r)}function _c(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function po(e,t,r){let{node:n}=r,s="";for(let[p,c]of n.quasis.entries()){let{raw:y}=c.value;p>0&&(s+="@prettier-placeholder-"+(p-1)+"-id"),s+=y}let i=await e(s,{parser:"scss"}),o=zt(r,t),u=Mc(i,o);if(!u)throw new Error("Couldn't insert all the expressions");return["`",m([E,u]),f,"`"]}function Mc(e,t){if(!R(t))return e;let r=0,n=ft(Qt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/u).map((i,o)=>o%2===0?qe(i):(r++,t[i])));return t.length===r?n:null}function Nc(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&Pt(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function nn(e){return e.type==="Identifier"&&e.name==="styled"}function ao(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function jc({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return nn(t.object)||ao(t);case"CallExpression":return nn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(nn(t.callee.object.object)||ao(t.callee.object))||t.callee.object.type==="CallExpression"&&nn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function vc({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var co=e=>Nc(e)||jc(e)||vc(e)||uo(e);async function lo(e,t,r){let{node:n}=r,s=n.quasis.length,i=zt(r,t),o=[];for(let u=0;u<s;u++){let p=n.quasis[u],c=u===0,y=u===s-1,D=p.value.cooked,F=D.split(`
|
||||
`),C=F.length,d=i[u],b=C>2&&F[0].trim()===""&&F[1].trim()==="",B=C>2&&F[C-1].trim()===""&&F[C-2].trim()==="",O=F.every(g=>/^\s*(?:#[^\n\r]*)?$/u.test(g));if(!y&&/#[^\n\r]*$/u.test(F[C-1]))return null;let h=null;O?h=Rc(F):h=await e(D,{parser:"graphql"}),h?(h=tn(h,!1),!c&&b&&o.push(""),o.push(h),!y&&B&&o.push("")):!c&&!y&&b&&o.push(""),d&&o.push(d)}return["`",m([E,L(E,o)]),E,"`"]}function Rc(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,i]of n.entries())i!==""&&(n[s-1]===""&&r?t.push([E,i]):t.push(i),r=!0);return t.length===0?null:L(E,t)}function mo({node:e,parent:t}){return rn({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var Fs=0;async function Do(e,t,r,n,s){let{node:i}=n,o=Fs;Fs=Fs+1>>>0;let u=O=>`PRETTIER_HTML_PLACEHOLDER_${O}_${o}_IN_JS`,p=i.quasis.map((O,h,g)=>h===g.length-1?O.value.cooked:O.value.cooked+u(h)).join(""),c=zt(n,r),y=new RegExp(u("(\\d+)"),"gu"),D=0,F=await t(p,{parser:e,__onHtmlRoot(O){D=O.children.length}}),C=ft(F,O=>{if(typeof O!="string")return O;let h=[],g=O.split(y);for(let S=0;S<g.length;S++){let j=g[S];if(S%2===0){j&&(j=Ds(j),s.__embeddedInHtml&&(j=W(0,j,/<\/(?=script\b)/giu,"<\\/")),h.push(j));continue}let U=Number(j);h.push(c[U])}return h}),d=/^\s/u.test(p)?" ":"",b=/\s$/u.test(p)?" ":"",B=s.htmlWhitespaceSensitivity==="ignore"?E:d&&b?A:null;return B?l(["`",m([B,l(C)]),B,"`"]):pt({hug:!1},l(["`",d,D>1?m(l(C)):l(C),b,"`"]))}function fo(e){return rn(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var yo=Do.bind(void 0,"html"),Eo=Do.bind(void 0,"angular");async function Fo(e,t,r){let{node:n}=r,s=W(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(p,c)=>"\\".repeat(c.length/2)+"`"),i=Jc(s),o=i!=="";o&&(s=W(0,s,new RegExp(`^${i}`,"gmu"),""));let u=tn(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?m([f,u]):[$r,zi(u)],f,"`"]}function Jc(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function Co({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var Gc=[{test:co,print:po},{test:mo,print:lo},{test:fo,print:yo},{test:Es,print:Eo},{test:Co,print:Fo}].map(({test:e,print:t})=>({test:e,print:qc(t)}));function Wc(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Uc(t))return;let r=Gc.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function qc(e){return async(...t)=>{let r=await e(...t);return r&&pt({embed:!0,...r.label},r)}}function Uc({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Ao=Wc;var Yc=/\*\/$/,Hc=/^\/\*\*?/,ho=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Xc=/(^|\s+)\/\/([^\n\r]*)/g,To=/^(\r?\n)+/,Vc=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,xo=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,$c=/(\r?\n|^) *\* ?/g,So=[];function Bo(e){let t=e.match(ho);return t?t[0].trimStart():""}function bo(e){let r=e.match(ho)?.[0];return r==null?e:e.slice(r.length)}function Po(e){e=W(0,e.replace(Hc,"").replace(Yc,""),$c,"$1");let r="";for(;r!==e;)r=e,e=W(0,e,Vc,`
|
||||
$1 $2
|
||||
`);e=e.replace(To,"").trimEnd();let n=Object.create(null),s=W(0,e,xo,"").replace(To,"").trimEnd(),i;for(;i=xo.exec(e);){let o=W(0,i[2],Xc,"");if(typeof n[i[1]]=="string"||Array.isArray(n[i[1]])){let u=n[i[1]];n[i[1]]=[...So,...Array.isArray(u)?u:[u],o]}else n[i[1]]=o}return{comments:s,pragmas:n}}function ko({comments:e="",pragmas:t={}}){let o=Object.keys(t),u=o.flatMap(c=>go(c,t[c])).map(c=>` * ${c}
|
||||
`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let c=t[o[0]];return`/** ${go(o[0],c)[0]} */`}}let p=e.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(e?p:"")+(e&&o.length>0?` *
|
||||
`:"")+u+" */"}function go(e,t){return[...So,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var Io="format";function Kc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Lo=Kc;function Qc(e){let t=Lo(e);t&&(e=e.slice(t.length+1));let r=Bo(e),{pragmas:n,comments:s}=Po(r);return{shebang:t,text:e,pragmas:n,comments:s}}function Oo(e){let{shebang:t,text:r,pragmas:n,comments:s}=Qc(e),i=bo(r),o=ko({pragmas:{[Io]:"",...n},comments:s.trimStart()});return(t?`${t}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}function zc(e){if(!ce(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var ds=new WeakMap;function Zc(e){return ds.has(e)||ds.set(e,zc(e)),ds.get(e)}var wo=Zc;function _o(e,t){let r=e.node;if(At(r))return t.originalText.slice(w(r),I(r)).trimEnd();if(wo(r))return el(r);if(ce(r))return["/*",qe(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function el(e){let t=e.value.split(`
|
||||
`);return["/*",L(E,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}function Cs(e,t){if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&sl(r)&&xr(e))return!0;if(tl(r))return!1;if(r.type==="Identifier"){if(r.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let i=e.findAncestor(o=>o.type==="ForOfStatement")?.left;if(i&&ye(i,o=>o===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let i=e.findAncestor(u=>u.type==="ExpressionStatement"||u.type==="ForStatement"||u.type==="ForInStatement"),o=i?i.type==="ExpressionStatement"?i.expression:i.type==="ForStatement"?i.init:i.left:void 0;if(o&&ye(o,u=>u===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let i=e.findAncestor(o=>!Ae(o));if(i!==s&&i.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let i=e.findAncestor(o=>o.type==="ExpressionStatement")?.expression;if(i&&ye(i,o=>o===r))return!0}if(r.type==="ObjectExpression"){let i=e.findAncestor(o=>o.type==="ArrowFunctionExpression")?.body;if(i&&i.type!=="SequenceExpression"&&i.type!=="AssignmentExpression"&&ye(i,o=>o===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&R(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return Mo(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!ol(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression")&&nl(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(i,o)=>o==="declarations"&&i.type==="VariableDeclaration",(i,o)=>o==="left"&&i.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&rl(e))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let i=e.grandparent;if(i.type==="BinaryExpression"&&i.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r)||yi(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:i,type:o}=r;if(!i&&o!=="TSTypeAssertion")return!0;let u=yr(i),p=s.operator,c=yr(p);return!!(c>u||n==="right"&&c===u||c===u&&!dr(p,i)||c<u&&i==="%"&&(p==="+"||p==="-")||Ti(p))}default:return!1}case"SequenceExpression":return s.type!=="ForStatement";case"YieldExpression":if(s.type==="AwaitExpression"||s.type==="TSTypeAssertion")return!0;case"AwaitExpression":switch(s.type){case"TaggedTemplat
Line truncated
|
||||
`)){if(n.length===0)continue;let s=this.getLeadingWhitespaceCount(n);if(s===0)return 0;n.length!==s&&s<r&&(r=s)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},cu=_s;var yn=new cu(`
|
||||
\r `),Ms=e=>e===""||e===A||e===E||e===f;function zl(e,t,r){let{node:n}=e;if(n.type==="JSXElement"&&Dm(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),i=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),i];n.children=n.children.map(g=>fm(g)?{type:"JSXText",value:" ",raw:" "}:g);let o=n.children.some(H),u=n.children.filter(g=>g.type==="JSXExpressionContainer").length>1,p=n.type==="JSXElement"&&n.openingElement.attributes.length>1,c=ne(s)||o||p||u,y=e.parent.rootMarker==="mdx",D=t.singleQuote?"{' '}":'{" "}',F=y?A:P([D,f]," "),C=n.openingElement?.name?.name==="fbt",d=Zl(e,t,r,F,C),b=n.children.some(g=>Br(g));for(let g=d.length-2;g>=0;g--){let S=d[g]===""&&d[g+1]==="",j=d[g]===E&&d[g+1]===""&&d[g+2]===E,U=(d[g]===f||d[g]===E)&&d[g+1]===""&&d[g+2]===F,fe=d[g]===F&&d[g+1]===""&&(d[g+2]===f||d[g+2]===E),Y=d[g]===F&&d[g+1]===""&&d[g+2]===F,z=d[g]===f&&d[g+1]===""&&d[g+2]===E||d[g]===E&&d[g+1]===""&&d[g+2]===f;j&&b||S||U||Y||z?d.splice(g,2):fe&&d.splice(g+1,2)}for(;d.length>0&&Ms(N(0,d,-1));)d.pop();for(;d.length>1&&Ms(d[0])&&Ms(d[1]);)d.shift(),d.shift();let B=[""];for(let[g,S]of d.entries()){if(S===F){if(g===1&&$i(d[g-1])){if(d.length===2){B.push([B.pop(),D]);continue}B.push([D,E],"");continue}else if(g===d.length-1){B.push([B.pop(),D]);continue}else if(d[g-1]===""&&d[g-2]===E){B.push([B.pop(),D]);continue}}g%2===0?B.push([B.pop(),S]):B.push(S,""),ne(S)&&(c=!0)}let O=b?zr(B):l(B,{shouldBreak:!0});if(t.cursorNode?.type==="JSXText"&&n.children.includes(t.cursorNode)?O=[Tr,O,Tr]:t.nodeBeforeCursor?.type==="JSXText"&&n.children.includes(t.nodeBeforeCursor)?O=[Tr,O]:t.nodeAfterCursor?.type==="JSXText"&&n.children.includes(t.nodeAfterCursor)&&(O=[O,Tr]),y)return O;let h=l([s,m([E,O]),E,i]);return c?h:nt([l([s,...d,i]),h])}function Zl(e,t,r,n,s){let i="",o=[i];function u(c){i=c,o.push([o.pop(),c])}function p(c){c!==""&&(i=c,o.push(c,""))}return e.each(({node:c,next:y})=>{if(c.type==="JSXText"){let D=pe(c);if(Br(c)){let F=yn.split(D,!0);F[0]===""&&(F.shift(),/\n/u.test(F[0])?p(mu(s,F[1],c,y)):p(n),F.shift());let C;if(N(0,F,-1)===""&&(F.pop(),C=F.pop()),F.length===0)return;for(let[d,b]of F.entries())d%2===1?p(A):u(b);C!==void 0?/\n/u.test(C)?p(mu(s,i,c,y)):p(n):p(lu(s,i,c,y))}else/\n/u.test(D)?D.match(/\n/gu).length>1&&p(E):p(n)}else{let D=r();if(u(D),y&&Br(y)){let C=yn.trim(pe(y)),[d]=yn.split(C);p(lu(s,d,c,y))}else p(E)}},"children"),o}function lu(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?t.length===1?f:E:f}function mu(e,t,r,n){return e?E:t.length===1?r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?E:f:E}var em=k(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);function tm(e,t,r){let{parent:n}=e;if(em(n))return t;let s=rm(e),i=ge(e,r);return l([i?"":P("("),m([f,t]),f,i?"":P(")")],{shouldBreak:s})}function rm(e){return e.match(void 0,(t,r)=>r==="body"&&t.type==="ArrowFunctionExpression",(t,r)=>r==="arguments"&&M(t))&&(e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer")||e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer"))}function nm(e,t,r){let{node:n}=e,s=[r("name")];if(n.value){let i;if(V(n.value)){let o=pe(n.value),u=W(0,W(0,o.slice(1,-1),"'","'"),""",'"'),p=wr(u,t.jsxSingleQuote);u=p==='"'?W(0,u,'"',"""):W(0,u,"'","'"),i=e.call(()=>De(e,qe(p+u+p),t),"value")}else i=r("value");s.push("=",i)}return s}function sm(e,t,r){let{node:n}=e,s=(i,o)=>i.type==="JSXEmptyExpression"||!T(i)&&(q(i)||se(i)||i.type==="ArrowFunctionExpression"||i.type==="AwaitExpression"&&(s(i.argument,i)||i.argument.type==="JSXElement")||M(i)||i.type==="ChainExpression"&&M(i.expression)||i.type==="FunctionExpression"||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="DoExpression"||H(o)&&(i.type==="ConditionalExpression"||Te(i)));return s(n.expression,e.parent)?l(["{",r("expression"),je,"}"]):l(["{",m([f,r("expression")]),f,je,"}"])}function im(e,t,r){let{node:n}=e,s=T(n.name)||T(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),r("typeArguments")," />"];if(n.attributes?.length===1&&V(n.attributes[0].value)&&!n.attributes[0].value.value.includes(`
|
||||
`)&&!s&&!T(n.attributes[0]))return l(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(u=>V(u.value)&&u.value.value.includes(`
|
||||
`)),o=t.singleAttributePerLine&&n.attributes.length>1?E:A;return l(["<",r("name"),r("typeArguments"),m(e.map(()=>[o,r()],"attributes")),...om(n,t,s)],{shouldBreak:i})}function om(e,t,r){return e.selfClosing?[A,"/>"]:um(e,t,r)?[">"]:[f,">"]}function um(e,t,r){let n=e.attributes.length>0&&T(N(0,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function am(e,t,r){let{node:n}=e,s=["</"],i=r("name");return T(n.name,x.Leading|x.Line)?s.push(m([E,i]),E):T(n.name,x.Leading|x.Block)?s.push(" ",i):s.push(i),s.push(">"),s}function pm(e,t){let{node:r}=e,n=T(r),s=T(r,x.Line),i=r.type==="JSXOpeningFragment";return[i?"<":"</",m([s?E:n&&!i?" ":"",v(e,t)]),s?E:"",">"]}function cm(e,t,r){let n=De(e,zl(e,t,r),t);return tm(e,n,t)}function lm(e,t){let{node:r}=e,n=T(r,x.Line);return[v(e,t,{indent:n}),n?E:""]}function mm(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let i=["...",r()];return T(s)?[m([f,De(e,i,t)]),f]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Du(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return nm(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return L(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return L(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return mm(e,t,r);case"JSXExpressionContainer":return sm(e,t,r);case"JSXFragment":case"JSXElement":return cm(e,t,r);case"JSXOpeningElement":return im(e,t,r);case"JSXClosingElement":return am(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return pm(e,t);case"JSXEmptyExpression":return lm(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Qe(n,"JSX")}}function Dm(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Br(t)}function Br(e){return e.type==="JSXText"&&(yn.hasNonWhitespaceCharacter(pe(e))||!/\n/u.test(pe(e)))}function fm(e){return e.type==="JSXExpressionContainer"&&V(e.expression)&&e.expression.value===" "&&!T(e.expression)}function fu(e){let{node:t,parent:r}=e;if(!H(t)||!H(r))return!1;let{index:n,siblings:s}=e,i;for(let o=n;o>0;o--){let u=s[o-1];if(!(u.type==="JSXText"&&!Br(u))){i=u;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&Ot(i.expression)}function ym(e){return Ot(e.node)||fu(e)}var nr=ym;function Eu(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return on(e,t,r);case"NGChainedExpression":return l(L([";",A],e.map(()=>dm(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":yu(e)?" ":[";",A],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:i}=e,o=yu(e)||Em(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||s===2&&(n.key.name==="else"&&i.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[s-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new Qe(n,"Angular")}}function yu({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}function Em(e){let{node:t}=e;return e.parent.body[1].key.name==="of"&&t.type==="NGMicrosyntaxKeyedExpression"&&t.key.name==="track"&&t.key.type==="NGMicrosyntaxKey"}var Fm=k(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function dm({node:e}){return Er(e,Fm)}function Ns(e,t,r){let{node:n}=e;return l([L(A,e.map(r,"decorators")),Cu(n,t)?E:A])}function Fu(e,t,r){return Au(e.node)?[L(E,e.map(r,"declaration","decorators")),E]:""}function du(e,t,r){let{node:n,parent:s}=e,{decorators:i}=n;if(!R(i)||Au(s)||nr(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||Cu(n,t);return[e.key==="declaration"&&fi(s)?E:o?ke:"",L(A,e.map(r,"decorators")),A]}function Cu(e,t){return e.decorators.some(r=>Z(t.originalText,I(r)))}function Au(e){if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=e.declaration?.decorators;return R(t)&&bt(e,t[0])}var js=new WeakMap;function Tu(e){return js.has(e)||js.set(e,e.type==="ConditionalExpression"&&!ye(e,t=>t.type==="ObjectExpression")),js.get(e)}var Cm=e=>e.type==="SequenceExpression";function xu(e,t,r,n={}){let s=[],i,o=[],u=!1,p=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function O(){let{node:h}=e,g=Am(e,t,r,n);if(s.length===0)s.push(g);else{let{le
Line truncated
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
var Ba=Object.defineProperty;var jn=(e,t)=>{for(var r in t)Ba(e,r,{get:t[r],enumerable:!0})};var Ta={};jn(Ta,{languages:()=>CD,options:()=>Aa,printers:()=>dD});var Qs=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var Hs={};jn(Hs,{canAttachComment:()=>Pi,embed:()=>Co,features:()=>DD,getVisitorKeys:()=>Mr,handleComments:()=>Ji,hasPrettierIgnore:()=>nr,insertPragma:()=>Lo,isBlockComment:()=>ce,isGap:()=>Gi,massageAstNode:()=>Bi,print:()=>Ys,printComment:()=>wo,printPrettierIgnored:()=>Ys,willPrintOwnComments:()=>Wi});var Wt=(e,t)=>(r,n,...s)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,s);var ba=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Pa=Wt("replaceAll",function(){if(typeof this=="string")return ba}),W=Pa;function ka(e){return this[e<0?this.length+e:e]}var Ia=Wt("at",function(){if(Array.isArray(this)||typeof this=="string")return ka}),N=Ia;function La(e){return e!==null&&typeof e=="object"}var Lr=La;function*Oa(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=i=>Lr(i)&&n(i);for(let i of r(e)){let o=e[i];if(Array.isArray(o))for(let u of o)s(u)&&(yield u);else s(o)&&(yield o)}}function*wa(e,t){let r=[e];for(let n=0;n<r.length;n++){let s=r[n];for(let i of Oa(s,t))yield i,r.push(i)}}function zs(e,{getVisitorKeys:t,predicate:r}){for(let n of wa(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}var Zs=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDLine truncated
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function ja(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let s=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&s===`
|
||||
`)return t-2;if(ni(s))return t-1}else{if(s==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(ni(s))return t+1}return t}var Ze=ja;function va(e,t,r={}){let n=ze(e,r.backwards?t-1:t,r),s=Ze(e,n,r);return n!==s}var Z=va;function Ra(e,t){if(t===!1)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}var qt=Ra;function Ja(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ri(e,t):t}var Ut=Ja;function Ga(e,t){let r=null,n=t;for(;n!==r;)r=n,n=ti(e,n),n=qt(e,n),n=ze(e,n);return n=Ut(e,n),n=Ze(e,n),n!==!1&&Z(e,n)}var Yt=Ga;function Wa(e){return Array.isArray(e)&&e.length>0}var R=Wa;var qa=()=>{},Le=qa;var si=Object.freeze({character:"'",codePoint:39}),ii=Object.freeze({character:'"',codePoint:34}),Ua=Object.freeze({preferred:si,alternate:ii}),Ya=Object.freeze({preferred:ii,alternate:si});function Ha(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?Ua:Ya,{length:s}=e,i=0,o=0;for(let u=0;u<s;u++){let p=e.charCodeAt(u);p===r.codePoint?i++:p===n.codePoint&&o++}return(i>o?n:r).character}var wr=Ha;var Xa=/\\(["'\\])|(["'])/gu;function Va(e,t){let r=t==='"'?"'":'"',n=W(0,e,Xa,(s,i,o)=>i?i===r?r:s:o===t?"\\"+o:o);return t+n+t}var oi=Va;function $a(e,t){Le(/^(?<quote>["']).*\k<quote>$/su.test(e));let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":wr(r,t.singleQuote);return e.charAt(0)===n?e:oi(r,n)}var ut=$a;var ui=e=>Number.isInteger(e)&&e>=0;function w(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(w(r),t):t}function I(e){return e.range?.[1]??e.end}function bt(e,t){let r=w(e);return ui(r)&&r===w(t)}function Ka(e,t){let r=I(e);return ui(r)&&r===I(t)}function ai(e,t){return bt(e,t)&&Ka(e,t)}var Dr=null;function fr(e){if(Dr!==null&&typeof Dr.property){let t=Dr;return Dr=fr.prototype=null,t}return Dr=fr.prototype=e??Object.create(null),new fr}var Qa=10;for(let e=0;e<=Qa;e++)fr();function Gn(e){return fr(e)}function za(e,t="type"){Gn(e);function r(n){let s=n[t],i=e[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var _r=za;var a=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],pi={AccessorProperty:a[0],AnyTypeAnnotation:a[1],ArgumentPlaceholder:a[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:a[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:a[3],AsExpression:a[4],AssignmentExpression:a[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:a[6],BigIntLiteral:a[1],BigIntLiteralTypeAnnotation:a[1],BigIntTypeAnnotation:a[1],BinaryExpression:a[5],BindExpression:["object","callee"],BlockStatement:a[7],BooleanLiteral:a[1],BooleanLiteralTypeAnnotation:a[1],BooleanTypeAnnotation:a[1],BreakStatement:a[8],CallExpression:a[9],CatchClause:["param","body"],ChainExpression:a[3],ClassAccessorProperty:a[0],ClassBody:a[10],ClassDeclaration:a[11],ClassExpression:a[11],ClassImplements:a[12],ClassMethod:a[13],ClassPrivateMethod:a[13],ClassPrivateProperty:a[14],ClassProperty:a[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:a[15],ConditionalExpression:a[16],ConditionalTypeAnnotation:a[17],ContinueStatement:a[8],DebuggerStatement:a[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:a[18],De
Line truncated
|
||||
`):e.type==="UnaryExpression"?Fr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:Jr(e)}function Ee(e,t){return H(t)?Ot(t):T(t,x.Leading,r=>Z(e,I(r)))}function ci(e){return e.quasis.some(t=>t.value.raw.includes(`
|
||||
`))}function Wr(e,t){return(e.type==="TemplateLiteral"&&ci(e)||e.type==="TaggedTemplateExpression"&&ci(e.quasi))&&!Z(t,w(e),{backwards:!0})}function qr(e){if(!T(e))return!1;let t=N(0,et(e,x.Dangling),-1);return t&&!ce(t)}function Ci(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Ht(r)){if(t+=1,t>1)return!0}else if(M(r)){for(let n of le(r))if(Ht(n))return!0}return!1}function Ur(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&M(t)&&M(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Ep=new Set(["!","-","+","~"]);function Re(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return Re(e.expression,t);let r=n=>Re(n,t-1);if(Xn(e))return ot(e.pattern??e.regex.pattern)<=5;if(Jr(e)||pp(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(se(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(q(e))return e.elements.every(n=>n===null||r(n));if(Dt(e)){if(e.type==="ImportExpression"||Re(e.callee,t)){let n=le(e);return n.length<=t&&n.every(r)}return!1}return J(e)?Re(e.object,t)&&Re(e.property,t):e.type==="UnaryExpression"&&Ep.has(e.operator)||e.type==="UpdateExpression"?Re(e.argument,t):!1}function ie(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ye(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ye(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ye(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ye(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ye(e.callee,t);case"ConditionalExpression":return ye(e.test,t);case"UpdateExpression":return!e.prefix&&ye(e.argument,t);case"BindExpression":return e.object&&ye(e.object,t);case"SequenceExpression":return ye(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ye(e.expression,t);default:return t(e)}}var li={"==":!0,"!=":!0,"===":!0,"!==":!0},vr={"*":!0,"/":!0,"%":!0},Yn={">>":!0,">>>":!0,"<<":!0};function dr(e,t){return!(yr(t)!==yr(e)||e==="**"||li[e]&&li[t]||t==="%"&&vr[e]||e==="%"&&vr[t]||t!==e&&vr[t]&&vr[e]||Yn[e]&&Yn[t])}var Fp=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function yr(e){return Fp.get(e)}function Ai(e){return!!Yn[e]||e==="|"||e==="^"||e==="&"}function Ti(e){if(e.rest)return!0;let t=K(e);return N(0,t,-1)?.type==="RestElement"}var qn=new WeakMap;function K(e){if(qn.has(e))return qn.get(e);let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),qn.set(e,t),t}function xi(e,t){let{node:r}=e,n=0,s=()=>t(e,n++);r.this&&e.call(s,"this"),e.each(s,"params"),r.rest&&e.call(s,"rest")}var Un=new WeakMap;function le(e){if(Un.has(e))return Un.get(e);if(e.type==="ChainExpression")return le(e.expression);let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,Un.set(e,t),t}function $t(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>$t(e,t),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function $n(e,t){let r=[];if(e.type==="ChainExpression"&&(e=e.expression,r.push("expression")),e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return[...r,"source"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}else if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return[...r,"expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[...r,"arguments",t];throw new RangeError("Invalid argument index")}function Lt(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Ot(e){return e?.prettierIgnore||T(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},gi=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!ce(r)||e&x.Line&&!At(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!Lt(r)||t&&!t(r))};function T(e,t,r){if(!R(e?.comments))return!1;let n=gi(t,r);return n?e.comments.some(n):!0}function et(e,t,r){if(!Array.isArray(e?.comments))return[];let n=gi(t,r);return n?e.comments.filter(n):e.comments}var oe=(e,{originalText:t})=>Yt(t,I(e));function Dt(e){return M(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Oe(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!mt(e))}var Ae=k(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Se=k(["TSUnionType","UnionTypeAnnotation"]),xt=k(["TSIntersectionType","IntersectionTypeAnnotation"]),Ue=k(["TSConditionalType","ConditionalTypeAnnotation"]),hi=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const",Cr=k(["TSTypeAliasDeclaration","TypeAlias"]);function Yr({key:e,parent:t}){return!(e==="types"&&Se(t)||e==="types"&&xt(t))}var dp=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","s
Line truncated
|
||||
`)return!0;return!1}var ue=bp;var Qn=new WeakMap;function Pp(e){return Qn.has(e)||Qn.set(e,ce(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Qn.get(e)}var Hr=Pp;var Zn=(e,t)=>At(e)||!ue(t,w(e),I(e));function kp(e){return[ji,Ii,_i,Jp,wp,es,ts,ki,Li,Yp,Wp,qp,ns,Ni,Hp,Oi,Mi,rs,_p,Zp,vi,ss].some(t=>t(e))}function Ip(e){return[Op,_i,Ii,Ni,es,ts,ki,Li,Mi,Gp,Up,ns,$p,rs,Qp,zp,ec,vi,rc,tc,ss].some(t=>t(e))}function Lp(e){return[ji,es,ts,Rp,Oi,ns,vp,jp,rs,Kp,ss].some(t=>t(e))}function wt(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?te(r,t):we(e,t)}function zn(e,t){e.type==="BlockStatement"?wt(e,t):te(e,t)}function Op({comment:e,followingNode:t}){return t&&Hr(e)?(te(t,e),!0):!1}function es({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if(r?.type!=="IfStatement"||!n)return!1;if(_e(s,I(e))===")")return $(t,e),!0;if(n.type==="BlockStatement"&&n===r.consequent&&w(e)>=I(t)&&I(e)<=w(n))return te(n,e),!0;if(t===r.consequent&&n===r.alternate){let o=at(s,I(r.consequent));if(n.type==="BlockStatement"&&w(e)>=o&&I(e)<=w(n))return te(n,e),!0;if(w(e)<o||r.alternate.type==="BlockStatement")return t.type==="BlockStatement"?($(t,e),!0):Zn(e,s)&&!ue(s,w(t),w(e))?($(t,e),!0):(we(r,e),!0)}return n.type==="BlockStatement"?(wt(n,e),!0):n.type==="IfStatement"?(zn(n.consequent,e),!0):r.consequent===n?(te(n,e),!0):!1}function ts({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return r?.type!=="WhileStatement"||!n?!1:_e(s,I(e))===")"?($(t,e),!0):n.type==="BlockStatement"?(wt(n,e),!0):r.body===n?(te(n,e),!0):!1}function ki({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?($(t,e),!0):n.type==="BlockStatement"?(wt(n,e),!0):n.type==="TryStatement"?(zn(n.finalizer,e),!0):n.type==="CatchClause"?(zn(n.body,e),!0):!1}function wp({comment:e,enclosingNode:t,followingNode:r}){return J(t)&&r?.type==="Identifier"?(te(t,e),!0):!1}function _p({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!(t?.type==="ConditionalExpression"||Ue(t))?!1:r?.type==="ConditionalExpression"||Ue(r)?(we(t,e),!0):!1}function Ii({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:i}){let o=t&&!ue(s,I(t),w(e));return(!t||!o)&&(r?.type==="ConditionalExpression"||Ue(r))&&n?i.experimentalTernaries&&r.alternate===n&&!(ce(e)&&!ue(i.originalText,w(e),I(e)))?(we(r,e),!0):(te(n,e),!0):!1}var Mp=k(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Li({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Mp(r)){if(R(r.decorators)&&n?.type!=="Decorator")return $(N(0,r.decorators,-1),e),!0;if(r.body&&n===r.body)return wt(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return $(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?$(t,e):we(r,e,s),!0}}return!1}var Np=k(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);function Oi({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&_e(n,I(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&_e(n,I(t))!==":"?($(t,e),!0):t?.type==="Decorator"&&Np(r)&&(At(e)||e.placement==="ownLine")?($(t,e),!0):!1}var wi=k(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function jp({comment:e,precedingNode:t,enclosingNode:r,text:n}){return _e(n,I(e))!=="("?!1:t&&wi(r)?($(t,e),!0):!1}function vp({comment:e,enclosingNode:t,text:r}){if(t?.type!=="ArrowFunctionExpression")return!1;let n=at(r,I(e));return n!==!1&&r.slice(n,n+2)==="=>"?(we(t,e),!0):!1}function Rp({comment:e,enclosingNode:t,text:r}){return _e(r,I(e))!==")"?!1:t&&(Ri(t)&&K(t).length===0||Dt(t)&&le(t).length===0)?(we(t,e),!0):(t?.type==="MethodDefinition"||t?.type==="TSAbstractMethodDefinition")&&K(t.value).length===0?(we(t.value,e),!0):!1}function Jp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return t?.type==="ComponentTypeParameter"&&(r?.type==="DeclareComponent"||r?.type==="ComponentTypeAnnotation")&&n?.type!=="ComponentTypeParameter"?($(t,e),!0):(t?.type==="ComponentParameter"||t?.type==="RestElement")&&r?.type==="ComponentDeclaration"&&_e(s,I(e))===")"?($(t,e),!0):!1}function _i({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return t?.type==="FunctionTypeParam"&&r?.type==="FunctionTypeAnnotation"&&n?.type!=="FunctionTypeParam"?($(t,e),!0):(t?.type==="Identifier"||t?.type==="AssignmentPattern"||t?.type==="ObjectPattern"||t?.type==="ArrayPattern"||t?.type==="RestElement"||t?
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(We(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ac([...Xr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var is=class extends Error{name="InvalidDocError";constructor(t){super(pc(t)),this.doc=t}},gt=is;var qi={};function cc(e,t,r,n){let s=[e];for(;s.length>0;){let i=s.pop();if(i===qi){r(s.pop());continue}r&&s.push(i,qi);let o=We(i);if(!o)throw new gt(i);if(t?.(i)!==!1)switch(o){case Be:case Me:{let u=o===Be?i:i.parts;for(let p=u.length,c=p-1;c>=0;--c)s.push(u[c]);break}case be:s.push(i.flatContents,i.breakContents);break;case Fe:if(n&&i.expandedStates)for(let u=i.expandedStates.length,p=u-1;p>=0;--p)s.push(i.expandedStates[p]);else s.push(i.contents);break;case Xe:case He:case Ve:case Pe:case $e:s.push(i.contents);break;case Ye:case tt:case rt:case Ge:case me:case Ne:break;default:throw new gt(i)}}}var Vr=cc;function ft(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let o=s(i);return r.set(i,o),o}function s(i){switch(We(i)){case Be:return t(i.map(n));case Me:return t({...i,parts:i.parts.map(n)});case be:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Fe:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(n),u=o[0]):u=n(u),t({...i,contents:u,expandedStates:o})}case Xe:case He:case Ve:case Pe:case $e:return t({...i,contents:n(i.contents)});case Ye:case tt:case rt:case Ge:case me:case Ne:return t(i);default:throw new gt(i)}}}function Yi(e,t,r){let n=r,s=!1;function i(o){if(s)return!1;let u=t(o);u!==void 0&&(s=!0,n=u)}return Vr(e,i),n}function lc(e){if(e.type===Fe&&e.break||e.type===me&&e.hard||e.type===Ne)return!0}function ne(e){return Yi(e,lc,!1)}function Ui(e){if(e.length>0){let t=N(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Hi(e){let t=new Set,r=[];function n(i){if(i.type===Ne&&Ui(r),i.type===Fe){if(r.push(i),t.has(i))return!1;t.add(i)}}function s(i){i.type===Fe&&r.pop().break&&Ui(r)}Vr(e,n,s,!0)}function mc(e){return e.type===me&&!e.hard?e.soft?"":" ":e.type===be?e.flatContents:e}function _t(e){return ft(e,mc)}function Dc(e){switch(We(e)){case Me:if(e.parts.every(t=>t===""))return"";break;case Fe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Fe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Xe:case He:case Ve:case $e:if(!e.contents)return"";break;case be:if(!e.flatContents&&!e.breakContents)return"";break;case Be:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof N(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case Ye:case tt:case rt:case Ge:case me:case Pe:case Ne:break;default:throw new gt(e)}return e}function Qt(e){return ft(e,t=>Dc(t))}function qe(e,t=$r){return ft(e,r=>typeof r=="string"?L(t,r.split(`
|
||||
`)):r)}function fc(e){if(e.type===me)return!0}function Xi(e){return Yi(e,fc,!1)}function Ar(e,t){return e.type===Pe?{...e,contents:t(e.contents)}:t(e)}function Vi(e){let t=!0;return Vr(e,r=>{switch(We(r)){case Ye:if(r==="")break;case rt:case Ge:case me:case Ne:return t=!1,!1}}),t}var de=Le,Kr=Le,$i=Le,Ki=Le;function m(e){return de(e),{type:He,contents:e}}function xe(e,t){return Ki(e),de(t),{type:Xe,contents:t,n:e}}function Qi(e){return xe(Number.NEGATIVE_INFINITY,e)}function Qr(e){return xe(-1,e)}function zi(e,t,r){de(e);let n=e;if(t>0){for(let s=0;s<Math.floor(t/r);++s)n=m(n);n=xe(t%r,n),n=xe(Number.NEGATIVE_INFINITY,n)}return n}var ke={type:Ne};var Tr={type:tt};function zr(e){return $i(e),{type:Me,parts:e}}function l(e,t={}){return de(e),Kr(t.expandedStates,!0),{type:Fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function nt(e,t){return l(e[0],{...t,expandedStates:e})}function P(e,t="",r={}){return de(e),t!==""&&de(t),{type:be,breakContents:e,flatContents:t,groupId:r.groupId}}function yt(e,t){return de(e),{type:Ve,contents:e,groupId:t.groupId,negate:t.negate}}function L(e,t){de(e),Kr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function pt(e,t){return de(t),e?{type:Pe,label:e,contents:t}:t}var A={type:me},f={type:me,soft:!0},os={type:me,hard:!0},E=[os,ke],yc={type:me,hard:!0,literal:!0},$r=[yc,ke];function us(e){return de(e),{type:$e,contents:e}}var je={type:Ge};var Ec="cr",Fc="crlf";var dc="\r",Cc=`\r
|
||||
`,Ac=`
|
||||
`,Tc=Ac;function Zi(e){return e===Ec?dc:e===Fc?Cc:Tc}var xc={type:0},gc={type:1},as={value:"",length:0,queue:[],get root(){return as}};function eo(e,t,r){let n=t.type===1?e.queue.slice(0,-1):[...e.queue,t],s="",i=0,o=0,u=0;for(let d of n)switch(d.type){case 0:y(),r.useTabs?p(1):c(r.tabWidth);break;case 3:{let{string:b}=d;y(),s+=b,i+=b.length;break}case 2:{let{width:b}=d;o+=1,u+=b;break}default:throw new Error(`Unexpected indent comment '${d.type}'.`)}return F(),{...e,value:s,length:i,queue:n};function p(d){s+=" ".repeat(d),i+=r.tabWidth*d}function c(d){s+=" ".repeat(d),i+=d}function y(){r.useTabs?D():F()}function D(){o>0&&p(o),C()}function F(){u>0&&c(u),C()}function C(){o=0,u=0}}function to(e,t,r){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let n;return typeof t=="number"?t<0?n=gc:n={type:2,width:t}:n={type:3,string:t},eo(e,n,r)}function ro(e,t){return eo(e,xc,t)}function hc(e){let t=0;for(let r=e.length-1;r>=0;r--){let n=e[r];if(n===" "||n===" ")t++;else break}return t}function ps(e){let t=hc(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var ve=Symbol("MODE_BREAK"),ct=Symbol("MODE_FLAT"),cs=Symbol("DOC_FILL_PRINTED_LENGTH");function Zr(e,t,r,n,s,i){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,u=!1,p=[e],c="";for(;r>=0;){if(p.length===0){if(o===0)return!0;p.push(t[--o]);continue}let{mode:y,doc:D}=p.pop(),F=We(D);switch(F){case Ye:D&&(u&&(c+=" ",r-=1,u=!1),c+=D,r-=ot(D));break;case Be:case Me:{let C=F===Be?D:D.parts,d=D[cs]??0;for(let b=C.length-1;b>=d;b--)p.push({mode:y,doc:C[b]});break}case He:case Xe:case Ve:case Pe:p.push({mode:y,doc:D.contents});break;case rt:{let{text:C,count:d}=ps(c);c=C,r+=d;break}case Fe:{if(i&&D.break)return!1;let C=D.break?ve:y,d=D.expandedStates&&C===ve?N(0,D.expandedStates,-1):D.contents;p.push({mode:C,doc:d});break}case be:{let d=(D.groupId?s[D.groupId]||ct:y)===ve?D.breakContents:D.flatContents;d&&p.push({mode:y,doc:d});break}case me:if(y===ve||D.hard)return!0;D.soft||(u=!0);break;case $e:n=!0;break;case Ge:if(n)return!1;break}}return!1}function ls(e,t){let r=Object.create(null),n=t.printWidth,s=Zi(t.endOfLine),i=0,o=[{indent:as,mode:ve,doc:e}],u="",p=!1,c=[],y=[],D=[],F=[],C=0;for(Hi(e);o.length>0;){let{indent:h,mode:g,doc:S}=o.pop();switch(We(S)){case Ye:{let j=s!==`
|
||||
`?W(0,S,`
|
||||
`,s):S;j&&(u+=j,o.length>0&&(i+=ot(j)));break}case Be:for(let j=S.length-1;j>=0;j--)o.push({indent:h,mode:g,doc:S[j]});break;case tt:if(y.length>=2)throw new Error("There are too many 'cursor' in doc.");y.push(C+u.length);break;case He:o.push({indent:ro(h,t),mode:g,doc:S.contents});break;case Xe:o.push({indent:to(h,S.n,t),mode:g,doc:S.contents});break;case rt:O();break;case Fe:switch(g){case ct:if(!p){o.push({indent:h,mode:S.break?ve:ct,doc:S.contents});break}case ve:{p=!1;let j={indent:h,mode:ct,doc:S.contents},U=n-i,fe=c.length>0;if(!S.break&&Zr(j,o,U,fe,r))o.push(j);else if(S.expandedStates){let Y=N(0,S.expandedStates,-1);if(S.break){o.push({indent:h,mode:ve,doc:Y});break}else for(let z=1;z<S.expandedStates.length+1;z++)if(z>=S.expandedStates.length){o.push({indent:h,mode:ve,doc:Y});break}else{let ee=S.expandedStates[z],Ie={indent:h,mode:ct,doc:ee};if(Zr(Ie,o,U,fe,r)){o.push(Ie);break}}}else o.push({indent:h,mode:ve,doc:S.contents});break}}S.id&&(r[S.id]=N(0,o,-1).mode);break;case Me:{let j=n-i,U=S[cs]??0,{parts:fe}=S,Y=fe.length-U;if(Y===0)break;let z=fe[U+0],ee=fe[U+1],Ie={indent:h,mode:ct,doc:z},st={indent:h,mode:ve,doc:z},_=Zr(Ie,[],j,c.length>0,r,!0);if(Y===1){_?o.push(Ie):o.push(st);break}let re={indent:h,mode:ct,doc:ee},ae={indent:h,mode:ve,doc:ee};if(Y===2){_?o.push(re,Ie):o.push(ae,st);break}let it=fe[U+2],Bt={indent:h,mode:g,doc:{...S,[cs]:U+2}},Pr=Zr({indent:h,mode:ct,doc:[z,ee,it]},[],j,c.length>0,r,!0);o.push(Bt),Pr?o.push(re,Ie):_?o.push(ae,Ie):o.push(ae,st);break}case be:case Ve:{let j=S.groupId?r[S.groupId]:g;if(j===ve){let U=S.type===be?S.breakContents:S.negate?S.contents:m(S.contents);U&&o.push({indent:h,mode:g,doc:U})}if(j===ct){let U=S.type===be?S.flatContents:S.negate?m(S.contents):S.contents;U&&o.push({indent:h,mode:g,doc:U})}break}case $e:c.push({indent:h,mode:g,doc:S.contents});break;case Ge:c.length>0&&o.push({indent:h,mode:g,doc:os});break;case me:switch(g){case ct:if(S.hard)p=!0;else{S.soft||(u+=" ",i+=1);break}case ve:if(c.length>0){o.push({indent:h,mode:g,doc:S},...c.reverse()),c.length=0;break}S.literal?(u+=s,i=0,h.root&&(h.root.value&&(u+=h.root.value),i=h.root.length)):(O(),u+=s+h.value,i=h.length);break}break;case Pe:o.push({indent:h,mode:g,doc:S.contents});break;case Ne:break;default:throw new gt(S)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let d=D.join("")+u,b=[...F,...y];if(b.length!==2)return{formatted:d};let B=b[0];return{formatted:d,cursorNodeStart:B,cursorNodeText:d.slice(B,N(0,b,-1))};function O(){let{text:h,count:g}=ps(u);h&&(D.push(h),C+=h.length),u="",i-=g,y.length>0&&(F.push(...y.map(S=>Math.min(S,C))),y.length=0)}}function Sc(e,t,r=0){let n=0;for(let s=r;s<e.length;++s)e[s]===" "?n=n+t-n%t:n++;return n}var no=Sc;function Bc(e,t){let r=e.lastIndexOf(`
|
||||
`);return r===-1?0:no(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var so=Bc;function en(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&kc(e)){let c=bc(e,t,r);if(c)return c}let i="expressions";n.type==="TSTemplateLiteralType"&&(i="types");let o=[],u=e.map(r,i);o.push(je,"`");let p=0;return e.each(({index:c,node:y})=>{if(o.push(r()),y.tail)return;let{tabWidth:D}=t,F=y.value.raw,C=F.includes(`
|
||||
`)?so(F,D):p;p=C;let d=u[c],b=n[i][c],B=ue(t.originalText,I(y),w(n.quasis[c+1]));if(!B){let h=ls(d,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;h.includes(`
|
||||
`)?B=!0:d=h}B&&(T(b)||b.type==="Identifier"||J(b)||b.type==="ConditionalExpression"||b.type==="SequenceExpression"||Ae(b)||Te(b))&&(d=[m([f,d]),f]);let O=C===0&&F.endsWith(`
|
||||
`)?xe(Number.NEGATIVE_INFINITY,d):zi(d,C,D);o.push(l(["${",O,je,"}"]))},"quasis"),o.push("`"),o}function io(e,t,r){let n=r("quasi"),{node:s}=e,i="",o=et(s.quasi,x.Leading)[0];return o&&(ue(t.originalText,I(s.typeArguments??s.tag),w(o))?i=f:i=" "),pt(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,je,n])}function bc(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(s.length>1||s.some(i=>i.length>0)){t.__inJestEach=!0;let i=e.map(r,"expressions");t.__inJestEach=!1;let o=i.map(D=>"${"+ls(D,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),u=[{hasLineBreak:!1,cells:[]}];for(let D=1;D<n.quasis.length;D++){let F=N(0,u,-1),C=o[D-1];F.cells.push(C),C.includes(`
|
||||
`)&&(F.hasLineBreak=!0),n.quasis[D].value.raw.includes(`
|
||||
`)&&u.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...u.map(D=>D.cells.length)),c=Array.from({length:p}).fill(0),y=[{cells:s},...u.filter(D=>D.cells.length>0)];for(let{cells:D}of y.filter(F=>!F.hasLineBreak))for(let[F,C]of D.entries())c[F]=Math.max(c[F],ot(C));return[je,"`",m([E,L(E,y.map(D=>L(" | ",D.cells.map((F,C)=>D.hasLineBreak?F:F+" ".repeat(c[C]-ot(F))))))]),E,"`"]}}function Pc(e,t){let{node:r}=e,n=t();return T(r)&&(n=l([m([f,n]),f])),["${",n,je,"}"]}function zt(e,t){return e.map(()=>Pc(e,t),"expressions")}function tn(e,t){return ft(e,r=>typeof r=="string"?t?W(0,r,/(\\*)`/gu,"$1$1\\`"):ms(r):r)}function ms(e){return W(0,e,/([\\`]|\$\{)/gu,"\\$1")}function kc({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/u;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var fs=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function oo(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Oe(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>q(n)&&s==="elements",r,...fs)||e.match(t,r,...fs)}function ys(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Oe(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...fs)}function Ds(e,t){return T(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function rn({node:e,parent:t},r){return Ds(e,r)||Ic(t)&&Ds(t,r)||t.type==="ExpressionStatement"&&Ds(t,r)}function Ic(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function ao(e,t,r){let{node:n}=r,s="";for(let[p,c]of n.quasis.entries()){let{raw:y}=c.value;p>0&&(s+="@prettier-placeholder-"+(p-1)+"-id"),s+=y}let i=await e(s,{parser:"scss"}),o=zt(r,t),u=Lc(i,o);if(!u)throw new Error("Couldn't insert all the expressions");return["`",m([E,u]),f,"`"]}function Lc(e,t){if(!R(t))return e;let r=0,n=ft(Qt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/u).map((i,o)=>o%2===0?qe(i):(r++,t[i])));return t.length===r?n:null}function Oc(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&Pt(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function nn(e){return e.type==="Identifier"&&e.name==="styled"}function uo(e){return/^[A-Z]/u.test(e.object.name)&&e.property.name==="extend"}function wc({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return nn(t.object)||uo(t);case"CallExpression":return nn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(nn(t.callee.object.object)||uo(t.callee.object))||t.callee.object.type==="CallExpression"&&nn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function _c({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var po=e=>Oc(e)||wc(e)||_c(e)||oo(e);async function co(e,t,r){let{node:n}=r,s=n.quasis.length,i=zt(r,t),o=[];for(let u=0;u<s;u++){let p=n.quasis[u],c=u===0,y=u===s-1,D=p.value.cooked,F=D.split(`
|
||||
`),C=F.length,d=i[u],b=C>2&&F[0].trim()===""&&F[1].trim()==="",B=C>2&&F[C-1].trim()===""&&F[C-2].trim()==="",O=F.every(g=>/^\s*(?:#[^\n\r]*)?$/u.test(g));if(!y&&/#[^\n\r]*$/u.test(F[C-1]))return null;let h=null;O?h=Mc(F):h=await e(D,{parser:"graphql"}),h?(h=tn(h,!1),!c&&b&&o.push(""),o.push(h),!y&&B&&o.push("")):!c&&!y&&b&&o.push(""),d&&o.push(d)}return["`",m([E,L(E,o)]),E,"`"]}function Mc(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,i]of n.entries())i!==""&&(n[s-1]===""&&r?t.push([E,i]):t.push(i),r=!0);return t.length===0?null:L(E,t)}function lo({node:e,parent:t}){return rn({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var Es=0;async function mo(e,t,r,n,s){let{node:i}=n,o=Es;Es=Es+1>>>0;let u=O=>`PRETTIER_HTML_PLACEHOLDER_${O}_${o}_IN_JS`,p=i.quasis.map((O,h,g)=>h===g.length-1?O.value.cooked:O.value.cooked+u(h)).join(""),c=zt(n,r),y=new RegExp(u("(\\d+)"),"gu"),D=0,F=await t(p,{parser:e,__onHtmlRoot(O){D=O.children.length}}),C=ft(F,O=>{if(typeof O!="string")return O;let h=[],g=O.split(y);for(let S=0;S<g.length;S++){let j=g[S];if(S%2===0){j&&(j=ms(j),s.__embeddedInHtml&&(j=W(0,j,/<\/(?=script\b)/giu,"<\\/")),h.push(j));continue}let U=Number(j);h.push(c[U])}return h}),d=/^\s/u.test(p)?" ":"",b=/\s$/u.test(p)?" ":"",B=s.htmlWhitespaceSensitivity==="ignore"?E:d&&b?A:null;return B?l(["`",m([B,l(C)]),B,"`"]):pt({hug:!1},l(["`",d,D>1?m(l(C)):l(C),b,"`"]))}function Do(e){return rn(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var fo=mo.bind(void 0,"html"),yo=mo.bind(void 0,"angular");async function Eo(e,t,r){let{node:n}=r,s=W(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(p,c)=>"\\".repeat(c.length/2)+"`"),i=Nc(s),o=i!=="";o&&(s=W(0,s,new RegExp(`^${i}`,"gmu"),""));let u=tn(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?m([f,u]):[$r,Qi(u)],f,"`"]}function Nc(e){let t=e.match(/^([^\S\n]*)\S/mu);return t===null?"":t[1]}function Fo({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var jc=[{test:po,print:ao},{test:lo,print:co},{test:Do,print:fo},{test:ys,print:yo},{test:Fo,print:Eo}].map(({test:e,print:t})=>({test:e,print:Rc(t)}));function vc(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Jc(t))return;let r=jc.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function Rc(e){return async(...t)=>{let r=await e(...t);return r&&pt({embed:!0,...r.label},r)}}function Jc({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Co=vc;var Gc=/\*\/$/,Wc=/^\/\*\*?/,go=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,qc=/(^|\s+)\/\/([^\n\r]*)/g,Ao=/^(\r?\n)+/,Uc=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,To=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Yc=/(\r?\n|^) *\* ?/g,ho=[];function So(e){let t=e.match(go);return t?t[0].trimStart():""}function Bo(e){let r=e.match(go)?.[0];return r==null?e:e.slice(r.length)}function bo(e){e=W(0,e.replace(Wc,"").replace(Gc,""),Yc,"$1");let r="";for(;r!==e;)r=e,e=W(0,e,Uc,`
|
||||
$1 $2
|
||||
`);e=e.replace(Ao,"").trimEnd();let n=Object.create(null),s=W(0,e,To,"").replace(Ao,"").trimEnd(),i;for(;i=To.exec(e);){let o=W(0,i[2],qc,"");if(typeof n[i[1]]=="string"||Array.isArray(n[i[1]])){let u=n[i[1]];n[i[1]]=[...ho,...Array.isArray(u)?u:[u],o]}else n[i[1]]=o}return{comments:s,pragmas:n}}function Po({comments:e="",pragmas:t={}}){let o=Object.keys(t),u=o.flatMap(c=>xo(c,t[c])).map(c=>` * ${c}
|
||||
`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let c=t[o[0]];return`/** ${xo(o[0],c)[0]} */`}}let p=e.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(e?p:"")+(e&&o.length>0?` *
|
||||
`:"")+u+" */"}function xo(e,t){return[...ho,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var ko="format";function Hc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Io=Hc;function Xc(e){let t=Io(e);t&&(e=e.slice(t.length+1));let r=So(e),{pragmas:n,comments:s}=bo(r);return{shebang:t,text:e,pragmas:n,comments:s}}function Lo(e){let{shebang:t,text:r,pragmas:n,comments:s}=Xc(e),i=Bo(r),o=Po({pragmas:{[ko]:"",...n},comments:s.trimStart()});return(t?`${t}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}function Vc(e){if(!ce(e))return!1;let t=`*${e.value}*`.split(`
|
||||
`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Fs=new WeakMap;function $c(e){return Fs.has(e)||Fs.set(e,Vc(e)),Fs.get(e)}var Oo=$c;function wo(e,t){let r=e.node;if(At(r))return t.originalText.slice(w(r),I(r)).trimEnd();if(Oo(r))return Kc(r);if(ce(r))return["/*",qe(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Kc(e){let t=e.value.split(`
|
||||
`);return["/*",L(E,t.map((r,n)=>n===0?r.trimEnd():" "+(n<t.length-1?r.trim():r.trimStart()))),"*/"]}function ds(e,t){if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&el(r)&&xr(e))return!0;if(Qc(r))return!1;if(r.type==="Identifier"){if(r.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let i=e.findAncestor(o=>o.type==="ForOfStatement")?.left;if(i&&ye(i,o=>o===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let i=e.findAncestor(u=>u.type==="ExpressionStatement"||u.type==="ForStatement"||u.type==="ForInStatement"),o=i?i.type==="ExpressionStatement"?i.expression:i.type==="ForStatement"?i.init:i.left:void 0;if(o&&ye(o,u=>u===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let i=e.findAncestor(o=>!Ae(o));if(i!==s&&i.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let i=e.findAncestor(o=>o.type==="ExpressionStatement")?.expression;if(i&&ye(i,o=>o===r))return!0}if(r.type==="ObjectExpression"){let i=e.findAncestor(o=>o.type==="ArrowFunctionExpression")?.body;if(i&&i.type!=="SequenceExpression"&&i.type!=="AssignmentExpression"&&ye(i,o=>o===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&R(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return _o(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"&&!rl(r))return!0;break;case"TypeAnnotation":if(e.match(void 0,void 0,(i,o)=>o==="returnType"&&i.type==="ArrowFunctionExpression")&&Zc(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(n==="init"&&e.match(void 0,void 0,(i,o)=>o==="declarations"&&i.type==="VariableDeclaration",(i,o)=>o==="left"&&i.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&zc(e))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let i=e.grandparent;if(i.type==="BinaryExpression"&&i.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r)||fi(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:i,type:o}=r;if(!i&&o!=="TSTypeAssertion")return!0;let u=yr(i),p=s.operator,c=yr(p);return!!(c>u||n==="right"&&c===u||c===u&&!dr(p,i)||c<u&&i==="%"&&(p==="+"||p==="-")||Ai(p))}default:return!1}case"SequenceExpression":return s.type!=="ForStatement";case"YieldExpression":if(s.type==="AwaitExpression"||s.type==="TSTypeAssertion")return!0;case"AwaitExpression":switch(s.type){case"TaggedTemplat
Line truncated
|
||||
`)){if(n.length===0)continue;let s=this.getLeadingWhitespaceCount(n);if(s===0)return 0;n.length!==s&&s<r&&(r=s)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},pu=ws;var yn=new pu(`
|
||||
\r `),_s=e=>e===""||e===A||e===E||e===f;function Vl(e,t,r){let{node:n}=e;if(n.type==="JSXElement"&&pm(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),i=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),i];n.children=n.children.map(g=>cm(g)?{type:"JSXText",value:" ",raw:" "}:g);let o=n.children.some(H),u=n.children.filter(g=>g.type==="JSXExpressionContainer").length>1,p=n.type==="JSXElement"&&n.openingElement.attributes.length>1,c=ne(s)||o||p||u,y=e.parent.rootMarker==="mdx",D=t.singleQuote?"{' '}":'{" "}',F=y?A:P([D,f]," "),C=n.openingElement?.name?.name==="fbt",d=$l(e,t,r,F,C),b=n.children.some(g=>Br(g));for(let g=d.length-2;g>=0;g--){let S=d[g]===""&&d[g+1]==="",j=d[g]===E&&d[g+1]===""&&d[g+2]===E,U=(d[g]===f||d[g]===E)&&d[g+1]===""&&d[g+2]===F,fe=d[g]===F&&d[g+1]===""&&(d[g+2]===f||d[g+2]===E),Y=d[g]===F&&d[g+1]===""&&d[g+2]===F,z=d[g]===f&&d[g+1]===""&&d[g+2]===E||d[g]===E&&d[g+1]===""&&d[g+2]===f;j&&b||S||U||Y||z?d.splice(g,2):fe&&d.splice(g+1,2)}for(;d.length>0&&_s(N(0,d,-1));)d.pop();for(;d.length>1&&_s(d[0])&&_s(d[1]);)d.shift(),d.shift();let B=[""];for(let[g,S]of d.entries()){if(S===F){if(g===1&&Vi(d[g-1])){if(d.length===2){B.push([B.pop(),D]);continue}B.push([D,E],"");continue}else if(g===d.length-1){B.push([B.pop(),D]);continue}else if(d[g-1]===""&&d[g-2]===E){B.push([B.pop(),D]);continue}}g%2===0?B.push([B.pop(),S]):B.push(S,""),ne(S)&&(c=!0)}let O=b?zr(B):l(B,{shouldBreak:!0});if(t.cursorNode?.type==="JSXText"&&n.children.includes(t.cursorNode)?O=[Tr,O,Tr]:t.nodeBeforeCursor?.type==="JSXText"&&n.children.includes(t.nodeBeforeCursor)?O=[Tr,O]:t.nodeAfterCursor?.type==="JSXText"&&n.children.includes(t.nodeAfterCursor)&&(O=[O,Tr]),y)return O;let h=l([s,m([E,O]),E,i]);return c?h:nt([l([s,...d,i]),h])}function $l(e,t,r,n,s){let i="",o=[i];function u(c){i=c,o.push([o.pop(),c])}function p(c){c!==""&&(i=c,o.push(c,""))}return e.each(({node:c,next:y})=>{if(c.type==="JSXText"){let D=pe(c);if(Br(c)){let F=yn.split(D,!0);F[0]===""&&(F.shift(),/\n/u.test(F[0])?p(lu(s,F[1],c,y)):p(n),F.shift());let C;if(N(0,F,-1)===""&&(F.pop(),C=F.pop()),F.length===0)return;for(let[d,b]of F.entries())d%2===1?p(A):u(b);C!==void 0?/\n/u.test(C)?p(lu(s,i,c,y)):p(n):p(cu(s,i,c,y))}else/\n/u.test(D)?D.match(/\n/gu).length>1&&p(E):p(n)}else{let D=r();if(u(D),y&&Br(y)){let C=yn.trim(pe(y)),[d]=yn.split(C);p(cu(s,d,c,y))}else p(E)}},"children"),o}function cu(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?t.length===1?f:E:f}function lu(e,t,r,n){return e?E:t.length===1?r.type==="JSXElement"&&!r.closingElement||n?.type==="JSXElement"&&!n.closingElement?E:f:E}var Kl=k(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);function Ql(e,t,r){let{parent:n}=e;if(Kl(n))return t;let s=zl(e),i=ge(e,r);return l([i?"":P("("),m([f,t]),f,i?"":P(")")],{shouldBreak:s})}function zl(e){return e.match(void 0,(t,r)=>r==="body"&&t.type==="ArrowFunctionExpression",(t,r)=>r==="arguments"&&M(t))&&(e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer")||e.match(void 0,void 0,void 0,(t,r)=>r==="expression"&&t.type==="ChainExpression",(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer"))}function Zl(e,t,r){let{node:n}=e,s=[r("name")];if(n.value){let i;if(V(n.value)){let o=pe(n.value),u=W(0,W(0,o.slice(1,-1),"'","'"),""",'"'),p=wr(u,t.jsxSingleQuote);u=p==='"'?W(0,u,'"',"""):W(0,u,"'","'"),i=e.call(()=>De(e,qe(p+u+p),t),"value")}else i=r("value");s.push("=",i)}return s}function em(e,t,r){let{node:n}=e,s=(i,o)=>i.type==="JSXEmptyExpression"||!T(i)&&(q(i)||se(i)||i.type==="ArrowFunctionExpression"||i.type==="AwaitExpression"&&(s(i.argument,i)||i.argument.type==="JSXElement")||M(i)||i.type==="ChainExpression"&&M(i.expression)||i.type==="FunctionExpression"||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="DoExpression"||H(o)&&(i.type==="ConditionalExpression"||Te(i)));return s(n.expression,e.parent)?l(["{",r("expression"),je,"}"]):l(["{",m([f,r("expression")]),f,je,"}"])}function tm(e,t,r){let{node:n}=e,s=T(n.name)||T(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),r("typeArguments")," />"];if(n.attributes?.length===1&&V(n.attributes[0].value)&&!n.attributes[0].value.value.includes(`
|
||||
`)&&!s&&!T(n.attributes[0]))return l(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(u=>V(u.value)&&u.value.value.includes(`
|
||||
`)),o=t.singleAttributePerLine&&n.attributes.length>1?E:A;return l(["<",r("name"),r("typeArguments"),m(e.map(()=>[o,r()],"attributes")),...rm(n,t,s)],{shouldBreak:i})}function rm(e,t,r){return e.selfClosing?[A,"/>"]:nm(e,t,r)?[">"]:[f,">"]}function nm(e,t,r){let n=e.attributes.length>0&&T(N(0,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function sm(e,t,r){let{node:n}=e,s=["</"],i=r("name");return T(n.name,x.Leading|x.Line)?s.push(m([E,i]),E):T(n.name,x.Leading|x.Block)?s.push(" ",i):s.push(i),s.push(">"),s}function im(e,t){let{node:r}=e,n=T(r),s=T(r,x.Line),i=r.type==="JSXOpeningFragment";return[i?"<":"</",m([s?E:n&&!i?" ":"",v(e,t)]),s?E:"",">"]}function om(e,t,r){let n=De(e,Vl(e,t,r),t);return Ql(e,n,t)}function um(e,t){let{node:r}=e,n=T(r,x.Line);return[v(e,t,{indent:n}),n?E:""]}function am(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let i=["...",r()];return T(s)?[m([f,De(e,i,t)]),f]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function mu(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Zl(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return L(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return L(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return am(e,t,r);case"JSXExpressionContainer":return em(e,t,r);case"JSXFragment":case"JSXElement":return om(e,t,r);case"JSXOpeningElement":return tm(e,t,r);case"JSXClosingElement":return sm(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return im(e,t);case"JSXEmptyExpression":return um(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Qe(n,"JSX")}}function pm(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Br(t)}function Br(e){return e.type==="JSXText"&&(yn.hasNonWhitespaceCharacter(pe(e))||!/\n/u.test(pe(e)))}function cm(e){return e.type==="JSXExpressionContainer"&&V(e.expression)&&e.expression.value===" "&&!T(e.expression)}function Du(e){let{node:t,parent:r}=e;if(!H(t)||!H(r))return!1;let{index:n,siblings:s}=e,i;for(let o=n;o>0;o--){let u=s[o-1];if(!(u.type==="JSXText"&&!Br(u))){i=u;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&Ot(i.expression)}function lm(e){return Ot(e.node)||Du(e)}var nr=lm;function yu(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return on(e,t,r);case"NGChainedExpression":return l(L([";",A],e.map(()=>fm(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":fu(e)?" ":[";",A],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:i}=e,o=fu(e)||mm(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||s===2&&(n.key.name==="else"&&i.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[s-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new Qe(n,"Angular")}}function fu({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}function mm(e){let{node:t}=e;return e.parent.body[1].key.name==="of"&&t.type==="NGMicrosyntaxKeyedExpression"&&t.key.name==="track"&&t.key.type==="NGMicrosyntaxKey"}var Dm=k(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function fm({node:e}){return Er(e,Dm)}function Ms(e,t,r){let{node:n}=e;return l([L(A,e.map(r,"decorators")),du(n,t)?E:A])}function Eu(e,t,r){return Cu(e.node)?[L(E,e.map(r,"declaration","decorators")),E]:""}function Fu(e,t,r){let{node:n,parent:s}=e,{decorators:i}=n;if(!R(i)||Cu(s)||nr(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||du(n,t);return[e.key==="declaration"&&Di(s)?E:o?ke:"",L(A,e.map(r,"decorators")),A]}function du(e,t){return e.decorators.some(r=>Z(t.originalText,I(r)))}function Cu(e){if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=e.declaration?.decorators;return R(t)&&bt(e,t[0])}var Ns=new WeakMap;function Au(e){return Ns.has(e)||Ns.set(e,e.type==="ConditionalExpression"&&!ye(e,t=>t.type==="ObjectExpression")),Ns.get(e)}var ym=e=>e.type==="SequenceExpression";function Tu(e,t,r,n={}){let s=[],i,o=[],u=!1,p=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function O(){let{node:h}=e,g=Em(e,t,r,n);if(s.length===0)s.push(g);else{let{le
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
flow: Parser;
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var QA0=Object.create;var H5=Object.defineProperty;var ZA0=Object.getOwnPropertyDescriptor;var xI0=Object.getOwnPropertyNames;var rI0=Object.getPrototypeOf,eI0=Object.prototype.hasOwnProperty;var tI0=(a0,ox)=>()=>(ox||a0((ox={exports:{}}).exports,ox),ox.exports),$Y=(a0,ox)=>{for(var Yx in ox)H5(a0,Yx,{get:ox[Yx],enumerable:!0})},QY=(a0,ox,Yx,xr)=>{if(ox&&typeof ox=="object"||typeof ox=="function")for(let E1 of xI0(ox))!eI0.call(a0,E1)&&E1!==Yx&&H5(a0,E1,{get:()=>ox[E1],enumerable:!(xr=ZA0(ox,E1))||xr.enumerable});return a0};var nI0=(a0,ox,Yx)=>(Yx=a0!=null?QA0(rI0(a0)):{},QY(ox||!a0||!a0.__esModule?H5(Yx,"default",{value:a0,enumerable:!0}):Yx,a0)),uI0=a0=>QY(H5({},"__esModule",{value:!0}),a0);var ZY=tI0($j=>{(function(a0){typeof globalThis!="object"&&(this?ox():(a0.defineProperty(a0.prototype,"_T_",{configurable:!0,get:ox}),_T_));function ox(){var Yx=this||self;Yx.globalThis=Yx,delete a0.prototype._T_}})(Object);(function(a0){"use strict";var ox=320,Yx="loc",xr=289,E1=70416,S2=69748,da=163,Tt=92159,Vr=43587,G1="labeled_statement",yo="&=",Et="int_of_string",G3=110591,_o=92909,gp=11559,nD="regexp",V5=43301,bp=11703,$5=122654,ya=255,uD="%ni",Q5=68252,iD=232,Z5=42785,qn="declare_variable",Tp="while",xy=66938,ry=70301,ey=124907,Ep=126515,fD=218,Bn="pattern_identifier",ty=67643,Un="export_source",ny=216,uy=64279,cD="Out_of_memory",iy=113788,sD="comments",fy=126624,aD="win32",Xn="object_key_bigint_literal",oD=185,Sp=123214,_a="constructor",cy=69955,Gn="import_declaration",sy=68437,ay="Failure",Ap="Unix.Unix_error",oy=64255,vy=42539,ly=110579,Yn="export_default_declaration",zn="jsx_attribute_name",Ip=11727,py=43002,Pp=126500,Jn="component_param_pattern",vD="collect_comments_opt",Kn="match_unary_pattern",lD=321,Hn="keyof_type",pD="Invalid binary/octal ",kD="range",ky=170,wa="false",my=43798,mD=", characters ",Wn="object_type_property_getter",hy=65547,dy=126467,yy=65007,_y=42237,wy=8318,gy=71215,Vn="object_property_type",$n="type_alias",by=67742,Qn="function_body",hD=304,Ty=68111,Cp=120745,Ey=71959,Np=43880,dD="Match_failure",Zn="type_cast",wo=109,ga="void",Sy="generator",Ay=125124,Iy=101589,Op=94179,yD=">>>",jp=70404,x7="optional_indexed_access_type",$1="argument",r7="object_property",e7="object_type_property",Py=67004,Cy=42783,Ny=68850,_D="@",Oy=43741,jy=43487,Dp="object",wD="end",Rp=126571,Dy=71956,gD=208,Ry=126566,Fy=67702,bD="EEXIST",t7="this_expression",TD=203,My=11507,Ly=113807,Fp=119893,qy=42735,p6="rest",n7="null_literal",k6="protected",By=43615,v2=8231,Uy=68149,Xy=73727,Gy=72348,Yy=92995,Sv=224,zy=11686,Jy=43013,u7="assignment_pattern",Ky=12329,i7="function_type",Y3=192,f7="jsx_element_name",Hy=70018,ED=-57,c7="catch_clause_pattern",Mp=126540,s7="template_literal",Wy=120654,Vy=68497,$y=67679,a7="readonly_type",Qy=68735,Zy="<",Lp=": No such file or directory",x9=66915,r9="chain",SD="!",o7="object_type",e9=43712,qp=64297,t9=183969,n9=-105,u9=43503,i9=67591,Av=65278,f9=67669,v7="for_of_assignment_pattern",m6="`",c9=11502,l7="catch_body",s9=42191,go=-744106340,a9=182,Iv=":",AD="a string",o9=65663,v9=66978,l9=71947,Bp=43519,p9=71086,k9=125258,m9=12538,p7="expression_or_spread",ID="Printexc.handle_uncaught_exception",Up=69956,Xp=120122,Gp=247,PD=231,h9=" : flags Open_rdonly and Open_wronly are not compatible",k7="statement_fork_point",CD=710,ND=-692038429,Ue="static",d9=55203,y9=64324,_9=64111,OD="!==",w9=120132,g9=124903,h6="class",jD=222,m7="pattern_number_literal",ba="kind",b9=71903,h7="variable_declarator",DD=" named `",d7="typeof_expression",T9=126627,E9=70084,RD=228,Yp=70480,y7="class_private_field",S9=239,zp=120713,rn=65535,z3=-26,_7="private_name",A9=43137,w7="remote_identifier",I9=70161,g7="label_identifier",P9="src/parser/statement_parser.ml",C9=8335,N9=19903,O9=64310,Pv="_",b7="for_init_declaration",FD="infer",j9=64466,D9=43018,MD="tokens",R9=92735,F9=66954,M9=65473,L9=70285,T7="sequence",q9="compare: functional value",B9=69890,d6=1e3,U9=65487,X9=42653,LD="\\\\",qD="%=",E7="match_member_pattern_base",G9=72367,S7="function_rest_param",BD="/static/",Y9=124911,z9=65276,Jp=126558,J9=11498,UD=137,A7="export_default_declaration_decl",K9="cases",Kp=126602,I7="jsx_child",Xe="continue",H9=42962,XD="importKind",e1=122,J3="Literal",P7="pattern_object_property_identifier_key",W9=42508,bo="in",V9=55238,$9=67071,Q9=70831,Z9=72161,x_=67462,GD="<<=",r_=43009,e_=66383,Hp=67827,t_=72202,n_=69839,u_=66775,YD="-=",Cv=8202,i_=70105,f_=120538,zD=-92,C7="for_in_left_declaration",c_="rendersType",Wp=126563,s_=70708,Vp=126523,JD=166,N7="match_",KD=202,a_=110951,Ta="component",$p=126552,o_=66977,v_=213,O7="enum_member_identifier",HD=210,j7="enum_bigint_bodyLine truncated
|
||||
`,RR="**=",pu="pattern_object_property_pattern",fg="e",cg=72712,FR="Internal Error: Found object private prop",sg="ENOENT",ag=-42,ku="jsx_opening_attribute",og=67646,mu="component_type",vg=64296,lg=43887,MR="Division_by_zero",LR="EnumDefaultedMember",hu="typeof_member_identifier",pg=43792,du="match_member_pattern_property",yu="declare_export_declaration_decl",kg=93026,_u="type_annotation_hint",mg=42887,hg=43881,dg=43761,Lk=8526,qR=287,b6=119,yg=43866,_g=72847,wg=8348,k1=101,gg=94026,qk=72272,BR="src/parser/flow_lexer.ml",bg=120744,Rv=8191,V3="implies",Bk=255,Uk=11711,wu="match_unary_pattern_argument",Tg=71235,UR=288,Xk=68116,cr=100,gu="match_expression",bu="enum_body",Gk=1114111,Tu="assignment",Eg=71955,Yk=43260,Eu="pattern_array_e",Sg=126583,XR="prefix",Su="class_body",T6="shorthand",Ag=171,Ig=66256,zk=-97,GR=" =",Pg=94032,Cg=42606,Au="match_case",Ng=71839,Jk=120134,Og=55291,jg=92862,Dg=43019,Rg=126543,$3="function",Fg=111355,Mg=11389,Lg=70753,qg=43249,Bg=64829,Kk="line",Iu="function_declaration",Hk="undefined",YR="([^/]+)",Ug=110947,Xg=70002,zR="Cygwin",Pu="as_expression",Gg=12591,Wk=64285,Yg=2048,zg=73112,Vk=126589,JR=225,$k=43259,Jg=72817,Qk=64318,KR=172,HR=209,Cu="match_binding_pattern",Nu=" ",Ou="import_source",E6="delete",WR="Enum `",Zk=126553,Kg=67001,Fv="default",Hg=11630,Wg=206,ju="enum_bigint_member",Vg=67504,x8=67593,$g=113791,VR="MatchObjectPatternProperty",Qg=69572,Du="typeof_type",$R=212,QR="%i",Ru="function_this_param",Zg=72329,Ao="0x",Mv=8239,xb=75075,ZR=57343,Fu="pattern_bigint_literal",rb=12341,xF=201,Lv="hook",rF=": closedir failed",eb=42959,r8=119970,tb=43560,eF="||=",Mu="member_private_name",nb=120570,Lu="object_key_identifier",e8=223,tF="Not_found",qu="record_static_property",nF=230,Bu="jsx_element_name_member_expression",Uu="string_literal",ub=120596,ib=43807,fb=69687,cb=63743,t8=72192,Xu="member_property",sb=43262,Gu="class_declaration",uF="renders*",iF="%Li",ab=126578,Yu="jsx_attribute",Q3=254,be="empty",S6="label",zu="object_internal_slot_property_type",n8=120133,ob=43359,Ge="predicate",fF="??=",vb=43697,lb=-43,Ju="default_opt",cF="the start of a statement",pb=67826,Ku="record_element",Hu="object_",Wu="class_element",u8=11631,i8=70855,Vu="opaque_type",$u="number_literal",sF=", ",f8=8319,c8=120004,s8=133,Qu="type_params",Zu="pattern_object_rest_property",W2="import",kb=72e3,mb=67413,hb=12343,db=70080,xi="intersection_type",l2=-36,yb=70005,A6="properties",_b=11679,wb=8483,gb=110587,aF=43520,ri="computed_key",oF=207,ei="class_identifier",bb="Invalid number ",ti="function_param_pattern",qv=12288,Tb=113817,Eb=70730,Sb=178207,a8=71236,Ab=167,ni="object_indexer_property_type",Ib=64286,vF="TypeAnnotation",lF=220,ui="type_identifier",ii="spread_property",fi="jsx_attribute_value_expression",Pb=126519,o8=70108,v8=126,l8=42999,Sa="prototype",Cb=" : flags Open_text and Open_binary are not compatible",pF="**",p8=43823,Nb=": Not a directory",ci="render_type",k8=72349,Z3="test",Ob=43776,jb=92879,Db=11263,kF=241,Rb=93052,si="nullable_type",Fb=43704,Mb=64321,mF="Property",Lb=72191,hF=165,I6="instanceof",qb=69247,dF=302,Ye="name",m8=126634,Bb=8516,h8="typeArguments",Ub=71127,ai="jsx_spread_attribute",Xb=66559,Gb=44031,Yb=43645,e2=8233,zb=71494,Jb="opaque",d8=72967,Kb=70106,oi="logical",yF="@[%s =@ ",P6="0o",y8=126554,Hb=71351,_8=8484,Wb=72242,w8=120687,xl=252,Vb=183983,C6="%S",vi="function_this_param_type",_F=292,g8="decorators",$b=43255,li="catch_clause",ze="-",Qb=67711,wF=": file descriptor already closed",b8=64311,pi="record_declaration",T8=120539,Zb="arguments",E8=73062,xT=173823,rT=42124,eT=72095,tT=125259,nT=42969,S8=70280,gF=12520,uT=69749,iT=70066,ki="binary",mi="for_in_statement",fT=43010,bF="^=",cT=126570,hi="for_statement",A8=126584,di="function_return_annotation",sT=72144,aT=8505,TF=-101,yi="class_expression",oT=120076,vT=69807,lT=40981,pT=-24976191,kT=72768,mT=126550,I8='"',_i="call_type_arg",EF="f",Bv="this",P8=126628,SF="===",AF=56320,wi="declare_module_exports",hT=120512,p2=105,dT=119974,yT=71450,_T=71942,IF=195,C8=120629,PF="/=",CF=">>",gi="declare_interface",NF=4096,bi="pattern_array_rest_element",wT=71338,N8=126520,Ti="as_const_expression",OF="Popping lex mode from empty stack",jF="renders?",gT=68405,Ei="member",Si="class_extends",Uv=12287,O8=126590,bT=66377,DF="fields",Io="async",Ai="pattern_array_element",rl=240,RF=308,TT=69864,Xv="readonly",ET=70460,ST=120779,AT=66378,Ii="new_",j8=126551,Pi="pattern_object_rest_property_pattern",Ci="for_statement_init",IT=43595,D8=68296,FF=148,MF="\0\0\0\0",PT=120712,CT=64217,NT=69295,LF="||",OT=";",jT=70461,DT=66939,RT="record",qF="collect_comments",BF=279,Ni="generic_type",FT=68295,MT=44002,R8=72162,Oi="object_call_property_type",F8=8305,M8=119995,L8="with",ji="class_property",UF="qualification",Di="jsx_attribute_name_namespaced",Ri="if_statement",Fi="typeof_qualified_identifier",XF=238,LT=65615,GF=176,t2="expression",q8=126559,Mi="jsx_attribute_value",Li="<2>",qi="component_param",B8="Map.bal",N6=132,qT=70412,BT=70440,YF="<<",U8="finally"Line truncated
|
||||
`,Im=120093,G6="column",Vf="component_rest_param",XM="methods",pA=70451,kA=70312,mA=69967,Pm=70279,hA=66463,dA=92975,Cm=70286,$f="pattern_object_property_computed_key",Qf="object_key_string_literal",yA="jsError",Zf="type_args",_A=8304,GM="==",wr=115,xc="declare_component",wA=120092,gA=43638,bA=66811,Ia=-87,TA=43334,EA=66863,SA=77823,YM=143,rc="optional_call",AA=126562,Nm=70162,ec=104,zM="static ",IA=66963,Kv="await",Om=70107,V2="0",PA=72250,CA=8507,NA=100351,jm="AssignmentPattern",tc="type",JM="%u",OA="NonNullExpression",nc="function_expression_or_method",jA=43470,KM=146,HM=242,WM="camlinternalMod.ml",uc="match_or_pattern",DA=72750,RA=69414,FA=65370,ic="syntax",VM=32752,MA=42963,$M="End_of_file",LA=12294,qA=8471,QM="elementType",BA=43782,ZM="++",UA=43641,XA=71944,fc="record_property",GA=126601,YA=78894,xL=-45,Hv="null",rL=177,eL="satisfies",zA=131071,cc="import_specifier",sc="class_method",ac="type_",JA=126514,KA=8454,tL="inexact",HA=67807,WA=8525,VA=65470,$A=71352,oc="tuple_spread_element",nL=219,QA="abstract",ZA=73458,Je="return",Y6=65536,Dm=126548,vc="array_element",xI=-253313196,rI=186,Rm="catch",lc="infer_type",eI=12295,uL="Invalid legacy octal ",tI=69762,nI=43311,uI=65437,pc="variable_declaration",iL=-696510241,kc="function_params",iI=64316,fL=311,Fm=11565,cL="infinity",fI="@]",cI=65908,mc="extends",sI=66204,aI=43784,oI=11742,Mm=126503,Ke="debugger",vI=70457,z6=912068366,lI=68786,Lm="keyof",qm=69415,pI=12686,sn=127343600,hc="declare_type_alias",sL="the",aL=233,dc="jsx_element_name_namespaced",kI=72283,mI=161,yc="class_static_block",_c="function_param_type",Pt=128,hI=-673950933,Bm=126591,oL="Sys_error",dI=74649,yI=74862,J6="is",_I=43738,wI=68479,vL=196,Um=70854,wc="enum_boolean_member",Xm=72163,gI=92783,lL=281,gc="component_param_name",bI=68863,an=32768,pL=2048,TI=64284,kL="@{",EI="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",Gm=8455,bc="update_expression",mL=276,SI=65500,K6="from",AI=68447,Ym=12592,II=92766,hL=">>=",n2=110,PI=66431,CI=43586,Tc="jsx_identifier",NI=" : file already exists",R1=128,OI=71958,jI=66717,Ec="enum_boolean_body",DI=64262,Yr="id",Sc="component_renders_annotation",RI=42888,FI=8584,MI=73008,Ac="enum_symbol_body",Ic="declare_namespace",zm=72713,LI=55215,Pc="object_property_value_type",Cc="match_wildcard_pattern",Nc="for_in_assignment_pattern",Jm=8485,qI=43395,BI=229,Pa="true",UI=43743,Oc="enum_number_member",dL=234,XI=72969,yL="expected *",Ee=102,_L=200,H6="symbol",Wv="source",jc="tparam_const_modifier",GI=43714,Dc="jsx_fragment",Rc="jsx_attribute_name_identifier",W6="public",YI=43442,Fc="pattern_object_property",zI=65786,JI=70783,KI=43713,HI=72160,wL="*-/",Mc="export_named_specifier",Lc="arrow_function",WI=122623,Km=70006,gL="${",VI=43814,qc="generic_qualified_identifier_type",$I=199,Bc="jsx_spread_child",Hm=8489,Wm=184,bL=2047,QI=66955,Uc="try_catch",ZI=70497,TL=313,EL=237,xP=67431,rP=125183,SL=-602162310,on="params",eP="consequent",tP=68029,nP=67829,uP=68095,Xc="enum_string_body",iP=93823,fP=68351,cP=65495,Gc="declare_module",Yc="match_as_pattern_target",zc="body_expression",sP=66175,aP=191,Vm=70441,$m=65141,Qm="&",Jc="super_expression",Zm=126564,oP=72105,qI0="fs",He="throw",vP=68287,lP=67839,Ca=116,pP=110882,kP=69404,mP=123197,Vv=65279,il="src/parser/type_parser.ml",hP=68115,xh=126547,rh=126556,dP=73055,Kc="member_property_expression",Hc="enum_defaulted_member",yP=43071,_P=11726,Wc="component_type_rest_param",wP=68607,Vc="object_key",AL=160,$2="variance",gP=70655,bP=70414,fl="super",TP=123583,EP=65594,V6="method",SP=73648,$6=121,AP=93951,$c="pattern_array_element_pattern",IP=43764,PP=42993,eh=120145,CP=74879,IL=168,th=8486,NP=72001,Qc="tagged_template",Zc="module_ref_literal",OP=65312,Oo="implements",jP=43700,DP=120003,PL="Invalid_argument",xs=16777215,RP=83526,nh=69744,uh=12336,rs="switch_case",CL=-61,es="optional_member",FP=64274,ih=64322,fh=126530,MP=71998,ch=72970,LP=13311,qP=73647,BP=120074,cl="let",NL="global",ts="expression_statement",ns="component_type_params",UP=512,XP=69634,GP=67461,YP=123627,zP=64913,OL="children",jL="PropertyDefinition",DL=1026,RL="%li",us="declare_class",JP=43258,is="indexed_access_type",KP=124926,h2=112,HP="b",fs="predicate_expression",cs="if_alternate_statement",Q6="private",FL=-594953737,ML=140,WP="nan",VP=72103,sh=11735,ss="statement",$P="rmdir",ah=66512,QP="match",ZP=198,xC=11734,as="import_named_specifier",rC=69599,eC=68799,tC=194559,os="match_array_pattern",LL=174,vs="function_",ls="bigint_literal",t1=248,oh=67638,vh=126539,nC=11557,qL=214,uC=5760,We="break",vn="block",ps="match_member_pattern",iC=123565,fC=66815,m1="value",BL=1039100673,cC=69746,sC=70448,aC=74751,ks="init",oC=69551,lh=65548,ms="jsx_member_expression",ph=68096,d2=108,kh=126521,vC=71487,hs="match_statement",lC=178205,pC=12548,UL=" : is a directory",ln=".",kC=12348,sl=-835925911,B2="typeParameters",mC=66855,Y1="typeAnnotation",$v="bigint",ds="jsx_attribute_value_literal",mh=194,XL="T_JSX_TEXT",hC=68466,hh=126537,GL=67714067,dC=69487,dh="export",yC=43822,yhLine truncated
|
||||
`,pK="@.",kK="@@",mK="@%",hK=_D,dK="%c",yK="%s",_K=QR,wK=RL,gK=uD,bK=iF,TK="%f",EK="%B",SK="%{",AK="%}",IK="%(",PK="%)",CK="%a",NK="%t",OK="%?",jK="%r",DK="%_r",RK=[0,m2,850,23],FK=[0,m2,837,26],MK=[0,m2,847,28],LK=[0,m2,815,21],qK=[0,m2,819,21],BK=[0,m2,823,19],UK=[0,m2,827,22],XK=[0,m2,832,30],GK=[0,m2,851,23],YK=[0,m2,836,26],zK=[0,m2,846,28],JK=[0,m2,814,21],KK=[0,m2,818,21],HK=[0,m2,822,19],WK=[0,m2,826,22],VK=[0,m2,831,30];function JN(x){return x[2]===5?12:-6}function aB(x){return[0,0,b1(x)]}function oB(x,r){var e=jt(x[2]),t=x[1]+r|0;if(e<t){var u=e*2|0,i=t<=u?u:t,c=b1(i);Qq(x[2],0,c,0,e),x[2]=c}}function El(x,r){oB(x,1),ja(x[2],x[1],r),x[1]=x[1]+1|0}function X2(x,r){var e=Rx(r);oB(x,e),_n(r,0,x[2],x[1],e),x[1]=x[1]+e|0}function vB(x){return gl(x[2],0,x[1])}function lB(x){if(typeof x=="number")switch(x){case 0:return aK;case 1:return oK;case 2:return vK;case 3:return lK;case 4:return pK;case 5:return kK;default:return mK}switch(x[0]){case 0:return x[1];case 1:return x[1];default:return Gx(hK,$h(1,x[1]))}}function KN(x,r){for(var e=r;;){if(typeof e=="number")return;switch(e[0]){case 0:var t=e[1];X2(x,dK);var e=t;break;case 1:var u=e[1];X2(x,yK);var e=u;break;case 2:var i=e[1];X2(x,_K);var e=i;break;case 3:var c=e[1];X2(x,wK);var e=c;break;case 4:var v=e[1];X2(x,gK);var e=v;break;case 5:var o=e[1];X2(x,bK);var e=o;break;case 6:var l=e[1];X2(x,TK);var e=l;break;case 7:var k=e[1];X2(x,EK);var e=k;break;case 8:var h=e[2],E=e[1];X2(x,SK),KN(x,E),X2(x,AK);var e=h;break;case 9:var T=e[3],I=e[1];X2(x,IK),KN(x,I),X2(x,PK);var e=T;break;case 10:var N=e[1];X2(x,CK);var e=N;break;case 11:var P=e[1];X2(x,NK);var e=P;break;case 12:var R=e[1];X2(x,OK);var e=R;break;case 13:var q=e[1];X2(x,jK);var e=q;break;default:var X=e[1];X2(x,DK);var e=X}}}function f2(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,f2(x[1])];case 1:return[1,f2(x[1])];case 2:return[2,f2(x[1])];case 3:return[3,f2(x[1])];case 4:return[4,f2(x[1])];case 5:return[5,f2(x[1])];case 6:return[6,f2(x[1])];case 7:return[7,f2(x[1])];case 8:var r=x[1];return[8,r,f2(x[2])];case 9:var e=x[2],t=x[1];return[9,e,t,f2(x[3])];case 10:return[10,f2(x[1])];case 11:return[11,f2(x[1])];case 12:return[12,f2(x[1])];case 13:return[13,f2(x[1])];default:return[14,f2(x[1])]}}function G2(x){if(typeof x=="number")return[0,function(h0){},function(h0){},function(h0){},function(h0){}];switch(x[0]){case 0:var r=G2(x[1]),e=r[2],t=r[1];return[0,function(h0){t(D)},function(h0){e(D)},r[3],r[4]];case 1:var u=G2(x[1]),i=u[2],c=u[1];return[0,function(h0){c(D)},function(h0){i(D)},u[3],u[4]];case 2:var v=G2(x[1]),o=v[2],l=v[1];return[0,function(h0){l(D)},function(h0){o(D)},v[3],v[4]];case 3:var k=G2(x[1]),h=k[2],E=k[1];return[0,function(h0){E(D)},function(h0){h(D)},k[3],k[4]];case 4:var T=G2(x[1]),I=T[2],N=T[1];return[0,function(h0){N(D)},function(h0){I(D)},T[3],T[4]];case 5:var P=G2(x[1]),R=P[2],q=P[1];return[0,function(h0){q(D)},function(h0){R(D)},P[3],P[4]];case 6:var X=G2(x[1]),B=X[2],z=X[1];return[0,function(h0){z(D)},function(h0){B(D)},X[3],X[4]];case 7:var x0=G2(x[1]),W=x0[2],Z=x0[1];return[0,function(h0){Z(D)},function(h0){W(D)},x0[3],x0[4]];case 8:var t0=G2(x[2]),i0=t0[2],u0=t0[1];return[0,function(h0){u0(D)},function(h0){i0(D)},t0[3],t0[4]];case 9:var k0=x[2],o0=x[1],S0=G2(x[3]),s0=S0[4],v0=S0[3],m0=S0[2],p0=S0[1],E0=G2(_2(f2(o0),k0)),b0=E0[4],C0=E0[3],D0=E0[2],U0=E0[1];return[0,function(h0){p0(D),U0(D)},function(h0){D0(D),m0(D)},function(h0){v0(D),C0(D)},function(h0){b0(D),s0(D)}];case 10:var T0=G2(x[1]),M0=T0[2],y0=T0[1];return[0,function(h0){y0(D)},function(h0){M0(D)},T0[3],T0[4]];case 11:var G=G2(x[1]),j0=G[2],Q0=G[1];return[0,function(h0){Q0(D)},function(h0){j0(D)},G[3],G[4]];case 12:var q0=G2(x[1]),ix=q0[2],xx=q0[1];return[0,function(h0){xx(D)},function(h0){ix(D)},q0[3],q0[4]];case 13:var fx=G2(x[1]),yx=fx[4],R0=fx[3],lx=fx[2],kx=fx[1];return[0,function(h0){kx(D)},function(h0){lx(D)},function(h0){R0(D)},function(h0){yx(D)}];default:var Q=G2(x[1]),I0=Q[4],M=Q[3],d0=Q[2],g0=Q[1];return[0,function(h0){g0(D)},function(h0){d0(D)},function(h0){M(D)},function(h0){I0(D)}]}}function _2(x,r){x:{r:{e:{t:{n:{u:{i:{if(typeof x!="number"){switch(x[0]){case 0:var e=x[1];if(typeof r!="number")switch(r[0]){case 0:return[0,_2(e,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 1:var t=x[1];if(typeof r!="number")switch(r[0]){case 1:return[1,_2(t,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 2:var u=x[1];if(typeof r!="number")switch(r[0]){case 2:return[2,_2(u,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 3:var i=x[1];if(typeof r!="number")switch(r[0]){case 3:return[3,_2(i,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 4:var c=x[1];if(typeof r!="number")switch(r[0]
Line truncated
|
||||
`];function ZN(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return d(vr(AW),e);if(e3(e)===xl)return d(vr(EW),e);if(e3(e)!==ZE)return SW;for(var t=gN("%.12g",e),u=0,i=Rx(t);;){if(i<=u)return Gx(t,TW);var c=F1(t,u);x:{if(48<=c){if(58>c)break x}else if(c===45)break x;return t}var u=u+1|0}}function mB(x,r){if(x.length-1<=r)return IW;var e=mB(x,r+1|0),t=ZN(x,r);return p(vr(PW),t,e)}function _4(x){x:{r:{for(var r=vl(QN);r;){e:{var e=r[2],t=r[1];try{var u=d(t,x)}catch{break e}if(u)break r}var r=e}var i=0;break x}var i=[0,u[1]]}if(i)return i[1];if(x===ON)return DW;if(x===Bq)return RW;if(x[1]===qq){var c=x[2],v=c[3],o=c[2],l=c[1];return La(vr(jN),l,o,v,v+5|0,FW)}if(x[1]===Nr){var k=x[2],h=k[3],E=k[2],T=k[1];return La(vr(jN),T,E,h,h+6|0,MW)}if(x[1]===s4){var I=x[2],N=I[3],P=I[2],R=I[1];return La(vr(jN),R,P,N,N+6|0,LW)}if(e3(x)===0){var q=x.length-1,X=x[1][1];if(2<q>>>0)var B=mB(x,2),z=ZN(x,1),x0=p(vr(CW),z,B);else switch(q){case 0:var x0=NW;break;case 1:var x0=OW;break;default:var W=ZN(x,1),x0=d(vr(jW),W)}var Z=[0,X,[0,x0]]}else var Z=[0,x[1],0];var t0=Z[2],i0=Z[1];return t0?Gx(i0,t0[1]):i0}function xO(x,r){var e=Hz(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var c=S1(e,i)[1+i];let x0=i;var v=function(Z){return Z?x0===0?qW:BW:x0===0?UW:XW};if(c[0]===0){if(c[3]===c[6])var o=c[3],h=d(vr(GW),o);else var l=c[6],k=c[3],h=p(vr(KW),k,l);var E=c[7],T=c[4],I=c[8]?YW:JW,N=c[2],P=c[9],R=v(c[1]),X=[0,XJ(vr(zW),R,P,N,I,h,T,E)]}else if(c[1])var X=0;else var q=v(0),X=[0,d(vr(HW),q)];if(X){var B=X[1];d(kB(x,WW),B)}var z=i+1|0;if(t===i)break;var i=z}}function rO(x){for(;;){var r=vl(QN),e=1-Ph(QN,r,[0,x,r]);if(!e)return e}}var VW=[0,rx,`(Cannot print locations:
|
||||
bytecode executable program file not found)`,`(Cannot print locations:
|
||||
bytecode executable program file appears to be corrupt)`,`(Cannot print locations:
|
||||
bytecode executable program file has wrong magic number)`,`(Cannot print locations:
|
||||
bytecode executable program file cannot be opened;
|
||||
-- too many open files. Try running with OCAMLRUNPARAM=b=2)`].slice(),$W=[0,[11,NS,[2,0,[12,10,0]]],UM],QW=[0],ZW="Fatal error: out of memory in uncaught exception handler",xV=[0,[11,NS,[2,0,[12,10,0]]],UM],rV=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s
|
||||
`];NN(ID,function(x,r){try{try{var e=r?QW:gq(0);try{RN(D)}catch{}try{var t=_4(x);d($N($W),t),xO(dn,e);var u=_J(0);if(u<0){var i=Hh(u);zq(S1(VW,i)[1+i])}var c=pn(dn),v=c}catch(T){var o=M1(T),l=_4(x);d($N(xV),l),xO(dn,e);var k=_4(o);d($N(rV),k),xO(dn,gq(0));var v=pn(dn)}var h=v}catch(T){var E=M1(T);if(E!==ON)throw J0(E,0);var h=zq(ZW)}return h}catch{return 0}});var eV=[t1,"Stdlib.Fun.Finally_raised",js(0)],tV="Fun.Finally_raised: ";rO(function(x){return x[1]===eV?[0,Gx(tV,_4(x[2]))]:0});var nV="Digest.BLAKE2: wrong hash size";function eO(x){var r=x[1]<1?1:0,e=r||(64<x[1]?1:0);e&&U2(nV)}eO([0,16]),eO([0,32]),eO([0,64]);function hB(x){var r=I2(x);return yJ(r,0,Rx(r))}var uV=ct(1,0,0),iV=ct(0,0,0),fV=ct(0,0,0),cV=ct(2,0,0),sV=ct(1,0,0);function dB(x){return jz(7,0,[0,4])}function yB(x,r,e,t,u){e4(x,0,Aq(r,uV)),e4(x,1,e);var i=r3(t,iV)?t:sV;e4(x,2,i);var c=r3(u,fV)?u:cV;e4(x,3,c)}function _B(x,r,e,t){var u=dB(D);return yB(u,x,r,e,t),u}var aV=ct(14371852,15349651,22696),oV=ct(12230193,11438743,35013),vV=ct(1424933,15549263,2083),lV=ct(9492471,4696708,aF);Rs([0,function(x){var r=Uh(x),e=Uh(x),t=Uh(x);return _B(r,e,t,Uh(x))}],function(x){return _B(lV,vV,oV,aV)});var td=0,wB=-1,tO=[t1,"Stdlib.Format.String_tag",js(0)];function w4(x,r){return x[13]=x[13]+r[3]|0,BN(r,x[28])}var gB=1000000010;function pV(x,r){return x<=r?x:r}var kV=[t1,"Stdlib.Queue.Empty",js(0)],mV=[0,rx,0,rx],hV=rx,dV=rx,yV=rx,_V=rx,wV=[0,rx],gV=ig;function nO(x,r){return Z0(x[17],r,0,Rx(r))}function nd(x){return d(x[19],0)}function bB(x,r,e){x[9]=x[9]-r|0,nO(x,e),x[11]=0}function ud(x,r){var e=C(r,rx);return e&&bB(x,Rx(r),r)}function f3(x,r,e){var t=r[3],u=r[2];return ud(x,r[1]),nd(x),x[11]=1,x[10]=pV(x[8],(x[6]-e|0)+u|0),x[9]=x[6]-x[10]|0,d(x[21],x[10]),ud(x,t)}function TB(x,r){return f3(x,mV,r)}function Al(x,r){var e=r[2],t=r[3];return ud(x,r[1]),x[9]=x[9]-e|0,d(x[20],e),ud(x,t)}function bV(x,r,e){if(typeof e=="number")switch(e){case 0:var t=Tl(x[3]);if(!t)return;var u=t[1][1],i=function(Q0,q0){if(!q0)return[0,Q0,0];var ix=q0[1],xx=q0[2];return sJ(Q0,ix)?[0,Q0,q0]:[0,ix,i(Q0,xx)]};u[1]=i(x[6]-x[9]|0,u[1]);return;case 1:bl(x[2]);return;case 2:bl(x[3]);return;case 3:var c=Tl(x[2]);return c?TB(x,c[1][2]):nd(x);case 4:var v=x[10]!==(x[6]-x[9]|0)?1:0;if(!v)return v;var o=x[28],l=o[2];if(l){var k=l[1];if(l[2]){var h=l[2];o[1]=o[1]-1|0,o[2]=h;var E=[0,k]}else{qN(o);var E=[0,k]}}else var E=0;if(!E)return;var T=E[1],I=T[1];x[12]=x[12]-T[3]|0,x[9]=x[9]+I|0;return;default:var N=bl(x[5]);return N?nO(x,d(x[25],N[1])):void 0}switch(e[0]){case 0:return bB(x,r,e[1]);case 1:var P=e[2],R=e[1],q=P[1],X=P[2],B=Tl(x[2]);if(!B)return;var z=B[1],x0=z[2];switch(z[1]){case 0:return Al(x,R);case 1:return f3(x,P,x0);case 2:return f3(x,P,x0);case 3:return x[9]<(r+Rx(q)|0)?f3(x,P,x0):Al(x,R);case 4:return x[11]?Al(x,R):x[9]<(r+Rx(q)|0)||((x[6]-x0|0)+X|0)<x[10]?f3(x,P,x0):Al(x,R);default:return Al(x,R)}case 2:var W=x[6]-x[9]|0,Z=e[2],t0=e[1],i0=Tl(x[3]);if(!i0)return;var u0=i0[1][1],k0=u0[1];if(k0)for(var o0=u0[1],S0=k0[1];;){if(o0){var s0=o0[1],v0=o0[2];if(W>s0){var o0=v0;continue}var m0=s0}else var m0=S0;var p0=m0;break}else var p0=W;var E0=p0-W|0;return 0<=E0?Al(x,[0,dV,E0+t0|0,hV]):f3(x,[0,_V,p0+Z|0,yV],x[6]);case 3:var b0=e[2],C0=e[1];if(x[8]<(x[6]-x[9]|0)){var D0=Tl(x[2]);if(D0){var U0=D0[1],T0=U0[2],M0=U0[1];x[9]<T0&&3>=M0-1>>>0&&TB(x,T0)}else nd(x)}var y0=x[9]-C0|0,G=b0===1?1:x[9]<r?b0:5;return u3([0,G,y0],x[2]);case 4:return u3(e[1],x[3]);default:var j0=e[1];return nO(x,d(x[24],j0)),u3(j0,x[5])}}function EB(x){for(;;){var r=x[28][2],e=r?[0,r[1]]:0;if(!e)return;var t=e[1],u=t[1],i=0<=u?1:0,c=t[3],v=t[2],o=x[13]-x[12]|0,l=i||(x[9]<=o?1:0);if(!l)return l;var k=x[28],h=k[2];if(!h)throw J0(kV,1);if(h[2]){var E=h[2];k[1]=k[1]-1|0,k[2]=E}else qN(k);var T=0<=u?u:gB;bV(x,T,v),x[12]=c+x[12]|0}}function SB(x,r){return w4(x,r),EB(x)}function AB(x,r,e){return SB(x,[0,r,[0,e],r])}function uO(x){return m4(x),u3([0,-1,[0,wB,wV,0]],x)}function iO(x,r){var e=Tl(x[1]);if(e){var t=e[1],u=t[2],i=u[1];if(t[1]<x[12])return uO(x[1]);var c=u[2];if(typeof c!="number")switch(c[0]){case 3:1-r&&(u[1]=x[13]+i|0,bl(x[1]));return;case 1:case 2:r&&(u[1]=x[13]+i|0,bl(x[1]));return}}}function IB(x,r,e){return w4(x,e),r&&iO(x,1),u3([0,x[13],e],x[1])}function PB(x,r,e){if(x[14]=x[14]+1|0,x[14]<x[15])return IB(x,0,[0,-x[13]|0,[3,r,e],0]);var t=x[14]===x[15]?1:0;if(!t)return t;var u=x[16];return AB(x,Rx(u),u)}function CB(x,r){1<x[14]&&(x[14]<x[15]&&(w4(x,[0,td,1,0]),iO(x,1),iO(x,0)),x[14]=x[14]-1|0)}function NB(x,r){if(x[23]&&w4(x,[0,td,5,0]),x[22]){var e=bl(x[4]);if(e)return d(x[27],e[1])}}function OB(x,r){for(P2(function(e){return NB(x,D)},x[4][1]);!(1>=x[14]);)CB(x,D);return x[13]=gB,EB(x),r&&nd(x),x[12]=1,x[13]=1,qN(x[28]),uO(x[1]),m4(x[2]),m4(x[3]),m4(x[4]),m4(x[5]),x[10]=0,x[14]=0,x[9]=x[6],PB(x,0,3)}function fO(x,r,e){var t=x[14]<x[15]?1:0;return t&&AB(x,r,e)}function jB(x,r,e){return fO(x,r,e)}function g4(x,r){return jB(x,1,$h(1,r))}function c3(x,r){return OB(x,0),d(x[18],0)}function cO(x,r){return
Line truncated
|
||||
`,t70=ig,n70="unreachable regexp_class",u70=LD,i70="unreachable regexp_body",f70=rx,c70=rx,s70=rx,a70=rx,o70=hR,v70="{'>'}",l70=F6,p70="{'}'}",k70=em,m70=Ao,h70=OT,d70=Qm,y70=hR,_70=Ao,w70=OT,g70=Qm,b70="unreachable type_token wholenumber",T70="unreachable type_token wholebigint",E70="unreachable type_token floatbigint",S70="unreachable type_token scinumber",A70="unreachable type_token scibigint",I70="unreachable type_token hexnumber",P70="unreachable type_token hexbigint",C70="unreachable type_token legacyoctnumber",N70="unreachable type_token octnumber",O70="unreachable type_token octbigint",j70="unreachable type_token binnumber",D70="unreachable type_token bigbigint",R70="unreachable type_token",F70=yL,M70=[11,1],L70=[11,0],q70="unreachable template_tail",B70=rx,U70=rx,X70="unreachable jsx_child",G70="unreachable jsx_tag",Y70=[0,dw],z70=[0,913],J70=[0,Y3],K70=[0,mh],H70=[0,cR],W70=[0,ZP],V70=[0,8747],$70=[0,gD],Q70=[0,916],Z70=[0,8225],xu0=[0,935],ru0=[0,$I],eu0=[0,914],tu0=[0,vL],nu0=[0,IF],uu0=[0,FE],iu0=[0,915],fu0=[0,TD],cu0=[0,919],su0=[0,917],au0=[0,_L],ou0=[0,KD],vu0=[0,HR],lu0=[0,924],pu0=[0,923],ku0=[0,922],mu0=[0,oF],hu0=[0,921],du0=[0,eM],yu0=[0,Wg],_u0=[0,xF],wu0=[0,ny],gu0=[0,927],bu0=[0,937],Tu0=[0,HD],Eu0=[0,$R],Su0=[0,uR],Au0=[0,338],Iu0=[0,352],Pu0=[0,929],Cu0=[0,936],Nu0=[0,8243],Ou0=[0,928],ju0=[0,934],Du0=[0,qL],Ru0=[0,v_],Fu0=[0,933],Mu0=[0,pM],Lu0=[0,nL],qu0=[0,fD],Bu0=[0,920],Uu0=[0,932],Xu0=[0,jD],Gu0=[0,dR],Yu0=[0,KF],zu0=[0,JR],Ju0=[0,918],Ku0=[0,SR],Hu0=[0,HF],Wu0=[0,926],Vu0=[0,lF],$u0=[0,jM],Qu0=[0,925],Zu0=[0,39],xi0=[0,8736],ri0=[0,8743],ei0=[0,38],ti0=[0,945],ni0=[0,8501],ui0=[0,Sv],ii0=[0,8226],fi0=[0,JD],ci0=[0,946],si0=[0,8222],ai0=[0,RD],oi0=[0,wM],vi0=[0,8776],li0=[0,BI],pi0=[0,8773],ki0=[0,9827],mi0=[0,CD],hi0=[0,967],di0=[0,qM],yi0=[0,Wm],_i0=[0,PD],wi0=[0,GF],gi0=[0,8595],bi0=[0,8224],Ti0=[0,8659],Ei0=[0,sR],Si0=[0,8746],Ai0=[0,8629],Ii0=[0,yR],Pi0=[0,8745],Ci0=[0,8195],Ni0=[0,8709],Oi0=[0,iD],ji0=[0,dL],Di0=[0,aL],Ri0=[0,Gp],Fi0=[0,9830],Mi0=[0,8707],Li0=[0,8364],qi0=[0,EM],Bi0=[0,rl],Ui0=[0,951],Xi0=[0,8801],Gi0=[0,949],Yi0=[0,8194],zi0=[0,8805],Ji0=[0,947],Ki0=[0,8260],Hi0=[0,DE],Wi0=[0,nR],Vi0=[0,QS],$i0=[0,8704],Qi0=[0,XF],Zi0=[0,EL],xf0=[0,8230],rf0=[0,9829],ef0=[0,8596],tf0=[0,8660],nf0=[0,62],uf0=[0,402],if0=[0,948],ff0=[0,nF],cf0=[0,S9],sf0=[0,8712],af0=[0,aP],of0=[0,953],vf0=[0,8734],lf0=[0,8465],pf0=[0,IM],kf0=[0,8220],mf0=[0,8968],hf0=[0,8592],df0=[0,Ag],yf0=[0,10216],_f0=[0,955],wf0=[0,8656],gf0=[0,954],bf0=[0,60],Tf0=[0,8216],Ef0=[0,8249],Sf0=[0,NM],Af0=[0,9674],If0=[0,8727],Pf0=[0,8970],Cf0=[0,AL],Nf0=[0,8711],Of0=[0,956],jf0=[0,8722],Df0=[0,D_],Rf0=[0,OS],Ff0=[0,8212],Mf0=[0,NR],Lf0=[0,8804],qf0=[0,957],Bf0=[0,kF],Uf0=[0,8836],Xf0=[0,8713],Gf0=[0,KR],Yf0=[0,8715],zf0=[0,8800],Jf0=[0,8853],Kf0=[0,959],Hf0=[0,969],Wf0=[0,8254],Vf0=[0,HM],$f0=[0,339],Qf0=[0,jv],Zf0=[0,BM],xc0=[0,a9],rc0=[0,ul],ec0=[0,8855],tc0=[0,LE],nc0=[0,t1],uc0=[0,rI],ic0=[0,ky],fc0=[0,da],cc0=[0,rL],sc0=[0,982],ac0=[0,960],oc0=[0,966],vc0=[0,8869],lc0=[0,8240],pc0=[0,8706],kc0=[0,8744],mc0=[0,8211],hc0=[0,10217],dc0=[0,8730],yc0=[0,8658],_c0=[0,34],wc0=[0,968],gc0=[0,8733],bc0=[0,8719],Tc0=[0,961],Ec0=[0,8971],Sc0=[0,LL],Ac0=[0,8476],Ic0=[0,8221],Pc0=[0,8969],Cc0=[0,8594],Nc0=[0,J_],Oc0=[0,bM],jc0=[0,Ab],Dc0=[0,8901],Rc0=[0,353],Fc0=[0,8218],Mc0=[0,8217],Lc0=[0,8250],qc0=[0,8835],Bc0=[0,8721],Uc0=[0,8838],Xc0=[0,8834],Gc0=[0,9824],Yc0=[0,8764],zc0=[0,962],Jc0=[0,963],Kc0=[0,8207],Hc0=[0,952],Wc0=[0,8756],Vc0=[0,964],$c0=[0,e8],Qc0=[0,8839],Zc0=[0,IC],xs0=[0,fk],rs0=[0,ol],es0=[0,8657],ts0=[0,8482],ns0=[0,lk],us0=[0,732],is0=[0,Q3],fs0=[0,8201],cs0=[0,977],ss0=[0,sM],as0=[0,xl],os0=[0,965],vs0=[0,978],ls0=[0,IL],ps0=[0,DS],ks0=[0,WL],ms0=[0,tR],hs0=[0,8205],ds0=[0,950],ys0=[0,Bk],_s0=[0,hF],ws0=[0,ZE],gs0=[0,958],bs0=[0,8593],Ts0=[0,oD],Es0=[0,8242],Ss0=[0,mI],As0="unreachable regexp",Is0="unreachable token wholenumber",Ps0="unreachable token wholebigint",Cs0="unreachable token floatbigint",Ns0="unreachable token scinumber",Os0="unreachable token scibigint",js0="unreachable token hexnumber",Ds0="unreachable token hexbigint",Rs0="unreachable token legacyoctnumber",Fs0="unreachable token legacynonoctnumber",Ms0="unreachable token octnumber",Ls0="unreachable token octbigint",qs0="unreachable token bignumber",Bs0="unreachable token bigint",Us0="unreachable token",Xs0=yL,Gs0=[7,"#!"],Ys0="expected ?",zs0="unreachable string_escape",Js0=V2,Ks0=P6,Hs0=P6,Ws0=V2,Vs0=HP,$s0=EF,Qs0="n",Zs0="r",xa0="t",ra0=zF,ea0=P6,ta0=Ao,na0=Ao,ua0="unreachable id_char",ia0=Ao,fa0=Ao,ca0=P6,sa0=uL,aa0=pD,oa0=bb,va0=[28,"token ILLEGAL"],la0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],pa0=[0,1],ka0=[0,1],ma0=OF,ha0=OF,da0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `expo
Line truncated
|
||||
\v\x07\f\r\x1B ! "#$%
Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xLine truncated
|
||||
\v\f\r`,t+1|0)-1|0;if(14<u>>>0)var i=g(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:H(r,15);var i=Ie(y(r))===0?15:g(r);break;case 4:H(r,4);var i=re(y(r))===0?e(r):g(r);break;case 5:H(r,11);var i=re(y(r))===0?e(r):g(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:H(r,14);var c=l3(y(r));if(c===0)var i=Pr(y(r))===0&&Pr(y(r))===0&&Pr(y(r))===0?12:g(r);else if(c===1&&Pr(y(r))===0){for(;;){var v=o3(y(r));if(v!==0)break}var i=v===1?13:g(r)}else var i=g(r);break;case 13:var i=10;break;default:H(r,14);var i=Pr(y(r))===0&&Pr(y(r))===0?1:g(r)}if(16<i>>>0)return Px(zs0);switch(i){case 0:var o=Fx(r);return[0,x,o,o1(r),0];case 1:var l=Fx(r);return[0,x,l,[0,st(Gx(Js0,l))],0];case 2:var k=Fx(r),h=st(Gx(Ks0,k));return D6<=h?[0,x,k,[0,h>>>3|0,48+(h&7)|0],1]:[0,x,k,[0,h],1];case 3:var E=Fx(r);return[0,x,E,[0,st(Gx(Hs0,E))],1];case 4:return[0,x,Ws0,[0,0],0];case 5:return[0,x,Vs0,[0,8],0];case 6:return[0,x,$s0,[0,12],0];case 7:return[0,x,Qs0,[0,10],0];case 8:return[0,x,Zs0,[0,13],0];case 9:return[0,x,xa0,[0,9],0];case 10:return[0,x,ra0,[0,11],0];case 11:var T=Fx(r);return[0,x,T,[0,st(Gx(ea0,T))],1];case 12:var I=Fx(r);return[0,x,I,[0,st(Gx(ta0,C2(I,1,Rx(I)-1|0)))],0];case 13:var N=Fx(r),P=st(Gx(na0,C2(N,2,Rx(N)-3|0))),R=Gk<P?lt(x,Jr(x,r)):x;return[0,R,N,[0,P],0];case 14:var q=Fx(r),X=o1(r);return[0,lt(x,Jr(x,r)),q,X,0];case 15:var B=Fx(r);return[0,ee(x,r),B,[0],0];default:var z=Fx(r);return[0,x,z,o1(r),0]}}function sX(x,r,e,t,u,i){for(var c=x,v=u;;){Tr(i);var o=y(i),l=92<o?1:z0("",o+1|0)-1|0;if(4<l>>>0)var k=g(i);else switch(l){case 0:var k=3;break;case 1:for(;;){H(i,4);var h=y(i),E=-1<h?91<h?92<h?0:-1:z0("\0\0\0",h)-1|0:-1;if(E!==0)break}var k=g(i);break;case 2:var k=2;break;case 3:var k=0;break;default:var k=1}if(4<k>>>0)return Px(Zn0);switch(k){case 0:var T=Fx(i);if(lr(t,T),Sr(r,T))return[0,c,Pe(c,i),v];lr(e,T);break;case 1:lr(t,x70);var I=cX(c,i),N=I[4],P=I[3],R=I[2],q=I[1],X=N||v;lr(t,R),tB(function(S0){return Fs(e,S0)},P);var c=q,v=X;break;case 2:var B=Fx(i);lr(t,B);var z=ee(lt(c,Jr(c,i)),i);return lr(e,B),[0,z,Pe(z,i),v];case 3:var x0=Fx(i);lr(t,x0);var W=lt(c,Jr(c,i));return lr(e,x0),[0,W,Pe(W,i),v];default:var Z=i[6],t0=i[3]-Z|0,i0=b1(t0*4|0),u0=T4(i[1],Z,t0,i0);GN(t,i0,0,u0),GN(e,i0,0,u0)}}}function aX(x,r,e,t){for(var u=x;;){Tr(t);var i=y(t),c=96<i?1:z0("\x07",i+1|0)-1|0;if(6<c>>>0)var v=g(t);else switch(c){case 0:var v=0;break;case 1:for(;;){H(t,6);var o=y(t),l=-1<o?95<o?96<o?0:-1:z0("\0\0\0\0",o)-1|0:-1;if(l!==0)break}var v=g(t);break;case 2:var v=5;break;case 3:H(t,5);var v=Ie(y(t))===0?4:g(t);break;case 4:H(t,6);var k=y(t),h=e1<k?un<k?-1:0:-1,v=h===0?2:g(t);break;case 5:var v=3;break;default:var v=1}if(6<v>>>0)return Px(r70);switch(v){case 0:return[0,lt(u,Jr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:at(e,92);var E=cX(u,t),T=E[3],I=E[1];lr(e,E[2]),tB(function(R){return Fs(r,R)},T);var u=I;break;case 4:lr(e,e70),lr(r,t70);var u=ee(u,t);break;case 5:lr(e,Fx(t)),at(r,10);var u=ee(u,t);break;default:var N=Fx(t);lr(e,N),lr(r,N)}}}function VE0(x,r,e){for(var t=x;;){Tr(e);var u=y(e),i=92<u?e2<u?1:v2<u?2:1:z0("\x07",u+1|0)-1|0;if(6<i>>>0)var c=g(e);else switch(i){case 0:var c=0;break;case 1:for(;;){H(e,7);var v=y(e),o=-1<v?90<v?92<v?v2<v?e2<v?0:-1:0:-1:z0("\0\0\0",v)-1|0:-1;if(o!==0)break}var c=g(e);break;case 2:var c=6;break;case 3:H(e,6);var c=Ie(y(e))===0?6:g(e);break;case 4:if(H(e,4),MU(y(e))===0){for(;H(e,3),MU(y(e))===0;);var c=g(e)}else var c=g(e);break;case 5:var c=5;break;default:H(e,7);var l=y(e),k=-1<l?13<l?e2<l?0:v2<l?1:0:z0("",l)-1|0:-1;if(2<k>>>0)var c=g(e);else switch(k){case 0:var c=2;break;case 1:var c=1;break;default:H(e,1);var c=Ie(y(e))===0?1:g(e)}}if(7<c>>>0)return Px(i70);switch(c){case 0:return[0,D2(t,Jr(t,e),h2),f70];case 1:return[0,ee(D2(t,Jr(t,e),h2),e),c70];case 2:lr(r,Fx(e));break;case 3:var h=Fx(e);return[0,t,C2(h,1,Rx(h)-1|0)];case 4:return[0,t,s70];case 5:at(r,91);x:{r:{e:{t:{n:for(;;){Tr(e);var E=y(e),T=93<E?e2<E?1:v2<E?2:1:z0("",E+1|0)-1|0;if(5<T>>>0)var I=g(e);else switch(T){case 0:var I=0;break;case 1:for(;;){H(e,5);var N=y(e),P=-1<N?91<N?93<N?v2<N?e2<N?0:-1:0:-1:z0("\0\0",N)-1|0:-1;if(P
Line truncated
|
||||
`);return ox.length>1&&ox.every(Yx=>Yx.trimStart()[0]==="*")}var Zj=new WeakMap;function mI0(a0){return Zj.has(a0)||Zj.set(a0,kI0(a0)),Zj.get(a0)}var xD=mI0;function hI0(a0){if(a0.length<2)return;let ox;for(let Yx=a0.length-1;Yx>=0;Yx--){let xr=a0[Yx];if(ox&&bt(xr)===xn(ox)&&xD(xr)&&xD(ox)&&(a0.splice(Yx+1,1),xr.value+="*//*"+ox.value,xr.range=[xn(xr),bt(ox)]),!tz(xr)&&!l6(xr))throw new TypeError(`Unknown comment type: "${xr.type}".`);ox=xr}}var uz=hI0;function dI0(a0){return a0!==null&&typeof a0=="object"}var iz=dI0;var yp=null;function _p(a0){if(yp!==null&&typeof yp.property){let ox=yp;return yp=_p.prototype=null,ox}return yp=_p.prototype=a0??Object.create(null),new _p}var yI0=10;for(let a0=0;a0<=yI0;a0++)_p();function rD(a0){return _p(a0)}function _I0(a0,ox="type"){rD(a0);function Yx(xr){let E1=xr[ox],S2=a0[E1];if(!Array.isArray(S2))throw Object.assign(new Error(`Missing visitor keys for '${E1}'.`),{node:xr});return S2}return Yx}var fz=_I0;var $=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],cz={AccessorProperty:$[0],AnyTypeAnnotation:$[1],ArgumentPlaceholder:$[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:$[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:$[3],AsExpression:$[4],AssignmentExpression:$[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:$[6],BigIntLiteral:$[1],BigIntLiteralTypeAnnotation:$[1],BigIntTypeAnnotation:$[1],BinaryExpression:$[5],BindExpression:["object","callee"],BlockStatement:$[7],BooleanLiteral:$[1],BooleanLiteralTypeAnnotation:$[1],BooleanTypeAnnotation:$[1],BreakStatement:$[8],CallExpression:$[9],CatchClause:["param","body"],ChainExpression:$[3],ClassAccessorProperty:$[0],ClassBody:$[10],ClassDeclaration:$[11],ClassExpression:$[11],ClassImplements:$[12],ClassMethod:$[13],ClassPrivateMethod:$[13],ClassPrivateProperty:$[14],ClassProperty:$[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:$[15],ConditionalExpression:$[16],ConditionalTypeAnnotation:$[17],ContinueStatement:$[8],DebuggerStatement:$[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:$[18],DeclareEnum:$[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:$[20],DeclareFunction:["id","predicate"],DeclareHook:$[21],DeclareInterface:$[22],DeclareModule:$[19],DeclareModuleExports:$[23],DeclareNamespace:$[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:$[24],DeclareVariable:$[21],Decorator:$[3],Directive:$[18],DirectiveLiteral:$[1],DoExpression:$[10],DoWhileStatement:$[25],EmptyStatement:$[1],EmptyTypeAnnotation:$[1],EnumBigIntBody:$[26],EnumBigIntMember:$[27],EnumBooleanBody:$[26],EnumBooleanMember:$[27],EnumDeclaration:$[19],EnumDefaultedMember:$[21],EnumNumberBody:$[26],EnumNumberMember:$[27],EnumStringBody:$[26],EnumStringMember:$[27],EnumSymbolBody:$[26],ExistsTypeAnnotation:$[1],ExperimentalRestProperty:$[6],ExperimentalSpreadProperty:$[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:$[28],ExportNamedDeclaration:$[20],ExportNamespaceSpecifier:$[28],ExportSpecifier:["local","exported"],ExpressionStatement:$[3],File:["program"],ForInStatement:$[29],ForOfStatement:$[29],ForStatement:["init","test","update","body"],FunctionDeclaration:$[30],Fu
Line truncated
|
||||
$1 $2
|
||||
`);a0=a0.replace(lz,"").trimEnd();let xr=Object.create(null),E1=wp(0,a0,pz,"").replace(lz,"").trimEnd(),S2;for(;S2=pz.exec(a0);){let da=wp(0,S2[2],II0,"");if(typeof xr[S2[1]]=="string"||Array.isArray(xr[S2[1]])){let Tt=xr[S2[1]];xr[S2[1]]=[...NI0,...Array.isArray(Tt)?Tt:[Tt],da]}else xr[S2[1]]=da}return{comments:E1,pragmas:xr}}var hz=["noformat","noprettier"],dz=["format","prettier"];function OI0(a0){if(!a0.startsWith("#!"))return"";let ox=a0.indexOf(`
|
||||
`);return ox===-1?a0:a0.slice(0,ox)}var yz=OI0;function _z(a0){let ox=yz(a0);ox&&(a0=a0.slice(ox.length+1));let Yx=kz(a0),{pragmas:xr,comments:E1}=mz(Yx);return{shebang:ox,text:a0,pragmas:xr,comments:E1}}function wz(a0){let{pragmas:ox}=_z(a0);return dz.some(Yx=>Object.prototype.hasOwnProperty.call(ox,Yx))}function gz(a0){let{pragmas:ox}=_z(a0);return hz.some(Yx=>Object.prototype.hasOwnProperty.call(ox,Yx))}function jI0(a0){return a0=typeof a0=="function"?{parse:a0}:a0,{astFormat:"estree",hasPragma:wz,hasIgnorePragma:gz,locStart:xn,locEnd:bt,...a0}}var bz=jI0;var DI0={comments:!1,components:!0,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,pattern_matching:!0,tokens:!1};function RI0(a0){let{message:ox,loc:Yx}=a0;if(!Yx)return a0;let{start:xr,end:E1}=Yx;return xz(ox,{loc:{start:{line:xr.line,column:xr.column+1},end:{line:E1.line,column:E1.column+1}},cause:a0})}function FI0(a0){let ox=Tz.default.parse(a0,DI0),[Yx]=ox.errors;if(Yx)throw RI0(Yx);return vz(ox,{parser:"flow",text:a0})}var MI0=bz(FI0);return uI0(LI0);});
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
var QA0=Object.create;var Vj=Object.defineProperty;var ZA0=Object.getOwnPropertyDescriptor;var xI0=Object.getOwnPropertyNames;var rI0=Object.getPrototypeOf,eI0=Object.prototype.hasOwnProperty;var tI0=(a0,ox)=>()=>(ox||a0((ox={exports:{}}).exports,ox),ox.exports),$Y=(a0,ox)=>{for(var Yx in ox)Vj(a0,Yx,{get:ox[Yx],enumerable:!0})},nI0=(a0,ox,Yx,xr)=>{if(ox&&typeof ox=="object"||typeof ox=="function")for(let E1 of xI0(ox))!eI0.call(a0,E1)&&E1!==Yx&&Vj(a0,E1,{get:()=>ox[E1],enumerable:!(xr=ZA0(ox,E1))||xr.enumerable});return a0};var uI0=(a0,ox,Yx)=>(Yx=a0!=null?QA0(rI0(a0)):{},nI0(ox||!a0||!a0.__esModule?Vj(Yx,"default",{value:a0,enumerable:!0}):Yx,a0));var QY=tI0($j=>{(function(a0){typeof globalThis!="object"&&(this?ox():(a0.defineProperty(a0.prototype,"_T_",{configurable:!0,get:ox}),_T_));function ox(){var Yx=this||self;Yx.globalThis=Yx,delete a0.prototype._T_}})(Object);(function(a0){"use strict";var ox=320,Yx="loc",xr=289,E1=70416,S2=69748,da=163,Tt=92159,Vr=43587,G1="labeled_statement",yo="&=",Et="int_of_string",G3=110591,_o=92909,gp=11559,nD="regexp",W5=43301,bp=11703,V5=122654,ya=255,uD="%ni",$5=68252,iD=232,Q5=42785,qn="declare_variable",Tp="while",Z5=66938,xy=70301,ry=124907,Ep=126515,fD=218,Bn="pattern_identifier",ey=67643,Un="export_source",ty=216,ny=64279,cD="Out_of_memory",uy=113788,sD="comments",iy=126624,aD="win32",Xn="object_key_bigint_literal",oD=185,Sp=123214,_a="constructor",fy=69955,Gn="import_declaration",cy=68437,sy="Failure",Ap="Unix.Unix_error",ay=64255,oy=42539,vy=110579,Yn="export_default_declaration",zn="jsx_attribute_name",Ip=11727,ly=43002,Pp=126500,Jn="component_param_pattern",vD="collect_comments_opt",Kn="match_unary_pattern",lD=321,Hn="keyof_type",pD="Invalid binary/octal ",kD="range",py=170,wa="false",ky=43798,mD=", characters ",Wn="object_type_property_getter",my=65547,hy=126467,dy=65007,yy=42237,_y=8318,wy=71215,Vn="object_property_type",$n="type_alias",gy=67742,Qn="function_body",hD=304,by=68111,Cp=120745,Ty=71959,Np=43880,dD="Match_failure",Zn="type_cast",wo=109,ga="void",Ey="generator",Sy=125124,Ay=101589,Op=94179,yD=">>>",jp=70404,x7="optional_indexed_access_type",$1="argument",r7="object_property",e7="object_type_property",Iy=67004,Py=42783,Cy=68850,_D="@",Ny=43741,Oy=43487,Dp="object",wD="end",Rp=126571,jy=71956,gD=208,Dy=126566,Ry=67702,bD="EEXIST",t7="this_expression",TD=203,Fy=11507,My=113807,Fp=119893,Ly=42735,p6="rest",n7="null_literal",k6="protected",qy=43615,v2=8231,By=68149,Uy=73727,Xy=72348,Gy=92995,Sv=224,Yy=11686,zy=43013,u7="assignment_pattern",Jy=12329,i7="function_type",Y3=192,f7="jsx_element_name",Ky=70018,ED=-57,c7="catch_clause_pattern",Mp=126540,s7="template_literal",Hy=120654,Wy=68497,Vy=67679,a7="readonly_type",$y=68735,Qy="<",Lp=": No such file or directory",Zy=66915,x9="chain",SD="!",o7="object_type",r9=43712,qp=64297,e9=183969,t9=-105,n9=43503,u9=67591,Av=65278,i9=67669,v7="for_of_assignment_pattern",m6="`",f9=11502,l7="catch_body",c9=42191,go=-744106340,s9=182,Iv=":",AD="a string",a9=65663,o9=66978,v9=71947,Bp=43519,l9=71086,p9=125258,k9=12538,p7="expression_or_spread",ID="Printexc.handle_uncaught_exception",Up=69956,Xp=120122,Gp=247,PD=231,m9=" : flags Open_rdonly and Open_wronly are not compatible",k7="statement_fork_point",CD=710,ND=-692038429,Ue="static",h9=55203,d9=64324,y9=64111,OD="!==",_9=120132,w9=124903,h6="class",jD=222,m7="pattern_number_literal",ba="kind",g9=71903,h7="variable_declarator",DD=" named `",d7="typeof_expression",b9=126627,T9=70084,RD=228,Yp=70480,y7="class_private_field",E9=239,zp=120713,rn=65535,z3=-26,_7="private_name",S9=43137,w7="remote_identifier",A9=70161,g7="label_identifier",I9="src/parser/statement_parser.ml",P9=8335,C9=19903,N9=64310,Pv="_",b7="for_init_declaration",FD="infer",O9=64466,j9=43018,MD="tokens",D9=92735,R9=66954,F9=65473,M9=70285,T7="sequence",L9="compare: functional value",q9=69890,d6=1e3,B9=65487,U9=42653,LD="\\\\",qD="%=",E7="match_member_pattern_base",X9=72367,S7="function_rest_param",BD="/static/",G9=124911,Y9=65276,Jp=126558,z9=11498,UD=137,A7="export_default_declaration_decl",J9="cases",Kp=126602,I7="jsx_child",Xe="continue",K9=42962,XD="importKind",e1=122,J3="Literal",P7="pattern_object_property_identifier_key",H9=42508,bo="in",W9=55238,V9=67071,$9=70831,Q9=72161,Z9=67462,GD="<<=",x_=43009,r_=66383,Hp=67827,e_=72202,t_=69839,n_=66775,YD="-=",Cv=8202,u_=70105,i_=120538,zD=-92,C7="for_in_left_declaration",f_="rendersType",Wp=126563,c_=70708,Vp=126523,JD=166,N7="match_",KD=202,s_=110951,Ta="component",$p=126552,a_=66977,o_=213,O7="enum_member_identifier",HD=210,j7="enum_bigint_body",WD=">=",v_=126495,l_="specifiers",p_="=",k_=65338,y6="members",m_=123535,h_=43702,d_=72767,Nv="get",y_=126633,Qp=126536,__=94098,w_="types",g_=113663,VD="Internal Error: Found private field in object props",D7="jsx_element",b_=70366,T_=110959,Zp=120655,$D="trailingComments",QD=282,To=24029,ZD=-100,xR=144,H2="yield",R7="binding_pattern",F7="typeof_identifier",rR="ENOTEMPTY",xk=126468,E_=1255,S_=120628,M7="pattern_objLine truncated
|
||||
`,RR="**=",pu="pattern_object_property_pattern",ig="e",fg=72712,FR="Internal Error: Found object private prop",cg="ENOENT",sg=-42,ku="jsx_opening_attribute",ag=67646,mu="component_type",og=64296,vg=43887,MR="Division_by_zero",LR="EnumDefaultedMember",hu="typeof_member_identifier",lg=43792,du="match_member_pattern_property",yu="declare_export_declaration_decl",pg=93026,_u="type_annotation_hint",kg=42887,mg=43881,hg=43761,Lk=8526,qR=287,b6=119,dg=43866,yg=72847,_g=8348,k1=101,wg=94026,qk=72272,BR="src/parser/flow_lexer.ml",gg=120744,Rv=8191,V3="implies",Bk=255,Uk=11711,wu="match_unary_pattern_argument",bg=71235,UR=288,Xk=68116,cr=100,gu="match_expression",bu="enum_body",Gk=1114111,Tu="assignment",Tg=71955,Yk=43260,Eu="pattern_array_e",Eg=126583,XR="prefix",Su="class_body",T6="shorthand",Sg=171,Ag=66256,zk=-97,GR=" =",Ig=94032,Pg=42606,Au="match_case",Cg=71839,Jk=120134,Ng=55291,Og=92862,jg=43019,Dg=126543,$3="function",Rg=111355,Fg=11389,Mg=70753,Lg=43249,qg=64829,Kk="line",Iu="function_declaration",Hk="undefined",YR="([^/]+)",Bg=110947,Ug=70002,zR="Cygwin",Pu="as_expression",Xg=12591,Wk=64285,Gg=2048,Yg=73112,Vk=126589,JR=225,$k=43259,zg=72817,Qk=64318,KR=172,HR=209,Cu="match_binding_pattern",Nu=" ",Ou="import_source",E6="delete",WR="Enum `",Zk=126553,Jg=67001,Fv="default",Kg=11630,Hg=206,ju="enum_bigint_member",Wg=67504,x8=67593,Vg=113791,VR="MatchObjectPatternProperty",$g=69572,Du="typeof_type",$R=212,QR="%i",Ru="function_this_param",Qg=72329,Ao="0x",Mv=8239,Zg=75075,ZR=57343,Fu="pattern_bigint_literal",xb=12341,xF=201,Lv="hook",rF=": closedir failed",rb=42959,r8=119970,eb=43560,eF="||=",Mu="member_private_name",tb=120570,Lu="object_key_identifier",e8=223,tF="Not_found",qu="record_static_property",nF=230,Bu="jsx_element_name_member_expression",Uu="string_literal",nb=120596,ub=43807,ib=69687,fb=63743,t8=72192,Xu="member_property",cb=43262,Gu="class_declaration",uF="renders*",iF="%Li",sb=126578,Yu="jsx_attribute",Q3=254,be="empty",S6="label",zu="object_internal_slot_property_type",n8=120133,ab=43359,Ge="predicate",fF="??=",ob=43697,vb=-43,Ju="default_opt",cF="the start of a statement",lb=67826,Ku="record_element",Hu="object_",Wu="class_element",u8=11631,i8=70855,Vu="opaque_type",$u="number_literal",sF=", ",f8=8319,c8=120004,s8=133,Qu="type_params",Zu="pattern_object_rest_property",W2="import",pb=72e3,kb=67413,mb=12343,hb=70080,xi="intersection_type",l2=-36,db=70005,A6="properties",yb=11679,_b=8483,wb=110587,aF=43520,ri="computed_key",oF=207,ei="class_identifier",gb="Invalid number ",ti="function_param_pattern",qv=12288,bb=113817,Tb=70730,Eb=178207,a8=71236,Sb=167,ni="object_indexer_property_type",Ab=64286,vF="TypeAnnotation",lF=220,ui="type_identifier",ii="spread_property",fi="jsx_attribute_value_expression",Ib=126519,o8=70108,v8=126,l8=42999,Sa="prototype",Pb=" : flags Open_text and Open_binary are not compatible",pF="**",p8=43823,Cb=": Not a directory",ci="render_type",k8=72349,Z3="test",Nb=43776,Ob=92879,jb=11263,kF=241,Db=93052,si="nullable_type",Rb=43704,Fb=64321,mF="Property",Mb=72191,hF=165,I6="instanceof",Lb=69247,dF=302,Ye="name",m8=126634,qb=8516,h8="typeArguments",Bb=71127,ai="jsx_spread_attribute",Ub=66559,Xb=44031,Gb=43645,e2=8233,Yb=71494,zb="opaque",d8=72967,Jb=70106,oi="logical",yF="@[%s =@ ",P6="0o",y8=126554,Kb=71351,_8=8484,Hb=72242,w8=120687,xl=252,Wb=183983,C6="%S",vi="function_this_param_type",_F=292,g8="decorators",Vb=43255,li="catch_clause",ze="-",$b=67711,wF=": file descriptor already closed",b8=64311,pi="record_declaration",T8=120539,Qb="arguments",E8=73062,Zb=173823,xT=42124,rT=72095,eT=125259,tT=42969,S8=70280,gF=12520,nT=69749,uT=70066,ki="binary",mi="for_in_statement",iT=43010,bF="^=",fT=126570,hi="for_statement",A8=126584,di="function_return_annotation",cT=72144,sT=8505,TF=-101,yi="class_expression",aT=120076,oT=69807,vT=40981,lT=-24976191,pT=72768,kT=126550,I8='"',_i="call_type_arg",EF="f",Bv="this",P8=126628,SF="===",AF=56320,wi="declare_module_exports",mT=120512,p2=105,hT=119974,dT=71450,yT=71942,IF=195,C8=120629,PF="/=",CF=">>",gi="declare_interface",NF=4096,bi="pattern_array_rest_element",_T=71338,N8=126520,Ti="as_const_expression",OF="Popping lex mode from empty stack",jF="renders?",wT=68405,Ei="member",Si="class_extends",Uv=12287,O8=126590,gT=66377,DF="fields",Io="async",Ai="pattern_array_element",rl=240,RF=308,bT=69864,Xv="readonly",TT=70460,ET=120779,ST=66378,Ii="new_",j8=126551,Pi="pattern_object_rest_property_pattern",Ci="for_statement_init",AT=43595,D8=68296,FF=148,MF="\0\0\0\0",IT=120712,PT=64217,CT=69295,LF="||",NT=";",OT=70461,jT=66939,DT="record",qF="collect_comments",BF=279,Ni="generic_type",RT=68295,FT=44002,R8=72162,Oi="object_call_property_type",F8=8305,M8=119995,L8="with",ji="class_property",UF="qualification",Di="jsx_attribute_name_namespaced",Ri="if_statement",Fi="typeof_qualified_identifier",XF=238,MT=65615,GF=176,t2="expression",q8=126559,Mi="jsx_attribute_value",Li="<2>",qi="component_param",B8="Map.bal",N6=132,LT=70412,qT=70440,YF="<<",U8="finally"Line truncated
|
||||
`,Im=120093,G6="column",Vf="component_rest_param",XM="methods",lA=70451,pA=70312,kA=69967,Pm=70279,mA=66463,hA=92975,Cm=70286,$f="pattern_object_property_computed_key",Qf="object_key_string_literal",dA="jsError",Zf="type_args",yA=8304,GM="==",wr=115,xc="declare_component",_A=120092,wA=43638,gA=66811,Ia=-87,bA=43334,TA=66863,EA=77823,YM=143,rc="optional_call",SA=126562,Nm=70162,ec=104,zM="static ",AA=66963,Kv="await",Om=70107,V2="0",IA=72250,PA=8507,CA=100351,jm="AssignmentPattern",tc="type",JM="%u",NA="NonNullExpression",nc="function_expression_or_method",OA=43470,KM=146,HM=242,WM="camlinternalMod.ml",uc="match_or_pattern",jA=72750,DA=69414,RA=65370,ic="syntax",VM=32752,FA=42963,$M="End_of_file",MA=12294,LA=8471,QM="elementType",qA=43782,ZM="++",BA=43641,UA=71944,fc="record_property",XA=126601,GA=78894,xL=-45,Hv="null",rL=177,eL="satisfies",YA=131071,cc="import_specifier",sc="class_method",ac="type_",zA=126514,JA=8454,tL="inexact",KA=67807,HA=8525,WA=65470,VA=71352,oc="tuple_spread_element",nL=219,$A="abstract",QA=73458,Je="return",Y6=65536,Dm=126548,vc="array_element",ZA=-253313196,xI=186,Rm="catch",lc="infer_type",rI=12295,uL="Invalid legacy octal ",eI=69762,tI=43311,nI=65437,pc="variable_declaration",iL=-696510241,kc="function_params",uI=64316,fL=311,Fm=11565,cL="infinity",iI="@]",fI=65908,mc="extends",cI=66204,sI=43784,aI=11742,Mm=126503,Ke="debugger",oI=70457,z6=912068366,vI=68786,Lm="keyof",qm=69415,lI=12686,sn=127343600,hc="declare_type_alias",sL="the",aL=233,dc="jsx_element_name_namespaced",pI=72283,kI=161,yc="class_static_block",_c="function_param_type",Pt=128,mI=-673950933,Bm=126591,oL="Sys_error",hI=74649,dI=74862,J6="is",yI=43738,_I=68479,vL=196,Um=70854,wc="enum_boolean_member",Xm=72163,wI=92783,lL=281,gc="component_param_name",gI=68863,an=32768,pL=2048,bI=64284,kL="@{",TI="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",Gm=8455,bc="update_expression",mL=276,EI=65500,K6="from",SI=68447,Ym=12592,AI=92766,hL=">>=",n2=110,II=66431,PI=43586,Tc="jsx_identifier",CI=" : file already exists",R1=128,NI=71958,OI=66717,Ec="enum_boolean_body",jI=64262,Yr="id",Sc="component_renders_annotation",DI=42888,RI=8584,FI=73008,Ac="enum_symbol_body",Ic="declare_namespace",zm=72713,MI=55215,Pc="object_property_value_type",Cc="match_wildcard_pattern",Nc="for_in_assignment_pattern",Jm=8485,LI=43395,qI=229,Pa="true",BI=43743,Oc="enum_number_member",dL=234,UI=72969,yL="expected *",Ee=102,_L=200,H6="symbol",Wv="source",jc="tparam_const_modifier",XI=43714,Dc="jsx_fragment",Rc="jsx_attribute_name_identifier",W6="public",GI=43442,Fc="pattern_object_property",YI=65786,zI=70783,JI=43713,KI=72160,wL="*-/",Mc="export_named_specifier",Lc="arrow_function",HI=122623,Km=70006,gL="${",WI=43814,qc="generic_qualified_identifier_type",VI=199,Bc="jsx_spread_child",Hm=8489,Wm=184,bL=2047,$I=66955,Uc="try_catch",QI=70497,TL=313,EL=237,ZI=67431,xP=125183,SL=-602162310,on="params",rP="consequent",eP=68029,tP=67829,nP=68095,Xc="enum_string_body",uP=93823,iP=68351,fP=65495,Gc="declare_module",Yc="match_as_pattern_target",zc="body_expression",cP=66175,sP=191,Vm=70441,$m=65141,Qm="&",Jc="super_expression",Zm=126564,aP=72105,LI0="fs",He="throw",oP=68287,vP=67839,Ca=116,lP=110882,pP=69404,kP=123197,Vv=65279,il="src/parser/type_parser.ml",mP=68115,xh=126547,rh=126556,hP=73055,Kc="member_property_expression",Hc="enum_defaulted_member",dP=43071,yP=11726,Wc="component_type_rest_param",_P=68607,Vc="object_key",AL=160,$2="variance",wP=70655,gP=70414,fl="super",bP=123583,TP=65594,V6="method",EP=73648,$6=121,SP=93951,$c="pattern_array_element_pattern",AP=43764,IP=42993,eh=120145,PP=74879,IL=168,th=8486,CP=72001,Qc="tagged_template",Zc="module_ref_literal",NP=65312,Oo="implements",OP=43700,jP=120003,PL="Invalid_argument",xs=16777215,DP=83526,nh=69744,uh=12336,rs="switch_case",CL=-61,es="optional_member",RP=64274,ih=64322,fh=126530,FP=71998,ch=72970,MP=13311,LP=73647,qP=120074,cl="let",NL="global",ts="expression_statement",ns="component_type_params",BP=512,UP=69634,XP=67461,GP=123627,YP=64913,OL="children",jL="PropertyDefinition",DL=1026,RL="%li",us="declare_class",zP=43258,is="indexed_access_type",JP=124926,h2=112,KP="b",fs="predicate_expression",cs="if_alternate_statement",Q6="private",FL=-594953737,ML=140,HP="nan",WP=72103,sh=11735,ss="statement",VP="rmdir",ah=66512,$P="match",QP=198,ZP=11734,as="import_named_specifier",xC=69599,rC=68799,eC=194559,os="match_array_pattern",LL=174,vs="function_",ls="bigint_literal",t1=248,oh=67638,vh=126539,tC=11557,qL=214,nC=5760,We="break",vn="block",ps="match_member_pattern",uC=123565,iC=66815,m1="value",BL=1039100673,fC=69746,cC=70448,sC=74751,ks="init",aC=69551,lh=65548,ms="jsx_member_expression",ph=68096,d2=108,kh=126521,oC=71487,hs="match_statement",vC=178205,lC=12548,UL=" : is a directory",ln=".",pC=12348,sl=-835925911,B2="typeParameters",kC=66855,Y1="typeAnnotation",$v="bigint",ds="jsx_attribute_value_literal",mh=194,XL="T_JSX_TEXT",mC=68466,hh=126537,GL=67714067,hC=69487,dh="export",dC=43822,yhLine truncated
|
||||
`,pK="@.",kK="@@",mK="@%",hK=_D,dK="%c",yK="%s",_K=QR,wK=RL,gK=uD,bK=iF,TK="%f",EK="%B",SK="%{",AK="%}",IK="%(",PK="%)",CK="%a",NK="%t",OK="%?",jK="%r",DK="%_r",RK=[0,m2,850,23],FK=[0,m2,837,26],MK=[0,m2,847,28],LK=[0,m2,815,21],qK=[0,m2,819,21],BK=[0,m2,823,19],UK=[0,m2,827,22],XK=[0,m2,832,30],GK=[0,m2,851,23],YK=[0,m2,836,26],zK=[0,m2,846,28],JK=[0,m2,814,21],KK=[0,m2,818,21],HK=[0,m2,822,19],WK=[0,m2,826,22],VK=[0,m2,831,30];function zN(x){return x[2]===5?12:-6}function aB(x){return[0,0,b1(x)]}function oB(x,r){var e=jt(x[2]),t=x[1]+r|0;if(e<t){var u=e*2|0,i=t<=u?u:t,c=b1(i);Qq(x[2],0,c,0,e),x[2]=c}}function El(x,r){oB(x,1),ja(x[2],x[1],r),x[1]=x[1]+1|0}function X2(x,r){var e=Rx(r);oB(x,e),_n(r,0,x[2],x[1],e),x[1]=x[1]+e|0}function vB(x){return gl(x[2],0,x[1])}function lB(x){if(typeof x=="number")switch(x){case 0:return aK;case 1:return oK;case 2:return vK;case 3:return lK;case 4:return pK;case 5:return kK;default:return mK}switch(x[0]){case 0:return x[1];case 1:return x[1];default:return Gx(hK,$h(1,x[1]))}}function JN(x,r){for(var e=r;;){if(typeof e=="number")return;switch(e[0]){case 0:var t=e[1];X2(x,dK);var e=t;break;case 1:var u=e[1];X2(x,yK);var e=u;break;case 2:var i=e[1];X2(x,_K);var e=i;break;case 3:var c=e[1];X2(x,wK);var e=c;break;case 4:var v=e[1];X2(x,gK);var e=v;break;case 5:var o=e[1];X2(x,bK);var e=o;break;case 6:var l=e[1];X2(x,TK);var e=l;break;case 7:var k=e[1];X2(x,EK);var e=k;break;case 8:var h=e[2],E=e[1];X2(x,SK),JN(x,E),X2(x,AK);var e=h;break;case 9:var T=e[3],I=e[1];X2(x,IK),JN(x,I),X2(x,PK);var e=T;break;case 10:var N=e[1];X2(x,CK);var e=N;break;case 11:var P=e[1];X2(x,NK);var e=P;break;case 12:var R=e[1];X2(x,OK);var e=R;break;case 13:var q=e[1];X2(x,jK);var e=q;break;default:var X=e[1];X2(x,DK);var e=X}}}function f2(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,f2(x[1])];case 1:return[1,f2(x[1])];case 2:return[2,f2(x[1])];case 3:return[3,f2(x[1])];case 4:return[4,f2(x[1])];case 5:return[5,f2(x[1])];case 6:return[6,f2(x[1])];case 7:return[7,f2(x[1])];case 8:var r=x[1];return[8,r,f2(x[2])];case 9:var e=x[2],t=x[1];return[9,e,t,f2(x[3])];case 10:return[10,f2(x[1])];case 11:return[11,f2(x[1])];case 12:return[12,f2(x[1])];case 13:return[13,f2(x[1])];default:return[14,f2(x[1])]}}function G2(x){if(typeof x=="number")return[0,function(h0){},function(h0){},function(h0){},function(h0){}];switch(x[0]){case 0:var r=G2(x[1]),e=r[2],t=r[1];return[0,function(h0){t(D)},function(h0){e(D)},r[3],r[4]];case 1:var u=G2(x[1]),i=u[2],c=u[1];return[0,function(h0){c(D)},function(h0){i(D)},u[3],u[4]];case 2:var v=G2(x[1]),o=v[2],l=v[1];return[0,function(h0){l(D)},function(h0){o(D)},v[3],v[4]];case 3:var k=G2(x[1]),h=k[2],E=k[1];return[0,function(h0){E(D)},function(h0){h(D)},k[3],k[4]];case 4:var T=G2(x[1]),I=T[2],N=T[1];return[0,function(h0){N(D)},function(h0){I(D)},T[3],T[4]];case 5:var P=G2(x[1]),R=P[2],q=P[1];return[0,function(h0){q(D)},function(h0){R(D)},P[3],P[4]];case 6:var X=G2(x[1]),B=X[2],z=X[1];return[0,function(h0){z(D)},function(h0){B(D)},X[3],X[4]];case 7:var x0=G2(x[1]),W=x0[2],Z=x0[1];return[0,function(h0){Z(D)},function(h0){W(D)},x0[3],x0[4]];case 8:var t0=G2(x[2]),i0=t0[2],u0=t0[1];return[0,function(h0){u0(D)},function(h0){i0(D)},t0[3],t0[4]];case 9:var k0=x[2],o0=x[1],S0=G2(x[3]),s0=S0[4],v0=S0[3],m0=S0[2],p0=S0[1],E0=G2(_2(f2(o0),k0)),b0=E0[4],C0=E0[3],D0=E0[2],U0=E0[1];return[0,function(h0){p0(D),U0(D)},function(h0){D0(D),m0(D)},function(h0){v0(D),C0(D)},function(h0){b0(D),s0(D)}];case 10:var T0=G2(x[1]),M0=T0[2],y0=T0[1];return[0,function(h0){y0(D)},function(h0){M0(D)},T0[3],T0[4]];case 11:var G=G2(x[1]),j0=G[2],Q0=G[1];return[0,function(h0){Q0(D)},function(h0){j0(D)},G[3],G[4]];case 12:var q0=G2(x[1]),ix=q0[2],xx=q0[1];return[0,function(h0){xx(D)},function(h0){ix(D)},q0[3],q0[4]];case 13:var fx=G2(x[1]),yx=fx[4],R0=fx[3],lx=fx[2],kx=fx[1];return[0,function(h0){kx(D)},function(h0){lx(D)},function(h0){R0(D)},function(h0){yx(D)}];default:var Q=G2(x[1]),I0=Q[4],M=Q[3],d0=Q[2],g0=Q[1];return[0,function(h0){g0(D)},function(h0){d0(D)},function(h0){M(D)},function(h0){I0(D)}]}}function _2(x,r){x:{r:{e:{t:{n:{u:{i:{if(typeof x!="number"){switch(x[0]){case 0:var e=x[1];if(typeof r!="number")switch(r[0]){case 0:return[0,_2(e,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 1:var t=x[1];if(typeof r!="number")switch(r[0]){case 1:return[1,_2(t,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 2:var u=x[1];if(typeof r!="number")switch(r[0]){case 2:return[2,_2(u,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 3:var i=x[1];if(typeof r!="number")switch(r[0]){case 3:return[3,_2(i,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 4:var c=x[1];if(typeof r!="number")switch(r[0]
Line truncated
|
||||
`];function QN(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return d(vr(AW),e);if(e3(e)===xl)return d(vr(EW),e);if(e3(e)!==QE)return SW;for(var t=wN("%.12g",e),u=0,i=Rx(t);;){if(i<=u)return Gx(t,TW);var c=F1(t,u);x:{if(48<=c){if(58>c)break x}else if(c===45)break x;return t}var u=u+1|0}}function mB(x,r){if(x.length-1<=r)return IW;var e=mB(x,r+1|0),t=QN(x,r);return p(vr(PW),t,e)}function _4(x){x:{r:{for(var r=vl($N);r;){e:{var e=r[2],t=r[1];try{var u=d(t,x)}catch{break e}if(u)break r}var r=e}var i=0;break x}var i=[0,u[1]]}if(i)return i[1];if(x===NN)return DW;if(x===Bq)return RW;if(x[1]===qq){var c=x[2],v=c[3],o=c[2],l=c[1];return La(vr(ON),l,o,v,v+5|0,FW)}if(x[1]===Nr){var k=x[2],h=k[3],E=k[2],T=k[1];return La(vr(ON),T,E,h,h+6|0,MW)}if(x[1]===s4){var I=x[2],N=I[3],P=I[2],R=I[1];return La(vr(ON),R,P,N,N+6|0,LW)}if(e3(x)===0){var q=x.length-1,X=x[1][1];if(2<q>>>0)var B=mB(x,2),z=QN(x,1),x0=p(vr(CW),z,B);else switch(q){case 0:var x0=NW;break;case 1:var x0=OW;break;default:var W=QN(x,1),x0=d(vr(jW),W)}var Z=[0,X,[0,x0]]}else var Z=[0,x[1],0];var t0=Z[2],i0=Z[1];return t0?Gx(i0,t0[1]):i0}function ZN(x,r){var e=Hz(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var c=S1(e,i)[1+i];let x0=i;var v=function(Z){return Z?x0===0?qW:BW:x0===0?UW:XW};if(c[0]===0){if(c[3]===c[6])var o=c[3],h=d(vr(GW),o);else var l=c[6],k=c[3],h=p(vr(KW),k,l);var E=c[7],T=c[4],I=c[8]?YW:JW,N=c[2],P=c[9],R=v(c[1]),X=[0,XJ(vr(zW),R,P,N,I,h,T,E)]}else if(c[1])var X=0;else var q=v(0),X=[0,d(vr(HW),q)];if(X){var B=X[1];d(kB(x,WW),B)}var z=i+1|0;if(t===i)break;var i=z}}function xO(x){for(;;){var r=vl($N),e=1-Ph($N,r,[0,x,r]);if(!e)return e}}var VW=[0,rx,`(Cannot print locations:
|
||||
bytecode executable program file not found)`,`(Cannot print locations:
|
||||
bytecode executable program file appears to be corrupt)`,`(Cannot print locations:
|
||||
bytecode executable program file has wrong magic number)`,`(Cannot print locations:
|
||||
bytecode executable program file cannot be opened;
|
||||
-- too many open files. Try running with OCAMLRUNPARAM=b=2)`].slice(),$W=[0,[11,CS,[2,0,[12,10,0]]],UM],QW=[0],ZW="Fatal error: out of memory in uncaught exception handler",xV=[0,[11,CS,[2,0,[12,10,0]]],UM],rV=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s
|
||||
`];CN(ID,function(x,r){try{try{var e=r?QW:gq(0);try{DN(D)}catch{}try{var t=_4(x);d(VN($W),t),ZN(dn,e);var u=_J(0);if(u<0){var i=Hh(u);zq(S1(VW,i)[1+i])}var c=pn(dn),v=c}catch(T){var o=M1(T),l=_4(x);d(VN(xV),l),ZN(dn,e);var k=_4(o);d(VN(rV),k),ZN(dn,gq(0));var v=pn(dn)}var h=v}catch(T){var E=M1(T);if(E!==NN)throw J0(E,0);var h=zq(ZW)}return h}catch{return 0}});var eV=[t1,"Stdlib.Fun.Finally_raised",js(0)],tV="Fun.Finally_raised: ";xO(function(x){return x[1]===eV?[0,Gx(tV,_4(x[2]))]:0});var nV="Digest.BLAKE2: wrong hash size";function rO(x){var r=x[1]<1?1:0,e=r||(64<x[1]?1:0);e&&U2(nV)}rO([0,16]),rO([0,32]),rO([0,64]);function hB(x){var r=I2(x);return yJ(r,0,Rx(r))}var uV=ct(1,0,0),iV=ct(0,0,0),fV=ct(0,0,0),cV=ct(2,0,0),sV=ct(1,0,0);function dB(x){return jz(7,0,[0,4])}function yB(x,r,e,t,u){e4(x,0,Aq(r,uV)),e4(x,1,e);var i=r3(t,iV)?t:sV;e4(x,2,i);var c=r3(u,fV)?u:cV;e4(x,3,c)}function _B(x,r,e,t){var u=dB(D);return yB(u,x,r,e,t),u}var aV=ct(14371852,15349651,22696),oV=ct(12230193,11438743,35013),vV=ct(1424933,15549263,2083),lV=ct(9492471,4696708,aF);Rs([0,function(x){var r=Uh(x),e=Uh(x),t=Uh(x);return _B(r,e,t,Uh(x))}],function(x){return _B(lV,vV,oV,aV)});var td=0,wB=-1,eO=[t1,"Stdlib.Format.String_tag",js(0)];function w4(x,r){return x[13]=x[13]+r[3]|0,qN(r,x[28])}var gB=1000000010;function pV(x,r){return x<=r?x:r}var kV=[t1,"Stdlib.Queue.Empty",js(0)],mV=[0,rx,0,rx],hV=rx,dV=rx,yV=rx,_V=rx,wV=[0,rx],gV=ug;function tO(x,r){return Z0(x[17],r,0,Rx(r))}function nd(x){return d(x[19],0)}function bB(x,r,e){x[9]=x[9]-r|0,tO(x,e),x[11]=0}function ud(x,r){var e=C(r,rx);return e&&bB(x,Rx(r),r)}function f3(x,r,e){var t=r[3],u=r[2];return ud(x,r[1]),nd(x),x[11]=1,x[10]=pV(x[8],(x[6]-e|0)+u|0),x[9]=x[6]-x[10]|0,d(x[21],x[10]),ud(x,t)}function TB(x,r){return f3(x,mV,r)}function Al(x,r){var e=r[2],t=r[3];return ud(x,r[1]),x[9]=x[9]-e|0,d(x[20],e),ud(x,t)}function bV(x,r,e){if(typeof e=="number")switch(e){case 0:var t=Tl(x[3]);if(!t)return;var u=t[1][1],i=function(Q0,q0){if(!q0)return[0,Q0,0];var ix=q0[1],xx=q0[2];return sJ(Q0,ix)?[0,Q0,q0]:[0,ix,i(Q0,xx)]};u[1]=i(x[6]-x[9]|0,u[1]);return;case 1:bl(x[2]);return;case 2:bl(x[3]);return;case 3:var c=Tl(x[2]);return c?TB(x,c[1][2]):nd(x);case 4:var v=x[10]!==(x[6]-x[9]|0)?1:0;if(!v)return v;var o=x[28],l=o[2];if(l){var k=l[1];if(l[2]){var h=l[2];o[1]=o[1]-1|0,o[2]=h;var E=[0,k]}else{LN(o);var E=[0,k]}}else var E=0;if(!E)return;var T=E[1],I=T[1];x[12]=x[12]-T[3]|0,x[9]=x[9]+I|0;return;default:var N=bl(x[5]);return N?tO(x,d(x[25],N[1])):void 0}switch(e[0]){case 0:return bB(x,r,e[1]);case 1:var P=e[2],R=e[1],q=P[1],X=P[2],B=Tl(x[2]);if(!B)return;var z=B[1],x0=z[2];switch(z[1]){case 0:return Al(x,R);case 1:return f3(x,P,x0);case 2:return f3(x,P,x0);case 3:return x[9]<(r+Rx(q)|0)?f3(x,P,x0):Al(x,R);case 4:return x[11]?Al(x,R):x[9]<(r+Rx(q)|0)||((x[6]-x0|0)+X|0)<x[10]?f3(x,P,x0):Al(x,R);default:return Al(x,R)}case 2:var W=x[6]-x[9]|0,Z=e[2],t0=e[1],i0=Tl(x[3]);if(!i0)return;var u0=i0[1][1],k0=u0[1];if(k0)for(var o0=u0[1],S0=k0[1];;){if(o0){var s0=o0[1],v0=o0[2];if(W>s0){var o0=v0;continue}var m0=s0}else var m0=S0;var p0=m0;break}else var p0=W;var E0=p0-W|0;return 0<=E0?Al(x,[0,dV,E0+t0|0,hV]):f3(x,[0,_V,p0+Z|0,yV],x[6]);case 3:var b0=e[2],C0=e[1];if(x[8]<(x[6]-x[9]|0)){var D0=Tl(x[2]);if(D0){var U0=D0[1],T0=U0[2],M0=U0[1];x[9]<T0&&3>=M0-1>>>0&&TB(x,T0)}else nd(x)}var y0=x[9]-C0|0,G=b0===1?1:x[9]<r?b0:5;return u3([0,G,y0],x[2]);case 4:return u3(e[1],x[3]);default:var j0=e[1];return tO(x,d(x[24],j0)),u3(j0,x[5])}}function EB(x){for(;;){var r=x[28][2],e=r?[0,r[1]]:0;if(!e)return;var t=e[1],u=t[1],i=0<=u?1:0,c=t[3],v=t[2],o=x[13]-x[12]|0,l=i||(x[9]<=o?1:0);if(!l)return l;var k=x[28],h=k[2];if(!h)throw J0(kV,1);if(h[2]){var E=h[2];k[1]=k[1]-1|0,k[2]=E}else LN(k);var T=0<=u?u:gB;bV(x,T,v),x[12]=c+x[12]|0}}function SB(x,r){return w4(x,r),EB(x)}function AB(x,r,e){return SB(x,[0,r,[0,e],r])}function nO(x){return m4(x),u3([0,-1,[0,wB,wV,0]],x)}function uO(x,r){var e=Tl(x[1]);if(e){var t=e[1],u=t[2],i=u[1];if(t[1]<x[12])return nO(x[1]);var c=u[2];if(typeof c!="number")switch(c[0]){case 3:1-r&&(u[1]=x[13]+i|0,bl(x[1]));return;case 1:case 2:r&&(u[1]=x[13]+i|0,bl(x[1]));return}}}function IB(x,r,e){return w4(x,e),r&&uO(x,1),u3([0,x[13],e],x[1])}function PB(x,r,e){if(x[14]=x[14]+1|0,x[14]<x[15])return IB(x,0,[0,-x[13]|0,[3,r,e],0]);var t=x[14]===x[15]?1:0;if(!t)return t;var u=x[16];return AB(x,Rx(u),u)}function CB(x,r){1<x[14]&&(x[14]<x[15]&&(w4(x,[0,td,1,0]),uO(x,1),uO(x,0)),x[14]=x[14]-1|0)}function NB(x,r){if(x[23]&&w4(x,[0,td,5,0]),x[22]){var e=bl(x[4]);if(e)return d(x[27],e[1])}}function OB(x,r){for(P2(function(e){return NB(x,D)},x[4][1]);!(1>=x[14]);)CB(x,D);return x[13]=gB,EB(x),r&&nd(x),x[12]=1,x[13]=1,LN(x[28]),nO(x[1]),m4(x[2]),m4(x[3]),m4(x[4]),m4(x[5]),x[10]=0,x[14]=0,x[9]=x[6],PB(x,0,3)}function iO(x,r,e){var t=x[14]<x[15]?1:0;return t&&AB(x,r,e)}function jB(x,r,e){return iO(x,r,e)}function g4(x,r){return jB(x,1,$h(1,r))}function c3(x,r){return OB(x,0),d(x[18],0)}function fO(x,r){return
Line truncated
|
||||
`,t70=ug,n70="unreachable regexp_class",u70=LD,i70="unreachable regexp_body",f70=rx,c70=rx,s70=rx,a70=rx,o70=hR,v70="{'>'}",l70=F6,p70="{'}'}",k70=em,m70=Ao,h70=NT,d70=Qm,y70=hR,_70=Ao,w70=NT,g70=Qm,b70="unreachable type_token wholenumber",T70="unreachable type_token wholebigint",E70="unreachable type_token floatbigint",S70="unreachable type_token scinumber",A70="unreachable type_token scibigint",I70="unreachable type_token hexnumber",P70="unreachable type_token hexbigint",C70="unreachable type_token legacyoctnumber",N70="unreachable type_token octnumber",O70="unreachable type_token octbigint",j70="unreachable type_token binnumber",D70="unreachable type_token bigbigint",R70="unreachable type_token",F70=yL,M70=[11,1],L70=[11,0],q70="unreachable template_tail",B70=rx,U70=rx,X70="unreachable jsx_child",G70="unreachable jsx_tag",Y70=[0,hw],z70=[0,913],J70=[0,Y3],K70=[0,mh],H70=[0,cR],W70=[0,QP],V70=[0,8747],$70=[0,gD],Q70=[0,916],Z70=[0,8225],xu0=[0,935],ru0=[0,VI],eu0=[0,914],tu0=[0,vL],nu0=[0,IF],uu0=[0,RE],iu0=[0,915],fu0=[0,TD],cu0=[0,919],su0=[0,917],au0=[0,_L],ou0=[0,KD],vu0=[0,HR],lu0=[0,924],pu0=[0,923],ku0=[0,922],mu0=[0,oF],hu0=[0,921],du0=[0,eM],yu0=[0,Hg],_u0=[0,xF],wu0=[0,ty],gu0=[0,927],bu0=[0,937],Tu0=[0,HD],Eu0=[0,$R],Su0=[0,uR],Au0=[0,338],Iu0=[0,352],Pu0=[0,929],Cu0=[0,936],Nu0=[0,8243],Ou0=[0,928],ju0=[0,934],Du0=[0,qL],Ru0=[0,o_],Fu0=[0,933],Mu0=[0,pM],Lu0=[0,nL],qu0=[0,fD],Bu0=[0,920],Uu0=[0,932],Xu0=[0,jD],Gu0=[0,dR],Yu0=[0,KF],zu0=[0,JR],Ju0=[0,918],Ku0=[0,SR],Hu0=[0,HF],Wu0=[0,926],Vu0=[0,lF],$u0=[0,jM],Qu0=[0,925],Zu0=[0,39],xi0=[0,8736],ri0=[0,8743],ei0=[0,38],ti0=[0,945],ni0=[0,8501],ui0=[0,Sv],ii0=[0,8226],fi0=[0,JD],ci0=[0,946],si0=[0,8222],ai0=[0,RD],oi0=[0,wM],vi0=[0,8776],li0=[0,qI],pi0=[0,8773],ki0=[0,9827],mi0=[0,CD],hi0=[0,967],di0=[0,qM],yi0=[0,Wm],_i0=[0,PD],wi0=[0,GF],gi0=[0,8595],bi0=[0,8224],Ti0=[0,8659],Ei0=[0,sR],Si0=[0,8746],Ai0=[0,8629],Ii0=[0,yR],Pi0=[0,8745],Ci0=[0,8195],Ni0=[0,8709],Oi0=[0,iD],ji0=[0,dL],Di0=[0,aL],Ri0=[0,Gp],Fi0=[0,9830],Mi0=[0,8707],Li0=[0,8364],qi0=[0,EM],Bi0=[0,rl],Ui0=[0,951],Xi0=[0,8801],Gi0=[0,949],Yi0=[0,8194],zi0=[0,8805],Ji0=[0,947],Ki0=[0,8260],Hi0=[0,jE],Wi0=[0,nR],Vi0=[0,$S],$i0=[0,8704],Qi0=[0,XF],Zi0=[0,EL],xf0=[0,8230],rf0=[0,9829],ef0=[0,8596],tf0=[0,8660],nf0=[0,62],uf0=[0,402],if0=[0,948],ff0=[0,nF],cf0=[0,E9],sf0=[0,8712],af0=[0,sP],of0=[0,953],vf0=[0,8734],lf0=[0,8465],pf0=[0,IM],kf0=[0,8220],mf0=[0,8968],hf0=[0,8592],df0=[0,Sg],yf0=[0,10216],_f0=[0,955],wf0=[0,8656],gf0=[0,954],bf0=[0,60],Tf0=[0,8216],Ef0=[0,8249],Sf0=[0,NM],Af0=[0,9674],If0=[0,8727],Pf0=[0,8970],Cf0=[0,AL],Nf0=[0,8711],Of0=[0,956],jf0=[0,8722],Df0=[0,j_],Rf0=[0,NS],Ff0=[0,8212],Mf0=[0,NR],Lf0=[0,8804],qf0=[0,957],Bf0=[0,kF],Uf0=[0,8836],Xf0=[0,8713],Gf0=[0,KR],Yf0=[0,8715],zf0=[0,8800],Jf0=[0,8853],Kf0=[0,959],Hf0=[0,969],Wf0=[0,8254],Vf0=[0,HM],$f0=[0,339],Qf0=[0,jv],Zf0=[0,BM],xc0=[0,s9],rc0=[0,ul],ec0=[0,8855],tc0=[0,ME],nc0=[0,t1],uc0=[0,xI],ic0=[0,py],fc0=[0,da],cc0=[0,rL],sc0=[0,982],ac0=[0,960],oc0=[0,966],vc0=[0,8869],lc0=[0,8240],pc0=[0,8706],kc0=[0,8744],mc0=[0,8211],hc0=[0,10217],dc0=[0,8730],yc0=[0,8658],_c0=[0,34],wc0=[0,968],gc0=[0,8733],bc0=[0,8719],Tc0=[0,961],Ec0=[0,8971],Sc0=[0,LL],Ac0=[0,8476],Ic0=[0,8221],Pc0=[0,8969],Cc0=[0,8594],Nc0=[0,z_],Oc0=[0,bM],jc0=[0,Sb],Dc0=[0,8901],Rc0=[0,353],Fc0=[0,8218],Mc0=[0,8217],Lc0=[0,8250],qc0=[0,8835],Bc0=[0,8721],Uc0=[0,8838],Xc0=[0,8834],Gc0=[0,9824],Yc0=[0,8764],zc0=[0,962],Jc0=[0,963],Kc0=[0,8207],Hc0=[0,952],Wc0=[0,8756],Vc0=[0,964],$c0=[0,e8],Qc0=[0,8839],Zc0=[0,AC],xs0=[0,fk],rs0=[0,ol],es0=[0,8657],ts0=[0,8482],ns0=[0,lk],us0=[0,732],is0=[0,Q3],fs0=[0,8201],cs0=[0,977],ss0=[0,sM],as0=[0,xl],os0=[0,965],vs0=[0,978],ls0=[0,IL],ps0=[0,jS],ks0=[0,WL],ms0=[0,tR],hs0=[0,8205],ds0=[0,950],ys0=[0,Bk],_s0=[0,hF],ws0=[0,QE],gs0=[0,958],bs0=[0,8593],Ts0=[0,oD],Es0=[0,8242],Ss0=[0,kI],As0="unreachable regexp",Is0="unreachable token wholenumber",Ps0="unreachable token wholebigint",Cs0="unreachable token floatbigint",Ns0="unreachable token scinumber",Os0="unreachable token scibigint",js0="unreachable token hexnumber",Ds0="unreachable token hexbigint",Rs0="unreachable token legacyoctnumber",Fs0="unreachable token legacynonoctnumber",Ms0="unreachable token octnumber",Ls0="unreachable token octbigint",qs0="unreachable token bignumber",Bs0="unreachable token bigint",Us0="unreachable token",Xs0=yL,Gs0=[7,"#!"],Ys0="expected ?",zs0="unreachable string_escape",Js0=V2,Ks0=P6,Hs0=P6,Ws0=V2,Vs0=KP,$s0=EF,Qs0="n",Zs0="r",xa0="t",ra0=zF,ea0=P6,ta0=Ao,na0=Ao,ua0="unreachable id_char",ia0=Ao,fa0=Ao,ca0=P6,sa0=uL,aa0=pD,oa0=gb,va0=[28,"token ILLEGAL"],la0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],pa0=[0,1],ka0=[0,1],ma0=OF,ha0=OF,da0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `expo
Line truncated
|
||||
\v\x07\f\r\x1B ! "#$%
Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07Line truncated
|
||||
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xLine truncated
|
||||
\v\f\r`,t+1|0)-1|0;if(14<u>>>0)var i=g(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:H(r,15);var i=Ie(y(r))===0?15:g(r);break;case 4:H(r,4);var i=re(y(r))===0?e(r):g(r);break;case 5:H(r,11);var i=re(y(r))===0?e(r):g(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:H(r,14);var c=l3(y(r));if(c===0)var i=Pr(y(r))===0&&Pr(y(r))===0&&Pr(y(r))===0?12:g(r);else if(c===1&&Pr(y(r))===0){for(;;){var v=o3(y(r));if(v!==0)break}var i=v===1?13:g(r)}else var i=g(r);break;case 13:var i=10;break;default:H(r,14);var i=Pr(y(r))===0&&Pr(y(r))===0?1:g(r)}if(16<i>>>0)return Px(zs0);switch(i){case 0:var o=Fx(r);return[0,x,o,o1(r),0];case 1:var l=Fx(r);return[0,x,l,[0,st(Gx(Js0,l))],0];case 2:var k=Fx(r),h=st(Gx(Ks0,k));return D6<=h?[0,x,k,[0,h>>>3|0,48+(h&7)|0],1]:[0,x,k,[0,h],1];case 3:var E=Fx(r);return[0,x,E,[0,st(Gx(Hs0,E))],1];case 4:return[0,x,Ws0,[0,0],0];case 5:return[0,x,Vs0,[0,8],0];case 6:return[0,x,$s0,[0,12],0];case 7:return[0,x,Qs0,[0,10],0];case 8:return[0,x,Zs0,[0,13],0];case 9:return[0,x,xa0,[0,9],0];case 10:return[0,x,ra0,[0,11],0];case 11:var T=Fx(r);return[0,x,T,[0,st(Gx(ea0,T))],1];case 12:var I=Fx(r);return[0,x,I,[0,st(Gx(ta0,C2(I,1,Rx(I)-1|0)))],0];case 13:var N=Fx(r),P=st(Gx(na0,C2(N,2,Rx(N)-3|0))),R=Gk<P?lt(x,Jr(x,r)):x;return[0,R,N,[0,P],0];case 14:var q=Fx(r),X=o1(r);return[0,lt(x,Jr(x,r)),q,X,0];case 15:var B=Fx(r);return[0,ee(x,r),B,[0],0];default:var z=Fx(r);return[0,x,z,o1(r),0]}}function sX(x,r,e,t,u,i){for(var c=x,v=u;;){Tr(i);var o=y(i),l=92<o?1:z0("",o+1|0)-1|0;if(4<l>>>0)var k=g(i);else switch(l){case 0:var k=3;break;case 1:for(;;){H(i,4);var h=y(i),E=-1<h?91<h?92<h?0:-1:z0("\0\0\0",h)-1|0:-1;if(E!==0)break}var k=g(i);break;case 2:var k=2;break;case 3:var k=0;break;default:var k=1}if(4<k>>>0)return Px(Zn0);switch(k){case 0:var T=Fx(i);if(lr(t,T),Sr(r,T))return[0,c,Pe(c,i),v];lr(e,T);break;case 1:lr(t,x70);var I=cX(c,i),N=I[4],P=I[3],R=I[2],q=I[1],X=N||v;lr(t,R),tB(function(S0){return Fs(e,S0)},P);var c=q,v=X;break;case 2:var B=Fx(i);lr(t,B);var z=ee(lt(c,Jr(c,i)),i);return lr(e,B),[0,z,Pe(z,i),v];case 3:var x0=Fx(i);lr(t,x0);var W=lt(c,Jr(c,i));return lr(e,x0),[0,W,Pe(W,i),v];default:var Z=i[6],t0=i[3]-Z|0,i0=b1(t0*4|0),u0=T4(i[1],Z,t0,i0);XN(t,i0,0,u0),XN(e,i0,0,u0)}}}function aX(x,r,e,t){for(var u=x;;){Tr(t);var i=y(t),c=96<i?1:z0("\x07",i+1|0)-1|0;if(6<c>>>0)var v=g(t);else switch(c){case 0:var v=0;break;case 1:for(;;){H(t,6);var o=y(t),l=-1<o?95<o?96<o?0:-1:z0("\0\0\0\0",o)-1|0:-1;if(l!==0)break}var v=g(t);break;case 2:var v=5;break;case 3:H(t,5);var v=Ie(y(t))===0?4:g(t);break;case 4:H(t,6);var k=y(t),h=e1<k?un<k?-1:0:-1,v=h===0?2:g(t);break;case 5:var v=3;break;default:var v=1}if(6<v>>>0)return Px(r70);switch(v){case 0:return[0,lt(u,Jr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:at(e,92);var E=cX(u,t),T=E[3],I=E[1];lr(e,E[2]),tB(function(R){return Fs(r,R)},T);var u=I;break;case 4:lr(e,e70),lr(r,t70);var u=ee(u,t);break;case 5:lr(e,Fx(t)),at(r,10);var u=ee(u,t);break;default:var N=Fx(t);lr(e,N),lr(r,N)}}}function VE0(x,r,e){for(var t=x;;){Tr(e);var u=y(e),i=92<u?e2<u?1:v2<u?2:1:z0("\x07",u+1|0)-1|0;if(6<i>>>0)var c=g(e);else switch(i){case 0:var c=0;break;case 1:for(;;){H(e,7);var v=y(e),o=-1<v?90<v?92<v?v2<v?e2<v?0:-1:0:-1:z0("\0\0\0",v)-1|0:-1;if(o!==0)break}var c=g(e);break;case 2:var c=6;break;case 3:H(e,6);var c=Ie(y(e))===0?6:g(e);break;case 4:if(H(e,4),MU(y(e))===0){for(;H(e,3),MU(y(e))===0;);var c=g(e)}else var c=g(e);break;case 5:var c=5;break;default:H(e,7);var l=y(e),k=-1<l?13<l?e2<l?0:v2<l?1:0:z0("",l)-1|0:-1;if(2<k>>>0)var c=g(e);else switch(k){case 0:var c=2;break;case 1:var c=1;break;default:H(e,1);var c=Ie(y(e))===0?1:g(e)}}if(7<c>>>0)return Px(i70);switch(c){case 0:return[0,D2(t,Jr(t,e),h2),f70];case 1:return[0,ee(D2(t,Jr(t,e),h2),e),c70];case 2:lr(r,Fx(e));break;case 3:var h=Fx(e);return[0,t,C2(h,1,Rx(h)-1|0)];case 4:return[0,t,s70];case 5:at(r,91);x:{r:{e:{t:{n:for(;;){Tr(e);var E=y(e),T=93<E?e2<E?1:v2<E?2:1:z0("",E+1|0)-1|0;if(5<T>>>0)var I=g(e);else switch(T){case 0:var I=0;break;case 1:for(;;){H(e,5);var N=y(e),P=-1<N?91<N?93<N?v2<N?e2<N?0:-1:0:-1:z0("\0\0",N)-1|0:-1;if(P
Line truncated
|
||||
`);return ox.length>1&&ox.every(Yx=>Yx.trimStart()[0]==="*")}var Zj=new WeakMap;function mI0(a0){return Zj.has(a0)||Zj.set(a0,kI0(a0)),Zj.get(a0)}var xD=mI0;function hI0(a0){if(a0.length<2)return;let ox;for(let Yx=a0.length-1;Yx>=0;Yx--){let xr=a0[Yx];if(ox&&bt(xr)===xn(ox)&&xD(xr)&&xD(ox)&&(a0.splice(Yx+1,1),xr.value+="*//*"+ox.value,xr.range=[xn(xr),bt(ox)]),!ez(xr)&&!l6(xr))throw new TypeError(`Unknown comment type: "${xr.type}".`);ox=xr}}var nz=hI0;function dI0(a0){return a0!==null&&typeof a0=="object"}var uz=dI0;var yp=null;function _p(a0){if(yp!==null&&typeof yp.property){let ox=yp;return yp=_p.prototype=null,ox}return yp=_p.prototype=a0??Object.create(null),new _p}var yI0=10;for(let a0=0;a0<=yI0;a0++)_p();function rD(a0){return _p(a0)}function _I0(a0,ox="type"){rD(a0);function Yx(xr){let E1=xr[ox],S2=a0[E1];if(!Array.isArray(S2))throw Object.assign(new Error(`Missing visitor keys for '${E1}'.`),{node:xr});return S2}return Yx}var iz=_I0;var $=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],fz={AccessorProperty:$[0],AnyTypeAnnotation:$[1],ArgumentPlaceholder:$[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:$[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:$[3],AsExpression:$[4],AssignmentExpression:$[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:$[6],BigIntLiteral:$[1],BigIntLiteralTypeAnnotation:$[1],BigIntTypeAnnotation:$[1],BinaryExpression:$[5],BindExpression:["object","callee"],BlockStatement:$[7],BooleanLiteral:$[1],BooleanLiteralTypeAnnotation:$[1],BooleanTypeAnnotation:$[1],BreakStatement:$[8],CallExpression:$[9],CatchClause:["param","body"],ChainExpression:$[3],ClassAccessorProperty:$[0],ClassBody:$[10],ClassDeclaration:$[11],ClassExpression:$[11],ClassImplements:$[12],ClassMethod:$[13],ClassPrivateMethod:$[13],ClassPrivateProperty:$[14],ClassProperty:$[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:$[15],ConditionalExpression:$[16],ConditionalTypeAnnotation:$[17],ContinueStatement:$[8],DebuggerStatement:$[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:$[18],DeclareEnum:$[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:$[20],DeclareFunction:["id","predicate"],DeclareHook:$[21],DeclareInterface:$[22],DeclareModule:$[19],DeclareModuleExports:$[23],DeclareNamespace:$[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:$[24],DeclareVariable:$[21],Decorator:$[3],Directive:$[18],DirectiveLiteral:$[1],DoExpression:$[10],DoWhileStatement:$[25],EmptyStatement:$[1],EmptyTypeAnnotation:$[1],EnumBigIntBody:$[26],EnumBigIntMember:$[27],EnumBooleanBody:$[26],EnumBooleanMember:$[27],EnumDeclaration:$[19],EnumDefaultedMember:$[21],EnumNumberBody:$[26],EnumNumberMember:$[27],EnumStringBody:$[26],EnumStringMember:$[27],EnumSymbolBody:$[26],ExistsTypeAnnotation:$[1],ExperimentalRestProperty:$[6],ExperimentalSpreadProperty:$[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:$[28],ExportNamedDeclaration:$[20],ExportNamespaceSpecifier:$[28],ExportSpecifier:["local","exported"],ExpressionStatement:$[3],File:["program"],ForInStatement:$[29],ForOfStatement:$[29],ForStatement:["init","test","update","body"],FunctionDeclaration:$[30],Fu
Line truncated
|
||||
$1 $2
|
||||
`);a0=a0.replace(vz,"").trimEnd();let xr=Object.create(null),E1=wp(0,a0,lz,"").replace(vz,"").trimEnd(),S2;for(;S2=lz.exec(a0);){let da=wp(0,S2[2],II0,"");if(typeof xr[S2[1]]=="string"||Array.isArray(xr[S2[1]])){let Tt=xr[S2[1]];xr[S2[1]]=[...NI0,...Array.isArray(Tt)?Tt:[Tt],da]}else xr[S2[1]]=da}return{comments:E1,pragmas:xr}}var mz=["noformat","noprettier"],hz=["format","prettier"];function OI0(a0){if(!a0.startsWith("#!"))return"";let ox=a0.indexOf(`
|
||||
`);return ox===-1?a0:a0.slice(0,ox)}var dz=OI0;function yz(a0){let ox=dz(a0);ox&&(a0=a0.slice(ox.length+1));let Yx=pz(a0),{pragmas:xr,comments:E1}=kz(Yx);return{shebang:ox,text:a0,pragmas:xr,comments:E1}}function _z(a0){let{pragmas:ox}=yz(a0);return hz.some(Yx=>Object.prototype.hasOwnProperty.call(ox,Yx))}function wz(a0){let{pragmas:ox}=yz(a0);return mz.some(Yx=>Object.prototype.hasOwnProperty.call(ox,Yx))}function jI0(a0){return a0=typeof a0=="function"?{parse:a0}:a0,{astFormat:"estree",hasPragma:_z,hasIgnorePragma:wz,locStart:xn,locEnd:bt,...a0}}var gz=jI0;var DI0={comments:!1,components:!0,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,pattern_matching:!0,tokens:!1};function RI0(a0){let{message:ox,loc:Yx}=a0;if(!Yx)return a0;let{start:xr,end:E1}=Yx;return ZY(ox,{loc:{start:{line:xr.line,column:xr.column+1},end:{line:E1.line,column:E1.column+1}},cause:a0})}function FI0(a0){let ox=bz.default.parse(a0,DI0),[Yx]=ox.errors;if(Yx)throw RI0(Yx);return oz(ox,{parser:"flow",text:a0})}var MI0=gz(FI0);export{Tz as default,tD as parsers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
glimmer: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
glimmer: Printer;
|
||||
};
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var Oe=Object.defineProperty;var Un=Object.getOwnPropertyDescriptor;var Mn=Object.getOwnPropertyNames;var zn=Object.prototype.hasOwnProperty;var Ie=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Yn=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Mn(t))!zn.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(s=Un(t,n))||s.enumerable});return e};var Gn=e=>Yn(Oe({},"__esModule",{value:!0}),e);var Di={};Ie(Di,{languages:()=>Dn,parsers:()=>Sr,printers:()=>Li});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var Kn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Wn=Jt("replaceAll",function(){if(typeof this=="string")return Kn}),St=Wn;function jn(e){return this[e<0?this.length+e:e]}var Qn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return jn}),V=Qn;var Jn=()=>{},Dt=Jn;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",xt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,xt]);function $n(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=$n;var Xn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Zn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Xn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Be=class extends Error{name="InvalidDocError";constructor(t){super(Zn(t)),this.doc=t}},Lr=Be;function ts(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case xt:return t(i);default:throw new Lr(i)}}}function ie(e,t=Dr){return ts(e,r=>typeof r=="string"?ct(t,r.split(`
|
||||
`)):r)}var M=Dt,ae=Dt,Or=Dt,Ir=Dt;function F(e){return M(e),{type:kt,contents:e}}function es(e,t){return Ir(e),M(t),{type:Et,contents:t,n:e}}function Re(e){return es(-1,e)}var qe={type:xt};function Ve(e){return Or(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Fe(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ct(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var N={type:Q},H={type:Q,soft:!0},rs={type:Q,hard:!0},ut=[rs,qe],ns={type:Q,hard:!0,literal:!0},Dr=[ns,qe];var Br=Object.freeze({character:"'",codePoint:39}),Rr=Object.freeze({character:'"',codePoint:34}),ss=Object.freeze({preferred:Br,alternate:Rr}),is=Object.freeze({preferred:Rr,alternate:Br});function as(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?ss:is,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}var oe=as;function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ue=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${He([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
|
||||
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
|
||||
`).map(s=>s.slice(r)).join(`
|
||||
`)}},qr=Ue;var os=[" ",`
|
||||
`,"\f","\r"," "],ls=new qr(os),R=ls;function cs(e){return Array.isArray(e)&&e.length>0}var Bt=cs;var Me=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Vr=Me;function Fr(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=R.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Fr.ignoredProperties=new Set(["loc","selfClosing"]);var Hr=Fr;function us(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Ur=us;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var hs=10;for(let e=0;e<=hs;e++)qt();function ze(e){return qt(e)}function ps(e,t="type"){ze(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Mr=ps;var fs=Object.freeze([]);function Yr(){return fs}var ro=Yr(),no=Yr();var Ye=Object.assign;var zr=console;function Gr(e,t="unexpected unreachable branch"){throw zr.log("unreachable",e),zr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var ms=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],kr=[2,51],Er=[1,64],vr=[67,73,75,77,84,85,86,87,88,89],wr=[56,67,73,75,84,85,86,87,88,89],Tr=[1,75],we=[1,76],Te=[1,83],dt=[33,67,73,75,79,84,85,86,87,88,89],xr=[23,67,73,75,84,85,86,87,88,89],Nr=[67,68,73,75,84,85,86,87,88,89],gt=[33,79],xe=[1,134],Ar=[73,81],Ne={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[2
Line truncated
|
||||
`+x.showPosition()+`
|
||||
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==Cr?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:x.match,token:this.terminals_[L]||L,line:x.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(x.yytext),l.push(x.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=x.yyleng,u=x.yytext,Z=x.yylineno,Ce=x.yylloc,Pr>0&&Pr--);break;case 2:if(j=this.productions_[q[1]][1],yt.$=w[w.length-j],yt._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Fn&&(yt._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(yt,[u,Lt,Z,ot.yy,q[1],w,l].concat(Vn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(yt.$),l.push(yt._$),_r=bt[y[y.length-2]][y[y.length-1]],y.push(_r);break;case 3:return!0}}return!0}},Rn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
||||
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var bt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();Ne.lexer=Rn;function Ae(){this.yy={}}return Ae.prototype=Ne,Ne.Parser=Ae,new Ae})(),Vt=ms;var Ge=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ke(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<Ge.length;c++)this[Ge[c]]=o[Ge[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ke);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}Ke.prototype=new Error;var tt=Ke;function le(){this.parents=[]}le.prototype={constructor:le,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!le.prototype[r.type])throw new tt('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new tt(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var Ze=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||$r(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),go=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Ze(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function Zr(e){return function(t){return Array.isArray(t)&&t[0]===e}}var yo=Zr(pe.FlushElement);var So=Zr(pe.GetSymbol);var Is=!1,Bs=/["\x26\xa0]/u,Ao=new RegExp(Bs.source,"gu"),Rs=/[&<>\xa0]/u,Po=new RegExp(Rs.source,"gu");var de=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ln(){return[...de]}function qs(e){return de.has(e.toLowerCase())&&e[0]?.toLowerCase()===e[0]}function Y
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(Is){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},dr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function tn(e,t,r){return new dr("Cannot remove a node unless it is part of an array",e,t,r)}function Us(e,t,r){return new dr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function en(e,t){return new dr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new cr(this)}}},cr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function un(e){return typeof e=="function"?e:e.enter}function hn(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=un(c),s=hn(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(pn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Ms(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function rn(e,t,r){e[t]=r}function Ms(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=un(c),i=hn(c))}if(n!==void 0&&n(a,s)!==void 0)throw en(a,s);if(Array.isArray(o))pn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw tn(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?tn(p,h,f):Us(p,h,f);rn(h,f,g[0])}else rn(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw en(a,s)}}function pn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=zs(t,n,a)-1)}}function zs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Ys(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function fn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var tr;function er(){return tr||(tr=new pt("","(synthetic)")),tr}function nn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function mn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function sn(e=[],t=[],r=!1,s){return d.blockItself({body:e,params:mn(t),chained:r,loc:v(s||null)})}function an(e=[],t=[],r){return d.template({body:e,blockParams:t,loc:v(r||null)})}function v(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?A.forHbsLoc(er(),t):A.forHbsLoc(er(),Fs)}{let[t,r,s,n,i]=e,a=i?new pt("",i):er();return A.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var Gs={mustache:function(e,t=[],r=Ht([]),s=!1,n,i){return d.mustache({path:rt(e),params:t,hash:r,trusting:s,strip:i,loc:v(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,f=null;return h=s.type==="Template"?d.blockItself({params:mn(s.blockParams),body:s.body,loc:s.loc}):s,n?.type==="Template"?(n.blockParams.length,f=d.blockItself({params:[],body:n.body,loc:n.loc})):f=n,d.block({path:rt(e),params:t||[],hash:r||Ht([]),defaultBlock:h,elseBlock:f,loc:v(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},c
Line truncated
|
||||
`)}},hr=class extends ur{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=nr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=on(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(ir)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=on(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(fn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=nr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":sr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=nr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function nr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map((i=>e.acceptNode(i))),n=Yt(s)?mr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):d.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function sr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(fn(r)){let o=`{{${(function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)})(r)}}}`;throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=d.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function on(e,t,r){if(!t.program.loc){let n=V(0,t.program.body,0),i=V(0,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Nt(e){return/[\t\n\f ]/u.test(e)}Line truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Nt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Nt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Nt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Nt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Vs(t),s=mr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(de.has(t.name)&&!s)throw k(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw k(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw k(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return Yt(t)?t[0]:d.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},Ks={},fr=class extends Xe{constructor(){super({})}parse(){}};function dn(e,t={}){let r,s,n,i=t.mode||"precompile";typeLine truncated
|
||||
`).length-1}function ui(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return _t(t)}function hi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,Nn)}).fill(ut)}function pi(e,t){let{node:{value:r}}=e,s=oe(r,fi(e)?!t.singleQuote:t.singleQuote);return[s,St(0,r,s,`\\${s}`),s]}function fi(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function mi(e,t){let r=br(e,t),s=ve(e,t);return s?F([r,N,I(s)]):r}function xn(e,t){let r=br(e,t),s=ve(e,t);return s?[F([r,N,s]),H]:r}function br(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ct(N,s)}function yr(e){return["as |",e.blockParams.join(" "),"|"]}var di=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),gi=new Set(["true","false","null","undefined"]),bi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&gi.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>di.has(r));function yi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>bi(r,s)?`[${r}]`:r).join(".")}var Si={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:Xs,massageAstNode:Hr,hasPrettierIgnore:Sn,getVisitorKeys:gn,embed:Ur},Ln=Si;var Dn=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Sr={};Ie(Sr,{glimmer:()=>_i});function ki(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var On=ki;var In=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function Ei(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
|
||||
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
|
||||
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
|
||||
`)),h.length},get column(){return h??(h=c.split(`
|
||||
`)),V(0,h,-1).length}},[In]:!0}}function vi(e){let t=Ei(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return St(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}var Bn=vi;function wi(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/u,"\\\\"))}var Ti=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},xi=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){Ti(e),wi(e)}}}),Ni={mode:"codemod",plugins:{ast:[xi]}};function Ai(e){let{frontMatter:t,content:r}=Bn(e),s;try{s=dn(r,Ni)}catch(n){let i=Ci(n);if(i){let a=Pi(n);throw On(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function Pi(e){let{message:t}=e,r=t.split(`
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ci(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var _i={parse:Ai,astFormat:"glimmer",locStart:mt,locEnd:Gt};var Li={glimmer:Ln};return Gn(Di);});
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
var Un=Object.defineProperty;var Oe=(e,t)=>{for(var r in t)Un(e,r,{get:t[r],enumerable:!0})};var Bn={};Oe(Bn,{languages:()=>Ln,parsers:()=>yr,printers:()=>Ai});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var Mn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},zn=Jt("replaceAll",function(){if(typeof this=="string")return Mn}),St=zn;function Yn(e){return this[e<0?this.length+e:e]}var Gn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return Yn}),V=Gn;var Kn=()=>{},Dt=Kn;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",xt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,xt]);function Wn(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=Wn;var jn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Qn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=jn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Ie=class extends Error{name="InvalidDocError";constructor(t){super(Qn(t)),this.doc=t}},_r=Ie;function Jn(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){if(r.has(i))return r.get(i);let a=n(i);return r.set(i,a),a}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case xt:return t(i);default:throw new _r(i)}}}function ie(e,t=Lr){return Jn(e,r=>typeof r=="string"?ct(t,r.split(`
|
||||
`)):r)}var M=Dt,ae=Dt,Dr=Dt,Or=Dt;function F(e){return M(e),{type:kt,contents:e}}function $n(e,t){return Or(e),M(t),{type:Et,contents:t,n:e}}function Be(e){return $n(-1,e)}var Re={type:xt};function qe(e){return Dr(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ve(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ct(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var N={type:Q},H={type:Q,soft:!0},Xn={type:Q,hard:!0},ut=[Xn,Re],Zn={type:Q,hard:!0,literal:!0},Lr=[Zn,Re];var Ir=Object.freeze({character:"'",codePoint:39}),Br=Object.freeze({character:'"',codePoint:34}),ts=Object.freeze({preferred:Ir,alternate:Br}),es=Object.freeze({preferred:Br,alternate:Ir});function rs(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?ts:es,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}var oe=rs;function Fe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var He=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${Fe([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s,"u");return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
|
||||
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
|
||||
`).map(s=>s.slice(r)).join(`
|
||||
`)}},Rr=He;var ns=[" ",`
|
||||
`,"\f","\r"," "],ss=new Rr(ns),R=ss;function is(e){return Array.isArray(e)&&e.length>0}var Bt=is;var Ue=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},qr=Ue;function Vr(e,t,r){if(e.type==="TextNode"){let s=e.chars.trim();if(!s)return null;r.tag==="style"&&r.children.length===1&&r.children[0]===e?t.chars="":t.chars=R.split(s).join(" ")}e.type==="ElementNode"&&(delete t.startTag,delete t.openTag,delete t.parts,delete t.endTag,delete t.closeTag,delete t.nameNode,delete t.body,delete t.blockParamNodes,delete t.params,delete t.path),e.type==="Block"&&(delete t.blockParamNodes,delete t.params),e.type==="AttrNode"&&e.name.toLowerCase()==="class"&&delete t.value,e.type==="PathExpression"&&(t.head=e.head.original)}Vr.ignoredProperties=new Set(["loc","selfClosing"]);var Fr=Vr;function as(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Hr=as;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var os=10;for(let e=0;e<=os;e++)qt();function Me(e){return qt(e)}function ls(e,t="type"){Me(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Ur=ls;var cs=Object.freeze([]);function zr(){return cs}var $a=zr(),Xa=zr();var ze=Object.assign;var Mr=console;function Yr(e,t="unexpected unreachable branch"){throw Mr.log("unreachable",e),Mr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var us=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],Sr=[2,51],kr=[1,64],Er=[67,73,75,77,84,85,86,87,88,89],vr=[56,67,73,75,84,85,86,87,88,89],wr=[1,75],we=[1,76],Te=[1,83],dt=[33,67,73,75,79,84,85,86,87,88,89],Tr=[23,67,73,75,84,85,86,87,88,89],xr=[67,68,73,75,84,85,86,87,88,89],gt=[33,79],xe=[1,134],Nr=[73,81],Ne={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[2
Line truncated
|
||||
`+x.showPosition()+`
|
||||
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==Pr?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:x.match,token:this.terminals_[L]||L,line:x.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(x.yytext),l.push(x.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=x.yyleng,u=x.yytext,Z=x.yylineno,Ce=x.yylloc,Ar>0&&Ar--);break;case 2:if(j=this.productions_[q[1]][1],yt.$=w[w.length-j],yt._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Fn&&(yt._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(yt,[u,Lt,Z,ot.yy,q[1],w,l].concat(Vn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(yt.$),l.push(yt._$),Cr=bt[y[y.length-2]][y[y.length-1]],y.push(Cr);break;case 3:return!0}}return!0}},Rn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
||||
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var bt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();Ne.lexer=Rn;function Ae(){this.yy={}}return Ae.prototype=Ne,Ne.Parser=Ae,new Ae})(),Vt=us;var Ye=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ge(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<Ye.length;c++)this[Ye[c]]=o[Ye[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ge);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}Ge.prototype=new Error;var tt=Ge;function le(){this.parents=[]}le.prototype={constructor:le,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!le.prototype[r.type])throw new tt('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new tt(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var Xe=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||Jr(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),uo=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Xe(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function Xr(e){return function(t){return Array.isArray(t)&&t[0]===e}}var po=Xr(pe.FlushElement);var fo=Xr(pe.GetSymbol);var _s=!1,Ls=/["\x26\xa0]/u,vo=new RegExp(Ls.source,"gu"),Ds=/[&<>\xa0]/u,wo=new RegExp(Ds.source,"gu");var de=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function on(){return[...de]}function Os(e){return de.has(e.toLowerCase())&&e[0]?.toLowerCase()===e[0]}function Y
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(_s){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},mr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function Zr(e,t,r){return new mr("Cannot remove a node unless it is part of an array",e,t,r)}function qs(e,t,r){return new mr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function tn(e,t){return new mr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new lr(this)}}},lr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function cn(e){return typeof e=="function"?e:e.enter}function un(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=cn(c),s=un(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(hn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Vs(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function en(e,t,r){e[t]=r}function Vs(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=cn(c),i=un(c))}if(n!==void 0&&n(a,s)!==void 0)throw tn(a,s);if(Array.isArray(o))hn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw Zr(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?Zr(p,h,f):qs(p,h,f);en(h,f,g[0])}else en(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw tn(a,s)}}function hn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=Fs(t,n,a)-1)}}function Fs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Hs(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function pn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var Ze;function tr(){return Ze||(Ze=new pt("","(synthetic)")),Ze}function rn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function fn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function nn(e=[],t=[],r=!1,s){return d.blockItself({body:e,params:fn(t),chained:r,loc:v(s||null)})}function sn(e=[],t=[],r){return d.template({body:e,blockParams:t,loc:v(r||null)})}function v(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?A.forHbsLoc(tr(),t):A.forHbsLoc(tr(),Bs)}{let[t,r,s,n,i]=e,a=i?new pt("",i):tr();return A.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var Us={mustache:function(e,t=[],r=Ht([]),s=!1,n,i){return d.mustache({path:rt(e),params:t,hash:r,trusting:s,strip:i,loc:v(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,f=null;return h=s.type==="Template"?d.blockItself({params:fn(s.blockParams),body:s.body,loc:s.loc}):s,n?.type==="Template"?(n.blockParams.length,f=d.blockItself({params:[],body:n.body,loc:n.loc})):f=n,d.block({path:rt(e),params:t||[],hash:r||Ht([]),defaultBlock:h,elseBlock:f,loc:v(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},c
Line truncated
|
||||
`)}},ur=class extends cr{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=rr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=an(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(sr)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=an(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(pn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=rr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":nr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=rr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function rr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map((i=>e.acceptNode(i))),n=Yt(s)?fr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):d.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function nr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(pn(r)){let o=`{{${(function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)})(r)}}}`;throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=d.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function an(e,t,r){if(!t.program.loc){let n=V(0,t.program.body,0),i=V(0,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Nt(e){return/[\t\n\f ]/u.test(e)}Line truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Nt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Nt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Nt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Nt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Is(t),s=fr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(de.has(t.name)&&!s)throw k(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw k(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw k(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return Yt(t)?t[0]:d.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},Ms={},pr=class extends $e{constructor(){super({})}parse(){}};function mn(e,t={}){let r,s,n,i=t.mode||"precompile";typeLine truncated
|
||||
`).length-1}function ai(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/gu)||[])[0]||"";return _t(t)}function oi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/gu)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,xn)}).fill(ut)}function li(e,t){let{node:{value:r}}=e,s=oe(r,ci(e)?!t.singleQuote:t.singleQuote);return[s,St(0,r,s,`\\${s}`),s]}function ci(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function ui(e,t){let r=gr(e,t),s=ve(e,t);return s?F([r,N,I(s)]):r}function Tn(e,t){let r=gr(e,t),s=ve(e,t);return s?[F([r,N,s]),H]:r}function gr(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ct(N,s)}function br(e){return["as |",e.blockParams.join(" "),"|"]}var hi=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),pi=new Set(["true","false","null","undefined"]),fi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&pi.has(e)||/\s/u.test(e)||/^\d/u.test(e)||Array.prototype.some.call(e,r=>hi.has(r));function mi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>fi(r,s)?`[${r}]`:r).join(".")}var di={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:js,massageAstNode:Fr,hasPrettierIgnore:yn,getVisitorKeys:dn,embed:Hr},_n=di;var Ln=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var yr={};Oe(yr,{glimmer:()=>Ni});function gi(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Dn=gi;var On=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function bi(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
|
||||
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
|
||||
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
|
||||
`)),h.length},get column(){return h??(h=c.split(`
|
||||
`)),V(0,h,-1).length}},[On]:!0}}function yi(e){let t=bi(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return St(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}var In=yi;function Si(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/u,"\\\\"))}var ki=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},Ei=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){ki(e),Si(e)}}}),vi={mode:"codemod",plugins:{ast:[Ei]}};function wi(e){let{frontMatter:t,content:r}=In(e),s;try{s=mn(r,vi)}catch(n){let i=xi(n);if(i){let a=Ti(n);throw Dn(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function Ti(e){let{message:t}=e,r=t.split(`
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/u.test(r[0])&&/^-*\^$/u.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/u.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function xi(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return typeof n.line!="number"?{start:s}:t}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ni={parse:wi,astFormat:"glimmer",locStart:mt,locEnd:Gt};var Ai={glimmer:_n};export{Bn as default,Ln as languages,yr as parsers,Ai as printers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
graphql: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
graphql: Printer;
|
||||
};
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ie=Object.defineProperty;var pt=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var ft=Object.prototype.hasOwnProperty;var me=(e,t)=>{for(var n in t)ie(e,n,{get:t[n],enumerable:!0})},ht=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of lt(t))!ft.call(e,r)&&r!==n&&ie(e,r,{get:()=>t[r],enumerable:!(i=pt(t,r))||i.enumerable});return e};var dt=e=>ht(ie({},"__esModule",{value:!0}),e);var cn={};me(cn,{languages:()=>je,options:()=>Xe,parsers:()=>de,printers:()=>an});var Ee=(e,t)=>(n,i,...r)=>n|1&&i==null?void 0:(t.call(i)??i[e]).apply(i,r);var mt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Et=Ee("replaceAll",function(){if(typeof this=="string")return mt}),U=Et;var Tt=()=>{},se=Tt;var Te="indent";var Ne="group";var xe="if-break";var G="line";var _e="break-parent";var S=se,Y=se;function x(e){return S(e),{type:Te,contents:e}}var ye={type:_e};function y(e,t={}){return S(e),Y(t.expandedStates,!0),{type:Ne,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return S(e),t!==""&&S(t),{type:xe,breakContents:e,flatContents:t,groupId:n.groupId}}function E(e,t){S(e),Y(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}var k={type:G},l={type:G,soft:!0},Nt={type:G,hard:!0},f=[Nt,ye];function j(e){return(t,n,i)=>{let r=!!i?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var Ln=j(/\s/u),$=j(" "),Ae=j(",; "),Oe=j(/[^\n\r]/u);var Ie=e=>e===`
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function xt(e,t,n){let i=!!n?.backwards;if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
|
||||
`)return t-2;if(Ie(r))return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(Ie(r))return t+1}return t}var X=xt;function _t(e,t,n={}){let i=$(e,n.backwards?t-1:t,n),r=X(e,i,n);return i!==r}var De=_t;function yt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var ge=yt;function At(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Oe(e,t):t}var Se=At;function Ot(e,t){let n=null,i=t;for(;i!==n;)n=i,i=Ae(e,i),i=ge(e,i),i=$(e,i);return i=Se(e,i),i=X(e,i),i!==!1&&De(e,i)}var ke=Ot;function It(e){return Array.isArray(e)&&e.length>0}var oe=It;var ae=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Ce=ae;var P=null;function w(e){if(P!==null&&typeof P.property){let t=P;return P=w.prototype=null,t}return P=w.prototype=e??Object.create(null),new w}var Dt=10;for(let e=0;e<=Dt;e++)w();function ce(e){return w(e)}function gt(e,t="type"){ce(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Re=gt;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},F=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ue={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Zn=new Set(Object.keys(ue));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var ve={...ue};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete ve[e];var be=ve;var St=Re(be,"kind"),Le=St;var J=e=>e.loc.start,q=e=>e.loc.end;var Pe="format",we=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,Fe=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;var Me=e=>Fe.test(e),Ve=e=>we.test(e),Be=e=>`# @${Pe}
|
||||
|
||||
${e}`;function kt(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var A=kt;function Ct(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[J(i)]!=="{",s=!!i.name;return[A(e,t,n),r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&oe(i.variableDefinitions)?" ":"",Ue(e,n),_(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Ue(e,n)," on ",n("typeCondition"),_(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",_(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=U(0,i.value,'"""','\\"""').split(`
|
||||
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',U(0,U(0,i.value,/["\\]/gu,"\\$&"),`
|
||||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([l,E([I("",", "),l],e.map(n,"values"))]),l,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,x([l,E([I("",", "),l],e.map(n,"fields"))]),l,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...bt(e,t,n)),s.push(_(e,n,i)),i.fields.length>0&&s.push([" {",x([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",": ",n("type"),_(e,n,i)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,i),i.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,i)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"SchemaExtension":return["extend schema",_(e,n,i),...i.operationTypes.length>0?[" {",x([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,i)," {",i.operationTypes.length>0?x([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,i),i.types.length>0?[" =",I(""," "),x([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ce(i,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(x([l,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&ke(t.originalText,q(s))?[a,f]:a},i)}function Rt(e){return e.kind!=="Comment"}function vt({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function bt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let p=s[u];r.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(p.loc.end,T.loc.start).includes("#");r.push(" &",D?k:" ")}}return r}function Ue(e,t){let{node:n}=e;return oe(n.variableDefinitions)?y(["(",x([l,E([I("",", "),l],e.map(t,"variableDefinitions"))]),l,")"]):""}function Ge(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}Ge.ignoredProperties=new Set(["loc","comments"]);function Lt(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Pt={print:Ct,massageAstNode:Ge,hasPrettierIgnore:Lt,insertPragma:Be,printComment:vt,canAttachComment:Rt,getVisitorKeys:Le},Ye=Pt;var je=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var $e={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var wt={bracketSpacing:$e.bracketSpacing},Xe=wt;var de={};me(de,{graphql:()=>on});function He(e){return typeof e=="object"&&e!==null}function Je(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Ft=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(Ft)){if(typeof r.index=="number"||Je(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Qe(e){return pe(e.source,M(e.source,e.start))}function pe(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,p=t.column+u,T=`${e.name}:${a}:${p}
|
||||
`,d=i.split(/\r\n|[\n\r]/g),D=d[r];if(D.length>120){let O=Math.floor(p/80),re=p%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+qe([[`${a} |`,N[0]],...N.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(re)],["|",N[O+1]]])}return T+qe([[`${a-1} |`,d[r-1]],[`${a} |`,D],["|","^".padStart(p)],[`${a+1} |`,d[r+1]]])}function qe(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
||||
`)}function Mt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Q=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:p,path:T,originalError:d,extensions:D}=Mt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=d??void 0,this.nodes=We(Array.isArray(a)?a:a?[a]:void 0);let O=We((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=p??O?.map(N=>N.start),this.locations=p&&u?p.map(N=>M(u,N)):O?.map(N=>M(N.source,N.start));let re=He(d?.extensions)?d?.extensions:void 0;this.extensions=(s=D??re)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+Qe(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+pe(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function We(e){return e===void 0||e.length===0?void 0:e}function h(e,t,n){return new Q(`Syntax Error: ${n}`,{source:e,positions:[t]})}var W;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(W||(W={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(c||(c={}));function ze(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function Ke(e){return e>=97&&e<=122||e>=65&&e<=90}function le(e){return Ke(e)||e===95}function Ze(e){return Ke(e)||b(e)||e===95}function et(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],p=Vt(u);p!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Vt(e){let t=0;for(;t<e.length&&ze(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new F(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Bt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function nt(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function L(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return rt(e.charCodeAt(t))&&it(e.charCodeAt(t+1))}function rt(e){return e>=55296&&e<=56319}function it(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new F(t,n,i,s,a,r)}function Bt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw h(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ht(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",p=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),p.push(u);let d=m(e,o.BLOCK_STRING,t,s+3,et(p).join(`
|
||||
`));return e.line+=p.length-1,e.lineStart=r,d}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),p.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(L(T))++s;else if(K(n,s))s+=2;else throw h(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw h(e.source,s,"Unterminated string.")}function Jt(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(Ze(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return qt(e,t);default:return String(e)}}function qt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Qt(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:te(i,n)}else if(Array.isArray(e))return zt(e,n);return Wt(e,n)}function Qt(e){return typeof e.toJSON=="function"}function Wt(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+Kt(e)+"]":"{ "+n.map(([r,s])=>r+": "+te(s,t)).join(", ")+" }"}function zt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(te(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function Kt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Zt=globalThis.process&&!0,st=Zt?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ee(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
|
||||
|
||||
Ensure that there is only one instance of "graphql" in the node_modules
|
||||
directory. If different versions of "graphql" are the dependencies of other
|
||||
relied on modules, use "resolutions" to ensure only one version is installed.
|
||||
|
||||
https://yarnpkg.com/en/docs/selective-version-resolutions
|
||||
|
||||
Duplicate "graphql" modules cannot be used at the same time since different
|
||||
versions may have different capabilities and behavior. The data from one
|
||||
version used in the function from another could produce confusing and
|
||||
spurious results.`)}}return!1};var B=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ot(e){return st(e,B)}function at(e,t){let n=new he(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var he=class{constructor(t,n={}){let{lexer:i,...r}=n;if(i)this._lexer=i;else{let s=ot(t)?t:new B(t);this._lexer=new z(s)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:i,description:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parse
Line truncated
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
var pt=Object.defineProperty;var de=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})};var ut={};de(ut,{languages:()=>Ye,options:()=>$e,parsers:()=>he,printers:()=>nn});var me=(e,t)=>(n,i,...r)=>n|1&&i==null?void 0:(t.call(i)??i[e]).apply(i,r);var lt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ft=me("replaceAll",function(){if(typeof this=="string")return lt}),U=ft;var ht=()=>{},ie=ht;var Ee="indent";var Te="group";var Ne="if-break";var G="line";var xe="break-parent";var S=ie,Y=ie;function x(e){return S(e),{type:Ee,contents:e}}var _e={type:xe};function y(e,t={}){return S(e),Y(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return S(e),t!==""&&S(t),{type:Ne,breakContents:e,flatContents:t,groupId:n.groupId}}function E(e,t){S(e),Y(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}var k={type:G},l={type:G,soft:!0},dt={type:G,hard:!0},f=[dt,_e];function j(e){return(t,n,i)=>{let r=!!i?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var kn=j(/\s/u),$=j(" "),ye=j(",; "),Ae=j(/[^\n\r]/u);var Oe=e=>e===`
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function mt(e,t,n){let i=!!n?.backwards;if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
|
||||
`)return t-2;if(Oe(r))return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(Oe(r))return t+1}return t}var X=mt;function Et(e,t,n={}){let i=$(e,n.backwards?t-1:t,n),r=X(e,i,n);return i!==r}var Ie=Et;function Tt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var De=Tt;function Nt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Ae(e,t):t}var ge=Nt;function xt(e,t){let n=null,i=t;for(;i!==n;)n=i,i=ye(e,i),i=De(e,i),i=$(e,i);return i=ge(e,i),i=X(e,i),i!==!1&&Ie(e,i)}var Se=xt;function _t(e){return Array.isArray(e)&&e.length>0}var se=_t;var oe=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},ke=oe;var P=null;function w(e){if(P!==null&&typeof P.property){let t=P;return P=w.prototype=null,t}return P=w.prototype=e??Object.create(null),new w}var yt=10;for(let e=0;e<=yt;e++)w();function ae(e){return w(e)}function At(e,t="type"){ae(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ce=At;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},F=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ce={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},qn=new Set(Object.keys(ce));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var Re={...ce};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete Re[e];var ve=Re;var Ot=Ce(ve,"kind"),be=Ot;var J=e=>e.loc.start,q=e=>e.loc.end;var Le="format",Pe=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,we=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;var Fe=e=>we.test(e),Me=e=>Pe.test(e),Ve=e=>`# @${Le}
|
||||
|
||||
${e}`;function It(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var A=It;function Dt(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[J(i)]!=="{",s=!!i.name;return[A(e,t,n),r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&se(i.variableDefinitions)?" ":"",Be(e,n),_(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Be(e,n)," on ",n("typeCondition"),_(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",_(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=U(0,i.value,'"""','\\"""').split(`
|
||||
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',U(0,U(0,i.value,/["\\]/gu,"\\$&"),`
|
||||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([l,E([I("",", "),l],e.map(n,"values"))]),l,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,x([l,E([I("",", "),l],e.map(n,"fields"))]),l,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...kt(e,t,n)),s.push(_(e,n,i)),i.fields.length>0&&s.push([" {",x([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",": ",n("type"),_(e,n,i)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,i),i.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,i)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"SchemaExtension":return["extend schema",_(e,n,i),...i.operationTypes.length>0?[" {",x([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,i)," {",i.operationTypes.length>0?x([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,i),i.types.length>0?[" =",I(""," "),x([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new ke(i,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(x([l,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&Se(t.originalText,q(s))?[a,f]:a},i)}function gt(e){return e.kind!=="Comment"}function St({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function kt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let p=s[u];r.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(p.loc.end,T.loc.start).includes("#");r.push(" &",D?k:" ")}}return r}function Be(e,t){let{node:n}=e;return se(n.variableDefinitions)?y(["(",x([l,E([I("",", "),l],e.map(t,"variableDefinitions"))]),l,")"]):""}function Ue(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}Ue.ignoredProperties=new Set(["loc","comments"]);function Ct(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Rt={print:Dt,massageAstNode:Ue,hasPrettierIgnore:Ct,insertPragma:Ve,printComment:St,canAttachComment:gt,getVisitorKeys:be},Ge=Rt;var Ye=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var je={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var vt={bracketSpacing:je.bracketSpacing},$e=vt;var he={};de(he,{graphql:()=>tn});function Xe(e){return typeof e=="object"&&e!==null}function He(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var bt=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(bt)){if(typeof r.index=="number"||He(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function qe(e){return ue(e.source,M(e.source,e.start))}function ue(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,p=t.column+u,T=`${e.name}:${a}:${p}
|
||||
`,d=i.split(/\r\n|[\n\r]/g),D=d[r];if(D.length>120){let O=Math.floor(p/80),re=p%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+Je([[`${a} |`,N[0]],...N.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(re)],["|",N[O+1]]])}return T+Je([[`${a-1} |`,d[r-1]],[`${a} |`,D],["|","^".padStart(p)],[`${a+1} |`,d[r+1]]])}function Je(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
||||
`)}function Lt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Q=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:p,path:T,originalError:d,extensions:D}=Lt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=d??void 0,this.nodes=Qe(Array.isArray(a)?a:a?[a]:void 0);let O=Qe((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=p??O?.map(N=>N.start),this.locations=p&&u?p.map(N=>M(u,N)):O?.map(N=>M(N.source,N.start));let re=Xe(d?.extensions)?d?.extensions:void 0;this.extensions=(s=D??re)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+qe(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+ue(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Qe(e){return e===void 0||e.length===0?void 0:e}function h(e,t,n){return new Q(`Syntax Error: ${n}`,{source:e,positions:[t]})}var W;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(W||(W={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(c||(c={}));function We(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function ze(e){return e>=97&&e<=122||e>=65&&e<=90}function pe(e){return ze(e)||e===95}function Ke(e){return ze(e)||b(e)||e===95}function Ze(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],p=Pt(u);p!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Pt(e){let t=0;for(;t<e.length&&We(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new F(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=wt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function tt(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function L(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return nt(e.charCodeAt(t))&&rt(e.charCodeAt(t+1))}function nt(e){return e>=55296&&e<=56319}function rt(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new F(t,n,i,s,a,r)}function wt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw h(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Yt(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",p=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),p.push(u);let d=m(e,o.BLOCK_STRING,t,s+3,Ze(p).join(`
|
||||
`));return e.line+=p.length-1,e.lineStart=r,d}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),p.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(L(T))++s;else if(K(n,s))s+=2;else throw h(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw h(e.source,s,"Unterminated string.")}function jt(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(Ke(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return $t(e,t);default:return String(e)}}function $t(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Xt(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:te(i,n)}else if(Array.isArray(e))return Jt(e,n);return Ht(e,n)}function Xt(e){return typeof e.toJSON=="function"}function Ht(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+qt(e)+"]":"{ "+n.map(([r,s])=>r+": "+te(s,t)).join(", ")+" }"}function Jt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(te(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function qt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Qt=globalThis.process&&!0,it=Qt?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ee(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
|
||||
|
||||
Ensure that there is only one instance of "graphql" in the node_modules
|
||||
directory. If different versions of "graphql" are the dependencies of other
|
||||
relied on modules, use "resolutions" to ensure only one version is installed.
|
||||
|
||||
https://yarnpkg.com/en/docs/selective-version-resolutions
|
||||
|
||||
Duplicate "graphql" modules cannot be used at the same time since different
|
||||
versions may have different capabilities and behavior. The data from one
|
||||
version used in the function from another could produce confusing and
|
||||
spurious results.`)}}return!1};var B=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function st(e){return it(e,B)}function ot(e,t){let n=new fe(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var fe=class{constructor(t,n={}){let{lexer:i,...r}=n;if(i)this._lexer=i;else{let s=st(t)?t:new B(t);this._lexer=new z(s)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:i,description:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parse
Line truncated
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
angular: Parser;
|
||||
html: Parser;
|
||||
lwc: Parser;
|
||||
mjml: Parser;
|
||||
vue: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
html: Printer;
|
||||
};
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var St=Object.defineProperty;var ws=Object.getOwnPropertyDescriptor;var ks=Object.getOwnPropertyNames;var xs=Object.prototype.hasOwnProperty;var Zr=e=>{throw TypeError(e)};var As=(e,t,r)=>t in e?St(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var en=(e,t)=>{for(var r in t)St(e,r,{get:t[r],enumerable:!0})},ys=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ks(t))!xs.call(e,i)&&i!==r&&St(e,i,{get:()=>t[i],enumerable:!(n=ws(t,i))||n.enumerable});return e};var Ns=e=>ys(St({},"__esModule",{value:!0}),e);var sr=(e,t,r)=>As(e,typeof t!="symbol"?t+"":t,r),Ls=(e,t,r)=>t.has(e)||Zr("Cannot "+r);var $e=(e,t,r)=>(Ls(e,t,"read from private field"),r?r.call(e):t.get(e)),tn=(e,t,r)=>t.has(e)?Zr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var Rl={};en(Rl,{languages:()=>ms,options:()=>ds,parsers:()=>Jr,printers:()=>Il});var xe=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var Ps=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Os=xe("replaceAll",function(){if(typeof this=="string")return Ps}),w=Os;function Ds(e){return this[e<0?this.length+e:e]}var Is=xe("at",function(){if(Array.isArray(this)||typeof this=="string")return Ds}),F=Is;var Rs=()=>{},ze=Rs;var Ye="string",je="array",Et="cursor",Ae="indent",ye="align",Ct="trim",Ne="group",Le="fill",Pe="if-break",Oe="indent-if-break",vt="line-suffix",Tt="line-suffix-boundary",Y="line",bt="label",De="break-parent",wt=new Set([Et,Ae,ye,Ct,Ne,Le,Pe,Oe,vt,Tt,Y,bt,De]);function Ms(e){if(typeof e=="string")return Ye;if(Array.isArray(e))return je;if(!e)return;let{type:t}=e;if(wt.has(t))return t}var kt=Ms;var Bs=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Fs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(kt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Bs([...wt].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var ar=class extends Error{name="InvalidDocError";constructor(t){super(Fs(t)),this.doc=t}},rn=ar;function or(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let a=i(s);return r.set(s,a),a}function i(s){switch(kt(s)){case je:return t(s.map(n));case Le:return t({...s,parts:s.parts.map(n)});case Pe:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Ne:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case ye:case Ae:case Oe:case bt:case vt:return t({...s,contents:n(s.contents)});case Ye:case Et:case Ct:case Tt:case Y:case De:return t(s);default:throw new rn(s)}}}function L(e,t=nn){return or(e,r=>typeof r=="string"?q(t,r.split(`
|
||||
`)):r)}var D=ze,xt=ze,sn=ze,an=ze;function A(e){return D(e),{type:Ae,contents:e}}function qs(e,t){return an(e),D(t),{type:ye,contents:t,n:e}}function on(e){return qs(Number.NEGATIVE_INFINITY,e)}var j={type:De};function At(e){return sn(e),{type:Le,parts:e}}function C(e,t={}){return D(e),xt(t.expandedStates,!0),{type:Ne,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function X(e,t="",r={}){return D(e),t!==""&&D(t),{type:Pe,breakContents:e,flatContents:t,groupId:r.groupId}}function ln(e,t){return D(e),{type:Oe,contents:e,groupId:t.groupId,negate:t.negate}}function q(e,t){D(e),xt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var _={type:Y},k={type:Y,soft:!0},Hs={type:Y,hard:!0},v=[Hs,j],Vs={type:Y,hard:!0,literal:!0},nn=[Vs,j];var cn=Object.freeze({character:"'",codePoint:39}),un=Object.freeze({character:'"',codePoint:34}),Us=Object.freeze({preferred:cn,alternate:un}),Ws=Object.freeze({preferred:un,alternate:cn});function Gs(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?Us:Ws,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let c=e.charCodeAt(o);c===r.codePoint?s++:c===n.codePoint&&a++}return(s>a?n:r).character}var pn=Gs;function lr(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var cr=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(F(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${lr([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n,"u");return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},hn=cr;var $s=[" ",`
|
||||
`,"\f","\r"," "],zs=new hn($s),y=zs;var ur=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},mn=ur;var Ys=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),js=new Set(["if","else if","for","switch","case"]);function fn(e,t,r){if(e.kind==="text"||e.kind==="comment")return null;if(e.kind==="yaml"&&delete t.value,e.kind==="attribute"){let{fullName:n,value:i}=e;n==="style"||n==="class"||n==="srcset"&&(r.fullName==="img"||r.fullName==="source")||n==="allow"&&r.fullName==="iframe"||n.startsWith("on")||n.startsWith("@")||n.startsWith(":")||n.startsWith(".")||n.startsWith("#")||n.startsWith("v-")||n==="vars"&&r.fullName==="style"||(n==="setup"||n==="generic")&&r.fullName==="script"||n==="slot-scope"||n.startsWith("(")||n.startsWith("[")||n.startsWith("*")||n.startsWith("bind")||n.startsWith("i18n")||n.startsWith("on-")||n.startsWith("ng-")||i?.includes("{{")?delete t.value:i&&(t.value=w(0,i,/'|"|'/gu,'"'))}if(e.kind==="docType"&&(t.value=w(0,e.value.toLowerCase(),/\s+/gu," ")),e.kind==="angularControlFlowBlock"&&e.parameters?.children)for(let n of t.parameters.children)js.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.kind==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim()),e.kind==="angularLetDeclarationInitializer"&&delete t.value,e.kind==="element"&&e.isVoid&&!e.isSelfClosing&&(t.isSelfClosing=!0)}fn.ignoredProperties=Ys;var dn=fn;function K(e,t=!0){return[A([k,e]),t?k:""]}function W(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function x(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):K(s)}function Xs(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(s)?"":x(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},W)}var gn=Xs;var Ks=Array.prototype.toReversed??function(){return[...this].reverse()},Qs=xe("toReversed",function(){if(Array.isArray(this))return Ks}),_n=Qs;function Js(){let e=globalThis,t=e.Deno?.build?.os;return typeof t=="string"?t==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}var Zs=Js();function Sn(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ea(e){return e=Sn(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function ta(e){e=Sn(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function pr(e){return Zs?ta(e):ea(e)}var En=e=>String(e).split(/[/\\]/u).pop(),Cn=e=>String(e).startsWith("file:");function ra(e){return Array.isArray(e)&&e.length>0}var Ie=ra;function vn(e,t){if(!t)return;let r=En(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function na(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var ia=void 0;function Tn(e,t){if(t){if(Cn(t))try{t=pr(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function sa(e,t){let r=_n(0,e.plugins).flatMap(i=>i.languages??[]);return(na(r,t.language)??vn(r,t.physicalFile)??vn(r,t.file)??Tn(r,t.physicalFile)??Tn(r,t.file)??ia?.(r,t.physicalFile))?.parsers[0]}var yt=sa;var Nt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function aa(e){return!!e?.[Nt]}var ce=aa;var Xe=3;function oa(e){let t=e.slice(0,Xe);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Xe);if(r===-1)return;let n=e.slice(Xe,r).trim(),i=e.indexOf(`
|
||||
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
|
||||
...`,r)),i===-1)return;let a=i+1+Xe,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let c=e.slice(0,a),u;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:c.slice(-Xe),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return u??(u=c.split(`
|
||||
`)),u.length},get column(){return u??(u=c.split(`
|
||||
`)),F(0,u,-1).length}},[Nt]:!0}}function la(e){let t=oa(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return w(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}var hr=la;var bn="inline",mr={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",option:"block",optgroup:"block"},wn="normal",fr={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function ca(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var ue=ca;var ua=e=>w(0,e,/^[\t\f\r ]*\n/gu,""),dr=e=>ua(y.trimEnd(e)),kn=e=>{let t=e,r=y.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=y.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function Lt(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||pe(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||Dt(e,t)&&!H(e,t)&&e.kind!=="interpolation")}function he(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:pa(e.prev)}function pa(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function O(e){return e.kind==="text"||e.kind==="comment"}function H(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||ue(e)&&(e.name==="script"||e.name==="style"))}function xn(e,t){return e.children&&!H(e,t)}function An(e,t){return H(e,t)||e.kind==="interpolation"||gr(e)}function gr(e){return Fn(e).startsWith("pre")}function yn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ce(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:pe(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||pe(e)&&e.parent||H(e.parent,t)||Je(e.parent,t)||!_a(e.parent.cssDisplay))||e.prev&&!Ca(e.prev.cssDisplay))}}function Nn(e,t){return ce(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:pe(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||pe(e)&&e.parent||H(e.parent,t)||Je(e.parent,t)||!Sa(e.parent.cssDisplay))||e.next&&!Ea(e.next.cssDisplay))}function Ln(e,t){return va(e.cssDisplay)&&!H(e,t)}function Ke(e){return ce(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function Pn(e){return _r(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>ma(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&Dn(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||In(e.lastChild))}function _r(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function Pt(e){return Rn(e)||e.prev&&ha(e.prev)||On(e)}function ha(e){return Rn(e)||e.kind==="element"&&e.fullName==="br"||On(e)}function On(e){return Dn(e)&&In(e)}function Dn(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function In(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function Rn(e){switch(e.kind){case"ieConditionalComment":case"comme
Line truncated
|
||||
`||e==="\f"||e==="\r"||e===" "}var La=/^[ \t\n\r\u000c]+/,Pa=/^[, \t\n\r\u000c]+/,Oa=/^[^ \t\n\r\u000c]+/,Da=/[,]+$/,Zn=/^\d+$/,Ia=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Ra(e){let t=e.length,r,n,i,s,a,o=0,c;function u(m){let g,E=m.exec(e.substring(o));if(E)return[g]=E,o+=g.length,g}let p=[];for(;;){if(u(Pa),o>=t){if(p.length===0)throw new Error("Must contain one or more image candidate strings.");return p}c=o,r=u(Oa),n=[],r.slice(-1)===","?(r=r.replace(Da,""),S()):d()}function d(){for(u(La),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(Jn(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),S();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),S();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),S();return}else i+=a;else if(s==="after descriptor"&&!Jn(a))if(a===""){S();return}else s="in descriptor",o-=1;o+=1}}function S(){let m=!1,g,E,P,z,le={},ee,_t,ke,Ge,ir;for(z=0;z<n.length;z++)ee=n[z],_t=ee[ee.length-1],ke=ee.substring(0,ee.length-1),Ge=parseInt(ke,10),ir=parseFloat(ke),Zn.test(ke)&&_t==="w"?((g||E)&&(m=!0),Ge===0?m=!0:g=Ge):Ia.test(ke)&&_t==="x"?((g||E||P)&&(m=!0),ir<0?m=!0:E=ir):Zn.test(ke)&&_t==="h"?((P||E)&&(m=!0),Ge===0?m=!0:P=Ge):m=!0;if(!m)le.source={value:r,startOffset:c},g&&(le.width={value:g}),E&&(le.density={value:E}),P&&(le.height={value:P}),p.push(le);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${ee}".`)}}var ei=Ra;var ti=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),ri={width:"w",height:"h",density:"x"},Ma=Object.keys(ri);function ni(e,t,r){let n=b(r.node),i=ei(n),s=Ma.filter(m=>i.some(g=>Object.prototype.hasOwnProperty.call(g,m)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=ri[a],c=i.map(m=>m.source.value),u=Math.max(...c.map(m=>m.length)),p=i.map(m=>m[a]?String(m[a].value):""),d=p.map(m=>{let g=m.indexOf(".");return g===-1?m.length:g}),S=Math.max(...d);return K(q([",",_],c.map((m,g)=>{let E=[m],P=p[g];if(P){let z=u-m.length+1,le=S-d[g],ee=" ".repeat(z+le);E.push(X(ee," "),P+o)}return E})))}var ii=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),si=async(e,t,r)=>K(await e(b(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var Tr=new WeakMap;function Ba(e,t){let{root:r}=e;return Tr.has(r)||Tr.set(r,r.children.some(n=>Rt(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),Tr.get(r)}var G=Ba;function ai(e,t,r){let n=b(r.node);return x(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},W)}function oi(e,t,r,n){let i=b(r.node),s=G(r,n)?"babel-ts":"babel";return x(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function li(e,t,r,n){let i=b(r.node),{left:s,operator:a,right:o}=Fa(i),c=G(r,n);return[C(await x(`function _(${s}) {}`,e,{parser:c?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,e,{parser:c?"__ts_expression":"__js_expression"})]}function Fa(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,i=e.match(t);if(!i)return;let s={for:i[3].trim()};if(!s.for)return;let a=w(0,i[1].trim(),n,""),o=a.match(r);o?(s.alias=a.replace(r,""),s.iterator1=o[1].trim(),o[2]&&(s.iterator2=o[2].trim())):s.alias=a;let c=[s.alias,s.iterator1,s.iterator2];if(!c.some((u,p)=>!u&&(p===0||c.slice(p+1).some(Boolean))))return{left:c.filter(Boolean).join(","),operator:i[2],right:s.for}}var qa=[{test:e=>e.node.fullName==="v-for",print:li},{test:(e,t)=>e.node.fullName==="generic"&&Rt(e.parent,t),print:ai},{test:({node:e},t)=>qn(e)||Hn(e,t),print:oi},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:Ha},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:Va},{test:e=>e.node.fullName.startsWith("v-"),print:ci}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function Ha(e,t,r,n){try{return await ci(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=b(r.node),s=G(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return x(i,e,{parser:s},W)}function Va(e,t,r,n){let i=b(r.node),s=G(r,n)?"__vue_ts_expression":"__vue_expression";return x(i,e,{parser:s},W)}function ci(e,t,r,n){let i=b(r.node),s=G(r,n)?"__ts_expression":"__js_expression";return x(i,e,{parser:s},W)}var ui=qa;var Ua=[{test:ti,print:ni},{test:ii,print:si},{test:Yn,print:jn},{test:$n,print:zn},{test:Kn,print:Qn},...ui,...Gn].map(({test:e,print:t})=>({test:e,print:Ga(t)}));function Wa(e,t){let{node:r}=e,{value:n}=r;if(n)return Mt(r,t)?[r.rawName,"=",n]:Ua.find(({test:i})=>i(e,t))?.print}function Ga(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=or(s,a=>typeof a=="string"?w(0,a,'"',"""):a),[n.node.rawName,'="',C(s),'"']}}var pi=Wa;var Q=e=>e.sourceSpan.start.offset,te=e=>e.sourceSpan.end.offset;function Ze(e,t){return[e.isS
Line truncated
|
||||
|
||||
${e}`;var wi=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ki(e){let t=te(e);return e.kind==="element"&&!e.endSourceSpan&&Ie(e.children)?Math.max(t,ki(F(0,e.children,-1))):t}function st(e,t,r){let n=e.node;if(he(n)){let i=ki(n);return[U(n,t),L(y.trimEnd(t.originalText.slice(Q(n)+(n.prev&&et(n.prev)?Ft(n).length:0),i-(n.next&&$(n.next)?de(n,t).length:0)))),V(n,t)]}return r()}function Vt(e,t){return O(e)&&O(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?Pt(t)?v:_:"":Pt(t)?v:k:et(e)&&(he(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&$(t)?"":!t.isLeadingSpaceSensitive||Pt(t)||$(t)&&e.lastChild&&_e(e.lastChild)&&e.lastChild.lastChild&&_e(e.lastChild.lastChild)?v:t.hasLeadingSpaces?_:k}function Re(e,t,r){let{node:n}=e;if(_r(n))return[j,...e.map(()=>{let s=e.node,a=s.prev?Vt(s.prev,s):"";return[a?[a,Ke(s.prev)?v:""]:"",st(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(O(s)){if(s.prev&&O(s.prev)){let m=Vt(s.prev,s);if(m)return Ke(s.prev)?[v,v,st(e,t,r)]:[m,st(e,t,r)]}return st(e,t,r)}let o=[],c=[],u=[],p=[],d=s.prev?Vt(s.prev,s):"",S=s.next?Vt(s,s.next):"";return d&&(Ke(s.prev)?o.push(v,v):d===v?o.push(v):O(s.prev)?c.push(d):c.push(X("",k,{groupId:i[a-1]}))),S&&(Ke(s)?O(s.next)&&p.push(v,v):S===v?O(s.next)&&p.push(v):u.push(S)),[...o,C([...c,C([st(e,t,r),...u],{id:i[a]})]),...p]},"children")}function xi(e,t,r){let{node:n}=e,i=[];if(io(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",C(r("parameters")),")"),!no(n)){i.push(" {");let s=Ai(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([v,Re(e,t,r)])),s&&i.push(v,"}")):s&&i.push("}")}return C(i,{shouldBreak:!0})}function Ai(e){return!(e.next?.kind==="angularControlFlowBlock"&&wi.get(e.name)?.has(e.next.name))}var ro=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default");function no(e){return ro(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function io(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!he(t)&&!Ai(t)}function yi(e,t,r){return[A([k,q([";",_],e.map(r,"children"))]),k]}function Ni(e,t,r){let{node:n}=e;return[Se(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([_,q(_,e.map(r,"cases"))])]:"",k]),fe(n,t)]}function Li(e,t,r){let{node:n}=e;return[n.value," {",C([A([k,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(_),i.hasTrailingSpaces&&!s&&a.push(_)),a},"expression")]),k]),"}"]}function Pi(e,t,r){let{node:n}=e;if(Lt(n,t))return[U(n,t),C(rt(e,t,r)),L(Ht(n,t)),...Ze(n,t),V(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=p=>C([C(rt(e,t,r),{id:s}),p,Ze(n,t)]),o=p=>i?ln(p,{groupId:s}):(H(n,t)||Je(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?p:A(p),c=()=>i?X(k,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?on(k):k,u=()=>(n.next?$(n.next):ge(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?X(k,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":k;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Pn(n)?j:"",o([c(),Re(e,t,r)]),u()])}var R=(function(e){return e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA",e})({});function at(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function wr(e){return at(e)[1]==="ng-container"}function kr(e){return at(e)[1]==="ng-content"}function Me(e){return e===null?null:at(e)[0]}function Ee(e,t){return e?`:${e}:${t}`:t}var xr={name:"custom-elements"},Ar={name:"no-errors-schema"},re=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e[e.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",e})({});var so=/-+([a-z0-9])/g;function Oi(e){return e
Line truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>po.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Oi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(ho(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function ho(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var f=class{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=R.PARSABLE_DATA,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(c=>this.closedByChildren[c]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Mi,lt;function Be(e){return lt||(Mi=new f({canSelfClose:!0}),lt=Object.assign(Object.create(null),{base:new f({isVoid:!0}),meta:new f({isVoid:!0}),area:new f({isVoid:!0}),embed:new f({isVoid:!0}),link:new f({isVoid:!0}),img:new f({isVoid:!0}),input:new f({isVoid:!0}),param:new f({isVoid:!0}),hr:new f({isVoid:!0}),br:new f({isVoid:!0}),source:new f({isVoid:!0}),track:new f({isVoid:!0}),wbr:new f({isVoid:!0}),p:new f({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 f({closedByChildren:["tbody","tfoot"]}),tbody:new f({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new f({closedByChildren:["tbody"],closedByParent:!0}),tr:new f({closedByChildren:["tr"],closedByParent:!0}),td:new f({closedByChildren:["td","th"],closedByParent:!0}),th:new f({closedByChildren:["td","th"],closedByParent:!0}),col:new f({isVoid:!0}),svg:new f({implicitNamespacePrefix:"svg"}),foreignObject:new f({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new f({implicitNamespacePrefix:"math"}),li:new f({closedByChildren:["li"],closedByParent:!0}),dt:new f({closedByChildren:["dt","dd"]}),dd:new f({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new f({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new f({closedByChildren:["optgroup"],closedByParent:!0}),option:new f({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new f({ignoreFirstLf:!0}),listing:new f({ignoreFirstLf:!0}),style:new f({contentType:R.RAW_TEXT}),script:new f({contentType:R.RAW_TEXT}),title:new f({contentType:{default:R.ESCAPABLE_RAW_TEXT,svg:R.PARSABLE_DATA}}),textarea:new f({contentType:R.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Ri().allKnownElementNames().forEach(t=>{!lt[t]&&Me(t)===null&&(lt[t]=new f({canSelfClose:!1}))})),lt[e]??Mi}function ct(e){return e>=9&&e<=32||e==160}function ut(e){return 48<=e&&e<=57}function Fe(e){return e>=97&&e<=122||e>=65&&e<=90}function Bi(e){return e>=97&&e<=102||e>=65&&e<=70||ut(e)}function pt(e){return e===10||e===13}function Nr(e){return 48<=e&&e<=55}function Wt(e){return e===39||e===34||e===96}var qe=class qi{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,a=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let o=r.substring(0,i-1).lastIndexOf(String.fromCharCode(10));a=o>0?i-o:i}else
Line truncated
|
||||
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
|
||||
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},mt=class{constructor(e,t){this.content=e,this.url=t}},h=class{constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Fi=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),ne=class extends Error{constructor(e,t,r=Fi.ERROR,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Fi[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Ce=class{constructor(e,t){this.sourceSpan=e,this.i18n=t}},Hi=class extends Ce{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.kind="text"}visit(e,t){return e.visitText(this,t)}},Vi=class extends Ce{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.kind="cdata"}visit(e,t){return e.visitCdata(this,t)}},Ui=class extends Ce{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i,this.kind="expansion"}visit(e,t){return e.visitExpansion(this,t)}},Wi=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.kind="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},Gi=class extends Ce{constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.kind="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},ie=class extends Ce{constructor(e,t,r,n,i,s,a,o=null,c=null,u,p){super(s,p),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=c,this.isVoid=u,this.kind="element"}visit(e,t){return e.visitElement(this,t)}},$i=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.kind="comment"}visit(e,t){return e.visitComment(this,t)}},zi=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.kind="docType"}visit(e,t){return e.visitDocType(this,t)}},ve=class extends Ce{constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a,this.kind="block"}visit(e,t){return e.visitBlock(this,t)}},J=class extends Ce{constructor(e,t,r,n,i,s,a,o,c,u=null,p){super(o,p),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=c,this.endSourceSpan=u,this.kind="component"}visit(e,t){return e.visitComponent(this,t)}},Yi=class{constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i,this.kind="directive"}visit(e,t){return e.visitDirective(this,t)}},Lr=class{constructor(e,t){this.expression=e,this.sourceSpan=t,this.kind="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitBlockParameter(this,t)}},Pr=class{constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i,this.kind="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitLetDeclaration(this,t)}};function Gt(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let a=i(s);a&&n.push(a)}),n}var Or=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.directives),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitComponent(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitDirective(e,t){this.visitChildren(t,r=>{r(e.attrs)})}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(Gt(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}};var Te={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(l.TEXT,l.INTERPOLATION,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(l.EOF),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>ct(r)?!e:Go(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(l.BLOCK_OPEN_START,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(T),this._attemptCharCode(41))this._attemptCharCodeUntilFn(T);else{t.type=l.INCOMPLETE_BLOCK_OPEN;return}this._attemptCharCode(123)?(this._beginToken(l.BLOCK_OPEN_END),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(l.BLOCK_OPEN_END),this._endToken([]),this._beginToken(l.BLOCK_CLOSE),this._endToken([])):t.type=l.INCOMPLETE_BLOCK_OPEN}_consumeBlockEnd(e){this._beginToken(l.BLOCK_CLOSE,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Zi);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(l.BLOCK_PARAMETER);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Wt(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Zi)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(l.LET_START,e),ct(this._cursor.peek()))this._attemptCharCodeUntilFn(T);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=l.INCOMPLETE_LET;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(T),!this._attemptCharCode(61)){t.type=l.INCOMPLETE_LET;return}this._attemptCharCodeUntilFn(r=>T(r)&&!pt(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(l.LET_END),this._endToken([]),this._cursor.advance()):(t.type=l.INCOMPLETE_LET,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Fe(r)||r===36||r===95||t&&ut(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(l.LET_VALUE,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;Wt(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Uo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){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){if(this._currentTokenStart===null)throw new ne(this._cursor.getSpan(t),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new ne(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:e,sourceSpan:(t??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.)`);let r=new ne(t,e);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(e){if(e instanceof Ur&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof ne)this.errors.push(e);else throw e}_a
Line truncated
|
||||
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
|
||||
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===l.INTERPOLATION||this._peek.type===l.TEXT||this._peek.type===l.ENCODED_ENTITY;)t=this._advance(),r.push(t),t.type===l.INTERPOLATION?i+=t.parts.join("").replace(/&([^;]+);/g,as):t.type===l.ENCODED_ENTITY?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new Hi(i,new h(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[];this._consumeAttributesAndDirectives(n,i);let s=this._getElementFullName(t,this._getClosestElementLikeParent()),a=this._getTagDefinition(s),o=!1;if(this._peek.type===l.TAG_OPEN_END_VOID){this._advance(),o=!0;let E=this._getTagDefinition(s);this.canSelfClose||E?.canSelfClose||Me(s)!==null||E?.isVoid||this.errors.push(N.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===l.TAG_OPEN_END&&(this._advance(),o=!1);let c=this._peek.sourceSpan.fullStart,u=new h(t.sourceSpan.start,c,t.sourceSpan.fullStart),p=new h(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new h(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),S=new ie(s,n,i,[],o,u,p,void 0,d,a?.isVoid??!1),m=this._getContainer(),g=m!==null&&!!(!((r=this._getTagDefinition(m))===null||r===void 0)&&r.isClosedByChild(S.name));this._pushContainer(S,g),o?this._popContainer(s,ie,u):t.type===l.INCOMPLETE_TAG_OPEN&&(this._popContainer(s,ie,null),this.errors.push(N.create(s,u,`Opening tag "${s}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[];this._consumeAttributesAndDirectives(i,s);let a=this._getClosestElementLikeParent(),o=this._getComponentTagName(t,a),c=this._getComponentFullName(t,a),u=this._peek.type===l.COMPONENT_OPEN_END_VOID;this._advance();let p=this._peek.sourceSpan.fullStart,d=new h(t.sourceSpan.start,p,t.sourceSpan.fullStart),S=new h(t.sourceSpan.start,p,t.sourceSpan.fullStart),m=new J(n,o,c,i,s,[],u,d,S,void 0),g=this._getContainer(),E=g!==null&&m.tagName!==null&&!!(!((r=this._getTagDefinition(g))===null||r===void 0)&&r.isClosedByChild(m.tagName));this._pushContainer(m,E),u?this._popContainer(c,J,d):t.type===l.INCOMPLETE_COMPONENT_OPEN&&(this._popContainer(c,J,null),this.errors.push(N.create(c,d,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r){for(;this._peek.type===l.ATTR_NAME||this._peek.type===l.DIRECTIVE_NAME;)this._peek.type===l.DIRECTIVE_NAME?r.push(this._consumeDirective(this._peek)):t.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,J,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof J&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(N.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof ie?this.tagDefinitionResolver(t.name):t instanceof J&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(N.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,ie,t.sourceSpan)){let i=`Unexpected closing tag "${n}". 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(N.create(n,t.sourceSpan,i))}}_popContainer(t,r,n){let i=!1;for(let a=this._containerStack.length-1;a>=0;a--){var s;let o=this._containerStack[a],c=o instanceof J?o.fullName:o.name;if(Me(c)?c===t:(c===t||t===null)&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(a,this._containerStack.length-a),!i;(o instanceof ve||!(!((s=this._getTagDefinition(o))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(t){let r=Ee(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===l.ATTR_QUOTE&&(i=this._advance());let s="",a=[],o,c;if(this._peek.type===l.ATTR_VALUE_TEXT)for(o=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===l.ATTR_VALUE_TEXT||this._peek.type===l.ATTR_VALUE_INTERPOLATION||this._peek.type===l.ENCODED_E
Line truncated
|
||||
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function Zo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new h(s.sourceSpan.start,a.sourceSpan.end),c=new h(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=c,i.startSourceSpan=o,i.removeChild(a)}})}function el(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new h(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function tl(e){return el(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function rl(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.kind==="text"&&!y.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new h(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function nl(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/su;e.walk(n=>{if(xn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a=null,o=i.value.split(r);for(let c=0;c<o.length;c++,s=a){let u=o[c];if(c%2===0){a=s.moveBy(u.length),u.length>0&&n.insertChildBefore(i,{kind:"text",value:u,sourceSpan:new h(s,a)});continue}a=s.moveBy(u.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new h(s,a),children:u.length===0?[]:[{kind:"text",value:u,sourceSpan:new h(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function il(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&y.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=An(r,t),s=gr(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:c,text:u,trailingWhitespace:p}=kn(o.value),d=o.prev,S=o.next;u?(o.value=u,o.sourceSpan=new h(o.sourceSpan.start.moveBy(c.length),o.sourceSpan.end.moveBy(-p.length)),c&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),p&&(o.hasTrailingSpaces=!0,S&&(S.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(c||p)&&(d&&(d.hasTrailingSpaces=!0),S&&(S.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function sl(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function al(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function ol(e,t){e.walk(r=>{r.cssDisplay=Bn(r,t)})}function ll(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Ln(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=yn(i,t),i.isTrailingSpaceSensitive=Nn(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var ps=Qo;function cl(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[C(Re(e,t,r)),v];case"element":case"ieConditionalComment":return Pi(e,t,r);case"angularControlFlowBlock":return xi(e,t,r);case"angularControlFlowBlockParameters":return yi(e,t,r);case"angularControlFlowBlockParameter":return y.trim(n.expression);case"angularLetDeclaration":return C(["@let ",C([n.id," =",C(A([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Ni(e,t,r);case"angularIcuCase":return Li(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[Se(n),fe(n)];case"interpolation":return[Se(n,t),...e.map(r,"children"),fe(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/u,c=o.test(n.value),u=c?n.value.replace(o,""):n.value;return[L(u),c?v:""]}let i=U(n,t),s=It(n),a=V(n,t);return s[0]=[i,s[0]],s.push([s.pop(),a]),At(s)}case"docType":return[C([Se(n,t)," ",w(0,n.value.Line truncated
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
var Jr=Object.defineProperty;var Zr=e=>{throw TypeError(e)};var ks=(e,t,r)=>t in e?Jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var en=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})};var ir=(e,t,r)=>ks(e,typeof t!="symbol"?t+"":t,r),xs=(e,t,r)=>t.has(e)||Zr("Cannot "+r);var $e=(e,t,r)=>(xs(e,t,"read from private field"),r?r.call(e):t.get(e)),tn=(e,t,r)=>t.has(e)?Zr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var ws={};en(ws,{languages:()=>ms,options:()=>ds,parsers:()=>Qr,printers:()=>Ll});var xe=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var As=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ys=xe("replaceAll",function(){if(typeof this=="string")return As}),w=ys;function Ns(e){return this[e<0?this.length+e:e]}var Ls=xe("at",function(){if(Array.isArray(this)||typeof this=="string")return Ns}),F=Ls;var Ps=()=>{},ze=Ps;var Ye="string",je="array",St="cursor",Ae="indent",ye="align",Et="trim",Ne="group",Le="fill",Pe="if-break",Oe="indent-if-break",Ct="line-suffix",vt="line-suffix-boundary",Y="line",Tt="label",De="break-parent",bt=new Set([St,Ae,ye,Et,Ne,Le,Pe,Oe,Ct,vt,Y,Tt,De]);function Os(e){if(typeof e=="string")return Ye;if(Array.isArray(e))return je;if(!e)return;let{type:t}=e;if(bt.has(t))return t}var wt=Os;var Ds=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Is(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(wt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ds([...bt].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var sr=class extends Error{name="InvalidDocError";constructor(t){super(Is(t)),this.doc=t}},rn=sr;function ar(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let a=i(s);return r.set(s,a),a}function i(s){switch(wt(s)){case je:return t(s.map(n));case Le:return t({...s,parts:s.parts.map(n)});case Pe:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Ne:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case ye:case Ae:case Oe:case Tt:case Ct:return t({...s,contents:n(s.contents)});case Ye:case St:case Et:case vt:case Y:case De:return t(s);default:throw new rn(s)}}}function L(e,t=nn){return ar(e,r=>typeof r=="string"?q(t,r.split(`
|
||||
`)):r)}var D=ze,kt=ze,sn=ze,an=ze;function A(e){return D(e),{type:Ae,contents:e}}function Rs(e,t){return an(e),D(t),{type:ye,contents:t,n:e}}function on(e){return Rs(Number.NEGATIVE_INFINITY,e)}var j={type:De};function xt(e){return sn(e),{type:Le,parts:e}}function C(e,t={}){return D(e),kt(t.expandedStates,!0),{type:Ne,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function X(e,t="",r={}){return D(e),t!==""&&D(t),{type:Pe,breakContents:e,flatContents:t,groupId:r.groupId}}function ln(e,t){return D(e),{type:Oe,contents:e,groupId:t.groupId,negate:t.negate}}function q(e,t){D(e),kt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var _={type:Y},k={type:Y,soft:!0},Ms={type:Y,hard:!0},v=[Ms,j],Bs={type:Y,hard:!0,literal:!0},nn=[Bs,j];var cn=Object.freeze({character:"'",codePoint:39}),un=Object.freeze({character:'"',codePoint:34}),Fs=Object.freeze({preferred:cn,alternate:un}),qs=Object.freeze({preferred:un,alternate:cn});function Hs(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?Fs:qs,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let c=e.charCodeAt(o);c===r.codePoint?s++:c===n.codePoint&&a++}return(s>a?n:r).character}var pn=Hs;function or(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var lr=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(F(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${or([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n,"u");return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},hn=lr;var Vs=[" ",`
|
||||
`,"\f","\r"," "],Us=new hn(Vs),y=Us;var cr=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},mn=cr;var Ws=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Gs=new Set(["if","else if","for","switch","case"]);function fn(e,t,r){if(e.kind==="text"||e.kind==="comment")return null;if(e.kind==="yaml"&&delete t.value,e.kind==="attribute"){let{fullName:n,value:i}=e;n==="style"||n==="class"||n==="srcset"&&(r.fullName==="img"||r.fullName==="source")||n==="allow"&&r.fullName==="iframe"||n.startsWith("on")||n.startsWith("@")||n.startsWith(":")||n.startsWith(".")||n.startsWith("#")||n.startsWith("v-")||n==="vars"&&r.fullName==="style"||(n==="setup"||n==="generic")&&r.fullName==="script"||n==="slot-scope"||n.startsWith("(")||n.startsWith("[")||n.startsWith("*")||n.startsWith("bind")||n.startsWith("i18n")||n.startsWith("on-")||n.startsWith("ng-")||i?.includes("{{")?delete t.value:i&&(t.value=w(0,i,/'|"|'/gu,'"'))}if(e.kind==="docType"&&(t.value=w(0,e.value.toLowerCase(),/\s+/gu," ")),e.kind==="angularControlFlowBlock"&&e.parameters?.children)for(let n of t.parameters.children)Gs.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.kind==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim()),e.kind==="angularLetDeclarationInitializer"&&delete t.value,e.kind==="element"&&e.isVoid&&!e.isSelfClosing&&(t.isSelfClosing=!0)}fn.ignoredProperties=Ws;var dn=fn;function K(e,t=!0){return[A([k,e]),t?k:""]}function W(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function x(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):K(s)}function $s(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(s)?"":x(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},W)}var gn=$s;var zs=Array.prototype.toReversed??function(){return[...this].reverse()},Ys=xe("toReversed",function(){if(Array.isArray(this))return zs}),_n=Ys;function js(){let e=globalThis,t=e.Deno?.build?.os;return typeof t=="string"?t==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}var Xs=js();function Sn(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Ks(e){return e=Sn(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Qs(e){e=Sn(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function ur(e){return Xs?Qs(e):Ks(e)}var En=e=>String(e).split(/[/\\]/u).pop(),Cn=e=>String(e).startsWith("file:");function Js(e){return Array.isArray(e)&&e.length>0}var Ie=Js;function vn(e,t){if(!t)return;let r=En(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function Zs(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var ea=void 0;function Tn(e,t){if(t){if(Cn(t))try{t=ur(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function ta(e,t){let r=_n(0,e.plugins).flatMap(i=>i.languages??[]);return(Zs(r,t.language)??vn(r,t.physicalFile)??vn(r,t.file)??Tn(r,t.physicalFile)??Tn(r,t.file)??ea?.(r,t.physicalFile))?.parsers[0]}var At=ta;var yt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function ra(e){return!!e?.[yt]}var ce=ra;var Xe=3;function na(e){let t=e.slice(0,Xe);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Xe);if(r===-1)return;let n=e.slice(Xe,r).trim(),i=e.indexOf(`
|
||||
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
|
||||
...`,r)),i===-1)return;let a=i+1+Xe,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let c=e.slice(0,a),u;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:c.slice(-Xe),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return u??(u=c.split(`
|
||||
`)),u.length},get column(){return u??(u=c.split(`
|
||||
`)),F(0,u,-1).length}},[yt]:!0}}function ia(e){let t=na(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return w(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}var pr=ia;var bn="inline",hr={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",option:"block",optgroup:"block"},wn="normal",mr={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function sa(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var ue=sa;var aa=e=>w(0,e,/^[\t\f\r ]*\n/gu,""),fr=e=>aa(y.trimEnd(e)),kn=e=>{let t=e,r=y.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=y.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function Nt(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||pe(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||Ot(e,t)&&!H(e,t)&&e.kind!=="interpolation")}function he(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:oa(e.prev)}function oa(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function O(e){return e.kind==="text"||e.kind==="comment"}function H(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||ue(e)&&(e.name==="script"||e.name==="style"))}function xn(e,t){return e.children&&!H(e,t)}function An(e,t){return H(e,t)||e.kind==="interpolation"||dr(e)}function dr(e){return Fn(e).startsWith("pre")}function yn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ce(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:pe(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||pe(e)&&e.parent||H(e.parent,t)||Je(e.parent,t)||!ma(e.parent.cssDisplay))||e.prev&&!ga(e.prev.cssDisplay))}}function Nn(e,t){return ce(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:pe(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||pe(e)&&e.parent||H(e.parent,t)||Je(e.parent,t)||!fa(e.parent.cssDisplay))||e.next&&!da(e.next.cssDisplay))}function Ln(e,t){return _a(e.cssDisplay)&&!H(e,t)}function Ke(e){return ce(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function Pn(e){return gr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>ca(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&Dn(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||In(e.lastChild))}function gr(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function Lt(e){return Rn(e)||e.prev&&la(e.prev)||On(e)}function la(e){return Rn(e)||e.kind==="element"&&e.fullName==="br"||On(e)}function On(e){return Dn(e)&&In(e)}function Dn(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function In(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function Rn(e){switch(e.kind){case"ieConditionalComment":case"comme
Line truncated
|
||||
`||e==="\f"||e==="\r"||e===" "}var xa=/^[ \t\n\r\u000c]+/,Aa=/^[, \t\n\r\u000c]+/,ya=/^[^ \t\n\r\u000c]+/,Na=/[,]+$/,Zn=/^\d+$/,La=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Pa(e){let t=e.length,r,n,i,s,a,o=0,c;function u(m){let g,E=m.exec(e.substring(o));if(E)return[g]=E,o+=g.length,g}let p=[];for(;;){if(u(Aa),o>=t){if(p.length===0)throw new Error("Must contain one or more image candidate strings.");return p}c=o,r=u(ya),n=[],r.slice(-1)===","?(r=r.replace(Na,""),S()):d()}function d(){for(u(xa),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(Jn(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),S();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),S();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),S();return}else i+=a;else if(s==="after descriptor"&&!Jn(a))if(a===""){S();return}else s="in descriptor",o-=1;o+=1}}function S(){let m=!1,g,E,P,z,le={},ee,_t,ke,Ge,nr;for(z=0;z<n.length;z++)ee=n[z],_t=ee[ee.length-1],ke=ee.substring(0,ee.length-1),Ge=parseInt(ke,10),nr=parseFloat(ke),Zn.test(ke)&&_t==="w"?((g||E)&&(m=!0),Ge===0?m=!0:g=Ge):La.test(ke)&&_t==="x"?((g||E||P)&&(m=!0),nr<0?m=!0:E=nr):Zn.test(ke)&&_t==="h"?((P||E)&&(m=!0),Ge===0?m=!0:P=Ge):m=!0;if(!m)le.source={value:r,startOffset:c},g&&(le.width={value:g}),E&&(le.density={value:E}),P&&(le.height={value:P}),p.push(le);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${ee}".`)}}var ei=Pa;var ti=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),ri={width:"w",height:"h",density:"x"},Oa=Object.keys(ri);function ni(e,t,r){let n=b(r.node),i=ei(n),s=Oa.filter(m=>i.some(g=>Object.prototype.hasOwnProperty.call(g,m)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=ri[a],c=i.map(m=>m.source.value),u=Math.max(...c.map(m=>m.length)),p=i.map(m=>m[a]?String(m[a].value):""),d=p.map(m=>{let g=m.indexOf(".");return g===-1?m.length:g}),S=Math.max(...d);return K(q([",",_],c.map((m,g)=>{let E=[m],P=p[g];if(P){let z=u-m.length+1,le=S-d[g],ee=" ".repeat(z+le);E.push(X(ee," "),P+o)}return E})))}var ii=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),si=async(e,t,r)=>K(await e(b(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var vr=new WeakMap;function Da(e,t){let{root:r}=e;return vr.has(r)||vr.set(r,r.children.some(n=>It(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),vr.get(r)}var G=Da;function ai(e,t,r){let n=b(r.node);return x(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},W)}function oi(e,t,r,n){let i=b(r.node),s=G(r,n)?"babel-ts":"babel";return x(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function li(e,t,r,n){let i=b(r.node),{left:s,operator:a,right:o}=Ia(i),c=G(r,n);return[C(await x(`function _(${s}) {}`,e,{parser:c?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,e,{parser:c?"__ts_expression":"__js_expression"})]}function Ia(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,i=e.match(t);if(!i)return;let s={for:i[3].trim()};if(!s.for)return;let a=w(0,i[1].trim(),n,""),o=a.match(r);o?(s.alias=a.replace(r,""),s.iterator1=o[1].trim(),o[2]&&(s.iterator2=o[2].trim())):s.alias=a;let c=[s.alias,s.iterator1,s.iterator2];if(!c.some((u,p)=>!u&&(p===0||c.slice(p+1).some(Boolean))))return{left:c.filter(Boolean).join(","),operator:i[2],right:s.for}}var Ra=[{test:e=>e.node.fullName==="v-for",print:li},{test:(e,t)=>e.node.fullName==="generic"&&It(e.parent,t),print:ai},{test:({node:e},t)=>qn(e)||Hn(e,t),print:oi},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:Ma},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:Ba},{test:e=>e.node.fullName.startsWith("v-"),print:ci}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function Ma(e,t,r,n){try{return await ci(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=b(r.node),s=G(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return x(i,e,{parser:s},W)}function Ba(e,t,r,n){let i=b(r.node),s=G(r,n)?"__vue_ts_expression":"__vue_expression";return x(i,e,{parser:s},W)}function ci(e,t,r,n){let i=b(r.node),s=G(r,n)?"__ts_expression":"__js_expression";return x(i,e,{parser:s},W)}var ui=Ra;var Fa=[{test:ti,print:ni},{test:ii,print:si},{test:Yn,print:jn},{test:$n,print:zn},{test:Kn,print:Qn},...ui,...Gn].map(({test:e,print:t})=>({test:e,print:Ha(t)}));function qa(e,t){let{node:r}=e,{value:n}=r;if(n)return Rt(r,t)?[r.rawName,"=",n]:Fa.find(({test:i})=>i(e,t))?.print}function Ha(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=ar(s,a=>typeof a=="string"?w(0,a,'"',"""):a),[n.node.rawName,'="',C(s),'"']}}var pi=qa;var Q=e=>e.sourceSpan.start.offset,te=e=>e.sourceSpan.end.offset;function Ze(e,t){return[e.isS
Line truncated
|
||||
|
||||
${e}`;var wi=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ki(e){let t=te(e);return e.kind==="element"&&!e.endSourceSpan&&Ie(e.children)?Math.max(t,ki(F(0,e.children,-1))):t}function st(e,t,r){let n=e.node;if(he(n)){let i=ki(n);return[U(n,t),L(y.trimEnd(t.originalText.slice(Q(n)+(n.prev&&et(n.prev)?Bt(n).length:0),i-(n.next&&$(n.next)?de(n,t).length:0)))),V(n,t)]}return r()}function Ht(e,t){return O(e)&&O(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?Lt(t)?v:_:"":Lt(t)?v:k:et(e)&&(he(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&$(t)?"":!t.isLeadingSpaceSensitive||Lt(t)||$(t)&&e.lastChild&&_e(e.lastChild)&&e.lastChild.lastChild&&_e(e.lastChild.lastChild)?v:t.hasLeadingSpaces?_:k}function Re(e,t,r){let{node:n}=e;if(gr(n))return[j,...e.map(()=>{let s=e.node,a=s.prev?Ht(s.prev,s):"";return[a?[a,Ke(s.prev)?v:""]:"",st(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(O(s)){if(s.prev&&O(s.prev)){let m=Ht(s.prev,s);if(m)return Ke(s.prev)?[v,v,st(e,t,r)]:[m,st(e,t,r)]}return st(e,t,r)}let o=[],c=[],u=[],p=[],d=s.prev?Ht(s.prev,s):"",S=s.next?Ht(s,s.next):"";return d&&(Ke(s.prev)?o.push(v,v):d===v?o.push(v):O(s.prev)?c.push(d):c.push(X("",k,{groupId:i[a-1]}))),S&&(Ke(s)?O(s.next)&&p.push(v,v):S===v?O(s.next)&&p.push(v):u.push(S)),[...o,C([...c,C([st(e,t,r),...u],{id:i[a]})]),...p]},"children")}function xi(e,t,r){let{node:n}=e,i=[];if(eo(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",C(r("parameters")),")"),!Za(n)){i.push(" {");let s=Ai(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([v,Re(e,t,r)])),s&&i.push(v,"}")):s&&i.push("}")}return C(i,{shouldBreak:!0})}function Ai(e){return!(e.next?.kind==="angularControlFlowBlock"&&wi.get(e.name)?.has(e.next.name))}var Ja=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default");function Za(e){return Ja(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function eo(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!he(t)&&!Ai(t)}function yi(e,t,r){return[A([k,q([";",_],e.map(r,"children"))]),k]}function Ni(e,t,r){let{node:n}=e;return[Se(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([_,q(_,e.map(r,"cases"))])]:"",k]),fe(n,t)]}function Li(e,t,r){let{node:n}=e;return[n.value," {",C([A([k,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(_),i.hasTrailingSpaces&&!s&&a.push(_)),a},"expression")]),k]),"}"]}function Pi(e,t,r){let{node:n}=e;if(Nt(n,t))return[U(n,t),C(rt(e,t,r)),L(qt(n,t)),...Ze(n,t),V(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=p=>C([C(rt(e,t,r),{id:s}),p,Ze(n,t)]),o=p=>i?ln(p,{groupId:s}):(H(n,t)||Je(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?p:A(p),c=()=>i?X(k,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?on(k):k,u=()=>(n.next?$(n.next):ge(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?X(k,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":k;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Pn(n)?j:"",o([c(),Re(e,t,r)]),u()])}var R=(function(e){return e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA",e})({});function at(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function br(e){return at(e)[1]==="ng-container"}function wr(e){return at(e)[1]==="ng-content"}function Me(e){return e===null?null:at(e)[0]}function Ee(e,t){return e?`:${e}:${t}`:t}var kr={name:"custom-elements"},xr={name:"no-errors-schema"},re=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e[e.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",e})({});var to=/-+([a-z0-9])/g;function Oi(e){return e
Line truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>oo.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Oi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(lo(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function lo(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var f=class{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=R.PARSABLE_DATA,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(c=>this.closedByChildren[c]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Mi,lt;function Be(e){return lt||(Mi=new f({canSelfClose:!0}),lt=Object.assign(Object.create(null),{base:new f({isVoid:!0}),meta:new f({isVoid:!0}),area:new f({isVoid:!0}),embed:new f({isVoid:!0}),link:new f({isVoid:!0}),img:new f({isVoid:!0}),input:new f({isVoid:!0}),param:new f({isVoid:!0}),hr:new f({isVoid:!0}),br:new f({isVoid:!0}),source:new f({isVoid:!0}),track:new f({isVoid:!0}),wbr:new f({isVoid:!0}),p:new f({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 f({closedByChildren:["tbody","tfoot"]}),tbody:new f({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new f({closedByChildren:["tbody"],closedByParent:!0}),tr:new f({closedByChildren:["tr"],closedByParent:!0}),td:new f({closedByChildren:["td","th"],closedByParent:!0}),th:new f({closedByChildren:["td","th"],closedByParent:!0}),col:new f({isVoid:!0}),svg:new f({implicitNamespacePrefix:"svg"}),foreignObject:new f({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new f({implicitNamespacePrefix:"math"}),li:new f({closedByChildren:["li"],closedByParent:!0}),dt:new f({closedByChildren:["dt","dd"]}),dd:new f({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new f({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new f({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new f({closedByChildren:["optgroup"],closedByParent:!0}),option:new f({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new f({ignoreFirstLf:!0}),listing:new f({ignoreFirstLf:!0}),style:new f({contentType:R.RAW_TEXT}),script:new f({contentType:R.RAW_TEXT}),title:new f({contentType:{default:R.ESCAPABLE_RAW_TEXT,svg:R.PARSABLE_DATA}}),textarea:new f({contentType:R.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Ri().allKnownElementNames().forEach(t=>{!lt[t]&&Me(t)===null&&(lt[t]=new f({canSelfClose:!1}))})),lt[e]??Mi}function ct(e){return e>=9&&e<=32||e==160}function ut(e){return 48<=e&&e<=57}function Fe(e){return e>=97&&e<=122||e>=65&&e<=90}function Bi(e){return e>=97&&e<=102||e>=65&&e<=70||ut(e)}function pt(e){return e===10||e===13}function yr(e){return 48<=e&&e<=55}function Ut(e){return e===39||e===34||e===96}var qe=class qi{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,a=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let o=r.substring(0,i-1).lastIndexOf(String.fromCharCode(10));a=o>0?i-o:i}else
Line truncated
|
||||
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
|
||||
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},mt=class{constructor(e,t){this.content=e,this.url=t}},h=class{constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Fi=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),ne=class extends Error{constructor(e,t,r=Fi.ERROR,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Fi[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Ce=class{constructor(e,t){this.sourceSpan=e,this.i18n=t}},Hi=class extends Ce{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.kind="text"}visit(e,t){return e.visitText(this,t)}},Vi=class extends Ce{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.kind="cdata"}visit(e,t){return e.visitCdata(this,t)}},Ui=class extends Ce{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i,this.kind="expansion"}visit(e,t){return e.visitExpansion(this,t)}},Wi=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.kind="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},Gi=class extends Ce{constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.kind="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},ie=class extends Ce{constructor(e,t,r,n,i,s,a,o=null,c=null,u,p){super(s,p),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=c,this.isVoid=u,this.kind="element"}visit(e,t){return e.visitElement(this,t)}},$i=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.kind="comment"}visit(e,t){return e.visitComment(this,t)}},zi=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.kind="docType"}visit(e,t){return e.visitDocType(this,t)}},ve=class extends Ce{constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a,this.kind="block"}visit(e,t){return e.visitBlock(this,t)}},J=class extends Ce{constructor(e,t,r,n,i,s,a,o,c,u=null,p){super(o,p),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=c,this.endSourceSpan=u,this.kind="component"}visit(e,t){return e.visitComponent(this,t)}},Yi=class{constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i,this.kind="directive"}visit(e,t){return e.visitDirective(this,t)}},Nr=class{constructor(e,t){this.expression=e,this.sourceSpan=t,this.kind="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitBlockParameter(this,t)}},Lr=class{constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i,this.kind="letDeclaration",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitLetDeclaration(this,t)}};function Wt(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let a=i(s);a&&n.push(a)}),n}var Pr=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.directives),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitComponent(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitDirective(e,t){this.visitChildren(t,r=>{r(e.attrs)})}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(Wt(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}};var Te={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(l.TEXT,l.INTERPOLATION,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(l.EOF),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>ct(r)?!e:Ho(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(l.BLOCK_OPEN_START,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(T),this._attemptCharCode(41))this._attemptCharCodeUntilFn(T);else{t.type=l.INCOMPLETE_BLOCK_OPEN;return}this._attemptCharCode(123)?(this._beginToken(l.BLOCK_OPEN_END),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(l.BLOCK_OPEN_END),this._endToken([]),this._beginToken(l.BLOCK_CLOSE),this._endToken([])):t.type=l.INCOMPLETE_BLOCK_OPEN}_consumeBlockEnd(e){this._beginToken(l.BLOCK_CLOSE,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Zi);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(l.BLOCK_PARAMETER);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Ut(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Zi)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(l.LET_START,e),ct(this._cursor.peek()))this._attemptCharCodeUntilFn(T);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=l.INCOMPLETE_LET;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(T),!this._attemptCharCode(61)){t.type=l.INCOMPLETE_LET;return}this._attemptCharCodeUntilFn(r=>T(r)&&!pt(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(l.LET_END),this._endToken([]),this._cursor.advance()):(t.type=l.INCOMPLETE_LET,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Fe(r)||r===36||r===95||t&&ut(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(l.LET_VALUE,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;Ut(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Fo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){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){if(this._currentTokenStart===null)throw new ne(this._cursor.getSpan(t),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new ne(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:e,sourceSpan:(t??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.)`);let r=new ne(t,e);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(e){if(e instanceof Vr&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof ne)this.errors.push(e);else throw e}_a
Line truncated
|
||||
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
|
||||
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===l.INTERPOLATION||this._peek.type===l.TEXT||this._peek.type===l.ENCODED_ENTITY;)t=this._advance(),r.push(t),t.type===l.INTERPOLATION?i+=t.parts.join("").replace(/&([^;]+);/g,as):t.type===l.ENCODED_ENTITY?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new Hi(i,new h(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[];this._consumeAttributesAndDirectives(n,i);let s=this._getElementFullName(t,this._getClosestElementLikeParent()),a=this._getTagDefinition(s),o=!1;if(this._peek.type===l.TAG_OPEN_END_VOID){this._advance(),o=!0;let E=this._getTagDefinition(s);this.canSelfClose||E?.canSelfClose||Me(s)!==null||E?.isVoid||this.errors.push(N.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===l.TAG_OPEN_END&&(this._advance(),o=!1);let c=this._peek.sourceSpan.fullStart,u=new h(t.sourceSpan.start,c,t.sourceSpan.fullStart),p=new h(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new h(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),S=new ie(s,n,i,[],o,u,p,void 0,d,a?.isVoid??!1),m=this._getContainer(),g=m!==null&&!!(!((r=this._getTagDefinition(m))===null||r===void 0)&&r.isClosedByChild(S.name));this._pushContainer(S,g),o?this._popContainer(s,ie,u):t.type===l.INCOMPLETE_TAG_OPEN&&(this._popContainer(s,ie,null),this.errors.push(N.create(s,u,`Opening tag "${s}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[];this._consumeAttributesAndDirectives(i,s);let a=this._getClosestElementLikeParent(),o=this._getComponentTagName(t,a),c=this._getComponentFullName(t,a),u=this._peek.type===l.COMPONENT_OPEN_END_VOID;this._advance();let p=this._peek.sourceSpan.fullStart,d=new h(t.sourceSpan.start,p,t.sourceSpan.fullStart),S=new h(t.sourceSpan.start,p,t.sourceSpan.fullStart),m=new J(n,o,c,i,s,[],u,d,S,void 0),g=this._getContainer(),E=g!==null&&m.tagName!==null&&!!(!((r=this._getTagDefinition(g))===null||r===void 0)&&r.isClosedByChild(m.tagName));this._pushContainer(m,E),u?this._popContainer(c,J,d):t.type===l.INCOMPLETE_COMPONENT_OPEN&&(this._popContainer(c,J,null),this.errors.push(N.create(c,d,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r){for(;this._peek.type===l.ATTR_NAME||this._peek.type===l.DIRECTIVE_NAME;)this._peek.type===l.DIRECTIVE_NAME?r.push(this._consumeDirective(this._peek)):t.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,J,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof J&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(N.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof ie?this.tagDefinitionResolver(t.name):t instanceof J&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(N.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,ie,t.sourceSpan)){let i=`Unexpected closing tag "${n}". 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(N.create(n,t.sourceSpan,i))}}_popContainer(t,r,n){let i=!1;for(let a=this._containerStack.length-1;a>=0;a--){var s;let o=this._containerStack[a],c=o instanceof J?o.fullName:o.name;if(Me(c)?c===t:(c===t||t===null)&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(a,this._containerStack.length-a),!i;(o instanceof ve||!(!((s=this._getTagDefinition(o))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(t){let r=Ee(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===l.ATTR_QUOTE&&(i=this._advance());let s="",a=[],o,c;if(this._peek.type===l.ATTR_VALUE_TEXT)for(o=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===l.ATTR_VALUE_TEXT||this._peek.type===l.ATTR_VALUE_INTERPOLATION||this._peek.type===l.ENCODED_E
Line truncated
|
||||
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function Xo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new h(s.sourceSpan.start,a.sourceSpan.end),c=new h(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=c,i.startSourceSpan=o,i.removeChild(a)}})}function Ko(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new h(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function Qo(e){return Ko(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function Jo(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.kind==="text"&&!y.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new h(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function Zo(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/su;e.walk(n=>{if(xn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a=null,o=i.value.split(r);for(let c=0;c<o.length;c++,s=a){let u=o[c];if(c%2===0){a=s.moveBy(u.length),u.length>0&&n.insertChildBefore(i,{kind:"text",value:u,sourceSpan:new h(s,a)});continue}a=s.moveBy(u.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new h(s,a),children:u.length===0?[]:[{kind:"text",value:u,sourceSpan:new h(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function el(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&y.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=An(r,t),s=dr(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:c,text:u,trailingWhitespace:p}=kn(o.value),d=o.prev,S=o.next;u?(o.value=u,o.sourceSpan=new h(o.sourceSpan.start.moveBy(c.length),o.sourceSpan.end.moveBy(-p.length)),c&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),p&&(o.hasTrailingSpaces=!0,S&&(S.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(c||p)&&(d&&(d.hasTrailingSpaces=!0),S&&(S.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function tl(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function rl(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function nl(e,t){e.walk(r=>{r.cssDisplay=Bn(r,t)})}function il(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Ln(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=yn(i,t),i.isTrailingSpaceSensitive=Nn(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var ps=Yo;function sl(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[C(Re(e,t,r)),v];case"element":case"ieConditionalComment":return Pi(e,t,r);case"angularControlFlowBlock":return xi(e,t,r);case"angularControlFlowBlockParameters":return yi(e,t,r);case"angularControlFlowBlockParameter":return y.trim(n.expression);case"angularLetDeclaration":return C(["@let ",C([n.id," =",C(A([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Ni(e,t,r);case"angularIcuCase":return Li(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[Se(n),fe(n)];case"interpolation":return[Se(n,t),...e.map(r,"children"),fe(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/u,c=o.test(n.value),u=c?n.value.replace(o,""):n.value;return[L(u),c?v:""]}let i=U(n,t),s=Dt(n),a=V(n,t);return s[0]=[i,s[0]],s.push([s.pop(),a]),xt(s)}case"docType":return[C([Se(n,t)," ",w(0,n.value.Line truncated
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
markdown: Parser;
|
||||
mdx: Parser;
|
||||
remark: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
mdast: Printer;
|
||||
};
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.markdown=e()}})(function(){"use strict";var El=Object.create;var Tr=Object.defineProperty;var Cl=Object.getOwnPropertyDescriptor;var vl=Object.getOwnPropertyNames;var Al=Object.getPrototypeOf,bl=Object.prototype.hasOwnProperty;var x=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Vn=(e,r)=>{for(var t in r)Tr(e,t,{get:r[t],enumerable:!0})},jn=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vl(r))!bl.call(e,i)&&i!==t&&Tr(e,i,{get:()=>r[i],enumerable:!(n=Cl(r,i))||n.enumerable});return e};var Re=(e,r,t)=>(t=e!=null?El(Al(e)):{},jn(r||!e||!e.__esModule?Tr(t,"default",{value:e,enumerable:!0}):t,e)),xl=e=>jn(Tr({},"__esModule",{value:!0}),e);var Br=x((EF,$n)=>{"use strict";$n.exports=Bl;function Bl(e){return String(e).replace(/\s+/g," ")}});var Zi=x((XC,Qi)=>{"use strict";Qi.exports=Qf;var pr=9,Vr=10,Ve=32,Hf=33,Kf=58,je=91,Xf=92,St=93,hr=94,jr=96,$r=4,Jf=1024;function Qf(e){var r=this.Parser,t=this.Compiler;Zf(r)&&rD(r,e),eD(t)&&tD(t)}function Zf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function eD(e){return!!(e&&e.prototype&&e.prototype.visitors)}function rD(e,r){for(var t=r||{},n=e.prototype,i=n.blockTokenizers,u=n.inlineTokenizers,a=n.blockMethods,o=n.inlineMethods,s=i.definition,l=u.reference,c=[],f=-1,D=a.length,m;++f<D;)m=a[f],!(m==="newline"||m==="indentedCode"||m==="paragraph"||m==="footnoteDefinition")&&c.push([m]);c.push(["footnoteDefinition"]),t.inlineNotes&&(Lt(o,"reference","inlineNote"),u.inlineNote=F),Lt(a,"definition","footnoteDefinition"),Lt(o,"reference","footnoteCall"),i.definition=E,i.footnoteDefinition=p,u.footnoteCall=h,u.reference=g,n.interruptFootnoteDefinition=c,g.locator=l.locator,h.locator=v,F.locator=A;function p(b,d,y){for(var w=this,C=w.interruptFootnoteDefinition,k=w.offset,T=d.length+1,B=0,_=[],S,P,N,O,I,le,K,L,ie,Z,ve,Ae,G;B<T&&(O=d.charCodeAt(B),!(O!==pr&&O!==Ve));)B++;if(d.charCodeAt(B++)===je&&d.charCodeAt(B++)===hr){for(P=B;B<T;){if(O=d.charCodeAt(B),O!==O||O===Vr||O===pr||O===Ve)return;if(O===St){N=B,B++;break}B++}if(!(N===void 0||P===N||d.charCodeAt(B++)!==Kf)){if(y)return!0;for(S=d.slice(P,N),I=b.now(),ie=0,Z=0,ve=B,Ae=[];B<T;){if(O=d.charCodeAt(B),O!==O||O===Vr)G={start:ie,contentStart:ve||B,contentEnd:B,end:B},Ae.push(G),O===Vr&&(ie=B+1,Z=0,ve=void 0,G.end=ie);else if(Z!==void 0)if(O===Ve||O===pr)Z+=O===Ve?1:$r-Z%$r,Z>$r&&(Z=void 0,ve=B);else{if(Z<$r&&G&&(G.contentStart===G.contentEnd||nD(C,i,w,[b,d.slice(B,Jf),!0])))break;Z=void 0,ve=B}B++}for(B=-1,T=Ae.length;T>0&&(G=Ae[T-1],G.contentStart===G.contentEnd);)T--;for(le=b(d.slice(0,G.contentEnd));++B<T;)G=Ae[B],k[I.line+B]=(k[I.line+B]||0)+(G.contentStart-G.start),_.push(d.slice(G.contentStart,G.end));return K=w.enterBlock(),L=w.tokenizeBlock(_.join(""),I),K(),le({type:"footnoteDefinition",identifier:S.toLowerCase(),label:S,children:L})}}}function h(b,d,y){var w=d.length+1,C=0,k,T,B,_;if(d.charCodeAt(C++)===je&&d.charCodeAt(C++)===hr){for(T=C;C<w;){if(_=d.charCodeAt(C),_!==_||_===Vr||_===pr||_===Ve)return;if(_===St){B=C,C++;break}C++}if(!(B===void 0||T===B))return y?!0:(k=d.slice(T,B),b(d.slice(0,C))({type:"footnoteReference",identifier:k.toLowerCase(),label:k}))}}function F(b,d,y){var w=this,C=d.length+1,k=0,T=0,B,_,S,P,N,O,I;if(d.charCodeAt(k++)===hr&&d.charCodeAt(k++)===je){for(S=k;k<C;){if(_=d.charCodeAt(k),_!==_)return;if(O===void 0)if(_===Xf)k+=2;else if(_===je)T++,k++;else if(_===St)if(T===0){P=k,k++;break}else T--,k++;else if(_===jr){for(N=k,O=1;d.charCodeAt(N+O)===jr;)O++;k+=O}else k++;else if(_===jr){for(N=k,I=1;d.charCodeAt(N+I)===jr;)I++;k+=I,O===I&&(O=void 0),I=void 0}else k++}if(P!==void 0)return y?!0:(B=b.now(),B.column+=2,B.offset+=2,b(d.slice(0,k))({type:"footnote",children:w.tokenizeInline(d.slice(S,P),B)}))}}function g(b,d,y){var w=0;if(d.charCodeAt(w)===Hf&&w++,d.charCodeAt(w)===je&&d.charCodeAt(w+1)!==hr)return l.call(this,b,d,y)}function E(b,d,y){for(var w=0,C=d.charCodeAt(w);C===Ve||C===pr;)C=d.charCodeAt(++w);if(C===je&&d.charCodeAt(w+1)!==hr)return s.call(this,b,d,y)}function v(b,d){return b.indexOf("[",d)}function A(b,d){return b.indexOf("^[",d)}}function tD(e){var r=e.prototype.visitors,t=" ";r.footnote=n,r.footnoteReference=i,r.footnoteDefinition=u;function n(a){return"^["+this.all(a).join("")+"]"}function i(a){return"[^"+(a.label||a.identifier)+"]"}function u(a){for(var o=this.all(a).join(`
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=t+c);return"[^"+(a.label||a.identifier)+"]: "+o.join(`
|
||||
`)}}function Lt(e,r,t){e.splice(e.indexOf(r),0,t)}function nD(e,r,t,n){for(var i=e.length,u=-1;++u<i;)if(r[e[u][0]].apply(t,n))return!0;return!1}});var Mt=x(Rt=>{Rt.isRemarkParser=iD;Rt.isRemarkCompiler=uD;function iD(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function uD(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var au=x((QC,uu)=>{var eu=Mt();uu.exports=cD;var ru=9,tu=32,Hr=36,aD=48,oD=57,nu=92,sD=["math","math-inline"],iu="math-display";function cD(e){let r=this.Parser,t=this.Compiler;eu.isRemarkParser(r)&&lD(r,e),eu.isRemarkCompiler(t)&&fD(t,e)}function lD(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=i,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function i(a,o){return a.indexOf("$",o)}function u(a,o,s){let l=o.length,c=!1,f=!1,D=0,m,p,h,F,g,E,v;if(o.charCodeAt(D)===nu&&(f=!0,D++),o.charCodeAt(D)===Hr){if(D++,f)return s?!0:a(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===Hr&&(c=!0,D++),h=o.charCodeAt(D),!(h===tu||h===ru)){for(F=D;D<l;){if(p=h,h=o.charCodeAt(D+1),p===Hr){if(m=o.charCodeAt(D-1),m!==tu&&m!==ru&&(h!==h||h<aD||h>oD)&&(!c||h===Hr)){g=D-1,D++,c&&D++,E=D;break}}else p===nu&&(D++,h=o.charCodeAt(D+1));D++}if(E!==void 0)return s?!0:(v=o.slice(F,g+1),a(o.slice(0,E))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:sD.concat(c&&r.inlineMathDouble?[iu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function fD(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let i="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(iu)&&(i="$$"),i+n.value+i}}});var fu=x((ZC,lu)=>{var ou=Mt();lu.exports=dD;var su=10,dr=32,Ut=36,cu=`
|
||||
`,DD="$",pD=2,hD=["math","math-display"];function dD(){let e=this.Parser,r=this.Compiler;ou.isRemarkParser(e)&&mD(e),ou.isRemarkCompiler(r)&&FD(r)}function mD(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,i=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=a,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),i.splice(i.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function a(o,s,l){var c=s.length,f=0;let D,m,p,h,F,g,E,v,A,b,d;for(;f<c&&s.charCodeAt(f)===dr;)f++;for(F=f;f<c&&s.charCodeAt(f)===Ut;)f++;if(g=f-F,!(g<pD)){for(;f<c&&s.charCodeAt(f)===dr;)f++;for(E=f;f<c;){if(D=s.charCodeAt(f),D===Ut)return;if(D===su)break;f++}if(s.charCodeAt(f)===su){if(l)return!0;for(m=[],E!==f&&m.push(s.slice(E,f)),f++,p=s.indexOf(cu,f+1),p=p===-1?c:p;f<c;){for(v=!1,b=f,d=p,h=p,A=0;h>b&&s.charCodeAt(h-1)===dr;)h--;for(;h>b&&s.charCodeAt(h-1)===Ut;)A++,h--;for(g<=A&&s.indexOf(DD,b)===h&&(v=!0,d=h);b<=d&&b-f<F&&s.charCodeAt(b)===dr;)b++;if(v)for(;d>b&&s.charCodeAt(d-1)===dr;)d--;if((!v||b!==d)&&m.push(s.slice(b,d)),v)break;f=p+1,p=s.indexOf(cu,f+1),p=p===-1?c:p}return m=m.join(`
|
||||
`),o(s.slice(0,p))({type:"math",value:m,data:{hName:"div",hProperties:{className:hD.concat()},hChildren:[{type:"text",value:m}]}})}}}}function FD(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var pu=x((ev,Du)=>{var gD=au(),ED=fu();Du.exports=CD;function CD(e){var r=e||{};ED.call(this,r),gD.call(this,r)}});var Ie=x((rv,hu)=>{hu.exports=AD;var vD=Object.prototype.hasOwnProperty;function AD(){for(var e={},r=0;r<arguments.length;r++){var t=arguments[r];for(var n in t)vD.call(t,n)&&(e[n]=t[n])}return e}});var du=x((tv,Yt)=>{typeof Object.create=="function"?Yt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Yt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var gu=x((nv,Fu)=>{"use strict";var bD=Ie(),mu=du();Fu.exports=xD;function xD(e){var r,t,n;mu(u,e),mu(i,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():bD(n));return u;function i(a){return e.apply(this,a)}function u(){return this instanceof u?e.apply(this,arguments):new i(arguments)}}});var Cu=x((iv,Eu)=>{"use strict";Eu.exports=yD;function yD(e,r,t){return n;function n(){var i=t||this,u=i[e];return i[e]=!r,a;function a(){i[e]=u}}}});var Au=x((uv,vu)=>{"use strict";vu.exports=wD;function wD(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:i,toPosition:i,toOffset:u};function i(a){var o=-1;if(a>-1&&a<t[t.length-1]){for(;++o<t.length;)if(t[o]>a)return{line:o+1,column:a-(t[o-1]||0)+1,offset:a}}return{}}function u(a){var o=a&&a.line,s=a&&a.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l<t[t.length-1]?l:-1}}});var xu=x((av,bu)=>{"use strict";bu.exports=kD;var Gt="\\";function kD(e,r){return t;function t(n){for(var i=0,u=n.indexOf(Gt),a=e[r],o=[],s;u!==-1;)o.push(n.slice(i,u)),i=u+1,s=n.charAt(i),(!s||a.indexOf(s)===-1)&&o.push(Gt),u=n.indexOf(Gt,i+1);return o.push(n.slice(i)),o.join("")}}});var yu=x((ov,TD)=>{TD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var wu=x((sv,BD)=>{BD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Se=x((cv,ku)=>{"use strict";ku.exports=_D;function _D(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Bu=x((lv,Tu)=>{"use strict";Tu.exports=OD;function OD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var $e=x((fv,_u)=>{"use strict";_u.exports=qD;function qD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var qu=x((Dv,Ou)=>{"use strict";var ND=$e(),PD=Se();Ou.exports=ID;function ID(e){return ND(e)||PD(e)}});var Nu=x((pv,SD)=>{SD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);T!==-1;)l++,k=T,T=C.indexOf(`
|
||||
`,T+1);k===-1?c+=C.length:c=C.length-k,l in u&&(k!==-1?c+=u[l]:c<=u[l]&&(c=u[l]+1))}function E(){var C=[],k=l+1;return function(){for(var T=l+1;k<T;)C.push((u[k]||0)+1),k++;return C}}function v(){var C={line:l,column:c};return C.offset=i.toOffset(C),C}function A(C){this.start=C,this.end=v()}function b(C){t.slice(0,C.length)!==C&&i.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),v())}function d(){var C=v();return k;function k(T,B){var _=T.position,S=_?_.start:C,P=[],N=_&&_.end.line,O=C.line;if(T.position=new A(S),_&&B&&_.indent){if(P=_.indent,N<O){for(;++N<O;)P.push((u[N]||0)+1);P.push(C.column)}B=P.concat(B)}return T.position.indent=B||[],T}}function y(C,k){var T=k?k.children:a,B=T[T.length-1],_;return B&&C.type===B.type&&(C.type==="text"||C.type==="blockquote")&&Zu(B)&&Zu(C)&&(_=C.type==="text"?op:sp,C=_.call(i,B,C)),C!==B&&T.push(C),i.atStart&&a.length!==0&&i.exitStart(),C}function w(C){var k=E(),T=d(),B=v();return b(C),_.reset=S,S.test=P,_.test=P,t=t.slice(C.length),g(C),k=k(),_;function _(N,O){return T(y(T(N),O),k)}function S(){var N=_.apply(null,arguments);return l=B.line,c=B.column,t=C+t,N}function P(){var N=T({});return l=B.line,c=B.column,t=C+t,N.position}}}}function Zu(e){var r,t;return e.type!=="text"||!e.position?!0:(r=e.position.start,t=e.position.end,r.line!==t.line||t.column-r.column===e.value.length)}function op(e,r){return e.value+=r.value,e}function sp(e,r){return this.options.commonmark||this.options.gfm?r:(e.children=e.children.concat(r.children),e)}});var ia=x((gv,na)=>{"use strict";na.exports=Xr;var $t=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Ht=$t.concat(["~","|"]),ta=Ht.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Xr.default=$t;Xr.gfm=Ht;Xr.commonmark=ta;function Xr(e){var r=e||{};return r.commonmark?ta:r.gfm?Ht:$t}});var aa=x((Ev,ua)=>{"use strict";ua.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var Kt=x((Cv,oa)=>{"use strict";oa.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:aa()}});var ca=x((vv,sa)=>{"use strict";var cp=Ie(),lp=ia(),fp=Kt();sa.exports=Dp;function Dp(e){var r=this,t=r.options,n,i;if(e==null)e={};else if(typeof e=="object")e=cp(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in fp){if(i=e[n],i==null&&(i=t[n]),n!=="blocks"&&typeof i!="boolean"||n==="blocks"&&typeof i!="object")throw new Error("Invalid value `"+i+"` for setting `options."+n+"`");e[n]=i}return r.options=e,r.escape=lp(e),r}});var Da=x((Av,fa)=>{"use strict";fa.exports=la;function la(e){if(e==null)return mp;if(typeof e=="string")return dp(e);if(typeof e=="object")return"length"in e?hp(e):pp(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function pp(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function hp(e){for(var r=[],t=-1;++t<e.length;)r[t]=la(e[t]);return n;function n(){for(var i=-1;++i<r.length;)if(r[i].apply(this,arguments))return!0;return!1}}function dp(e){return r;function r(t){return!!(t&&t.type===e)}}function mp(){return!0}});var ha=x((bv,pa)=>{pa.exports=Fp;function Fp(e){return e}});var ga=x((xv,Fa)=>{"use strict";Fa.exports=Jr;var gp=Da(),Ep=ha(),da=!0,ma="skip",Xt=!1;Jr.CONTINUE=da;Jr.SKIP=ma;Jr.EXIT=Xt;function Jr(e,r,t,n){var i,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=gp(r),i=n?-1:1,a(e,null,[])();function a(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+Ep(c.type+(f?"<"+f+">":""))+")"),D;function D(){var m=l.concat(o),p=[],h,F;if((!r||u(o,s,l[l.length-1]||null))&&(p=Cp(t(o,l)),p[0]===Xt))return p;if(o.children&&p[0]!==ma)for(F=(n?o.children.length:-1)+i;F>-1&&F<o.children.length;){if(h=a(o.children[F],F,m)(),h[0]===Xt)return h;F=typeof h[1]=="number"?h[1]:F+i}return p}}}function Cp(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[da,e]:[e]}});var Ca=x((yv,Ea)=>{"use strict";Ea.exports=Zr;var Qr=ga(),vp=Qr.CONTINUE,Ap=Qr.SKIP,bp=Qr.EXIT;Zr.CONTINUE=vp;Zr.SKIP=Ap;Zr.EXIT=bp;function Zr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Qr(e,r,i,n);function i(u,a){var o=a[a.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var Aa=x((wv,va)=>{"use strict";var xp=Ca();va.exports=yp;function yp(e,r){return xp(e,r?wp:kp),e}function wp(e){delete e.position}function kp(e){e.position=void 0}});var ya=x((kv,xa)=>{"use strict";var ba=Ie(),Tp=Aa();xa.exports=Op;var Bp=`
|
||||
`,_p=/\r\n|\r/g;function Op(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=ba(t),i;return r=r.replace(_p,Bp),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),i={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||ba(t)}},e.options.position||Tp(i,!0),i}});var ka=x((Tv,wa)=>{"use strict";var qp=/^[ \t]*(\n|$)/;wa.exports=Np;function Np(e,r,t){for(var n,i="",u=0,a=r.length;u<a&&(n=qp.exec(r.slice(u)),n!=null);)u+=n[0].length,i+=n[0];if(i!==""){if(t)return!0;e(i)}}});var et=x((Bv,Ta)=>{"use strict";var ge="",Jt;Ta.exports=Pp;function Pp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Jt!==e||typeof Jt>"u")Jt=e,ge="";else if(ge.length>=t)return ge.substr(0,t);for(;t>ge.length&&r>1;)r&1&&(ge+=e),r>>=1,e+=e;return ge+=e,ge=ge.substr(0,t),ge}});var Qt=x((_v,Ba)=>{"use strict";Ba.exports=Ip;function Ip(e){return String(e).replace(/\n+$/,"")}});var qa=x((Ov,Oa)=>{"use strict";var Sp=et(),Lp=Qt();Oa.exports=Up;var Zt=`
|
||||
`,_a=" ",en=" ",Rp=4,Mp=Sp(en,Rp);function Up(e,r,t){for(var n=-1,i=r.length,u="",a="",o="",s="",l,c,f;++n<i;)if(l=r.charAt(n),f)if(f=!1,u+=o,a+=s,o="",s="",l===Zt)o=l,s=l;else for(u+=l,a+=l;++n<i;){if(l=r.charAt(n),!l||l===Zt){s=l,o=l;break}u+=l,a+=l}else if(l===en&&r.charAt(n+1)===l&&r.charAt(n+2)===l&&r.charAt(n+3)===l)o+=Mp,n+=3,f=!0;else if(l===_a)o+=l,f=!0;else{for(c="";l===_a||l===en;)c+=l,l=r.charAt(++n);if(l!==Zt)break;o+=c+l,s+=l}if(a)return t?!0:e(u)({type:"code",lang:null,meta:null,value:Lp(a)})}});var Ia=x((qv,Pa)=>{"use strict";Pa.exports=Wp;var rt=`
|
||||
`,Fr=" ",Xe=" ",Yp="~",Na="`",Gp=3,zp=4;function Wp(e,r,t){var n=this,i=n.options.gfm,u=r.length+1,a=0,o="",s,l,c,f,D,m,p,h,F,g,E,v,A;if(i){for(;a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)o+=c,a++;if(v=a,c=r.charAt(a),!(c!==Yp&&c!==Na)){for(a++,l=c,s=1,o+=c;a<u&&(c=r.charAt(a),c===l);)o+=c,s++,a++;if(!(s<Gp)){for(;a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)o+=c,a++;for(f="",p="";a<u&&(c=r.charAt(a),!(c===rt||l===Na&&c===l));)c===Xe||c===Fr?p+=c:(f+=p+c,p=""),a++;if(c=r.charAt(a),!(c&&c!==rt)){if(t)return!0;A=e.now(),A.column+=o.length,A.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),A),p&&(o+=p),p="",g="",E="",h="",F="";for(var b=!0;a<u;){if(c=r.charAt(a),h+=g,F+=E,g="",E="",c!==rt){h+=c,E+=c,a++;continue}for(b?(o+=c,b=!1):(g+=c,E+=c),p="",a++;a<u&&(c=r.charAt(a),c===Xe);)p+=c,a++;if(g+=p,E+=p.slice(v),!(p.length>=zp)){for(p="";a<u&&(c=r.charAt(a),c===l);)p+=c,a++;if(g+=p,E+=p,!(p.length<s)){for(p="";a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)g+=c,E+=c,a++;if(!c||c===rt)break}}}for(o+=h+g,a=-1,u=f.length;++a<u;)if(c=f.charAt(a),c===Xe||c===Fr)D||(D=f.slice(0,a));else if(D){m=f.slice(a);break}return e(o)({type:"code",lang:D||f||null,meta:m||null,value:F})}}}}}});var Le=x((Je,Sa)=>{Je=Sa.exports=Vp;function Vp(e){return e.trim?e.trim():Je.right(Je.left(e))}Je.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Je.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var tt=x((Nv,La)=>{"use strict";La.exports=jp;function jp(e,r,t,n){for(var i=e.length,u=-1,a,o;++u<i;)if(a=e[u],o=a[1]||{},!(o.pedantic!==void 0&&o.pedantic!==t.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==t.options.commonmark)&&r[a[0]].apply(t,n))return!0;return!1}});var Ya=x((Pv,Ua)=>{"use strict";var $p=Le(),Hp=tt();Ua.exports=Kp;var rn=`
|
||||
`,Ra=" ",tn=" ",Ma=">";function Kp(e,r,t){for(var n=this,i=n.offset,u=n.blockTokenizers,a=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],m,p=0,h,F,g,E,v,A,b,d;p<l&&(h=r.charAt(p),!(h!==tn&&h!==Ra));)p++;if(r.charAt(p)===Ma){if(t)return!0;for(p=0;p<l;){for(g=r.indexOf(rn,p),A=p,b=!1,g===-1&&(g=l);p<l&&(h=r.charAt(p),!(h!==tn&&h!==Ra));)p++;if(r.charAt(p)===Ma?(p++,b=!0,r.charAt(p)===tn&&p++):p=A,E=r.slice(p,g),!b&&!$p(E)){p=A;break}if(!b&&(F=r.slice(p),Hp(a,u,n,[e,F,!0])))break;v=A===p?E:r.slice(A,g),D.push(p-A),c.push(v),f.push(E),p=g+1}for(p=-1,l=D.length,m=e(c.join(rn));++p<l;)i[s]=(i[s]||0)+D[p],s++;return d=n.enterBlock(),f=n.tokenizeBlock(f.join(rn),o),d(),m({type:"blockquote",children:f})}}});var Wa=x((Iv,za)=>{"use strict";za.exports=Jp;var Ga=`
|
||||
`,gr=" ",Er=" ",Cr="#",Xp=6;function Jp(e,r,t){for(var n=this,i=n.options.pedantic,u=r.length+1,a=-1,o=e.now(),s="",l="",c,f,D;++a<u;){if(c=r.charAt(a),c!==Er&&c!==gr){a--;break}s+=c}for(D=0;++a<=u;){if(c=r.charAt(a),c!==Cr){a--;break}s+=c,D++}if(!(D>Xp)&&!(!D||!i&&r.charAt(a+1)===Cr)){for(u=r.length+1,f="";++a<u;){if(c=r.charAt(a),c!==Er&&c!==gr){a--;break}f+=c}if(!(!i&&f.length===0&&c&&c!==Ga)){if(t)return!0;for(s+=f,f="",l="";++a<u&&(c=r.charAt(a),!(!c||c===Ga));){if(c!==Er&&c!==gr&&c!==Cr){l+=f+c,f="";continue}for(;c===Er||c===gr;)f+=c,c=r.charAt(++a);if(!i&&l&&!f&&c===Cr){l+=c;continue}for(;c===Cr;)f+=c,c=r.charAt(++a);for(;c===Er||c===gr;)f+=c,c=r.charAt(++a);a--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:D,children:n.tokenizeInline(l,o)})}}}});var $a=x((Sv,ja)=>{"use strict";ja.exports=ih;var Qp=" ",Zp=`
|
||||
`,Va=" ",eh="*",rh="-",th="_",nh=3;function ih(e,r,t){for(var n=-1,i=r.length+1,u="",a,o,s,l;++n<i&&(a=r.charAt(n),!(a!==Qp&&a!==Va));)u+=a;if(!(a!==eh&&a!==rh&&a!==th))for(o=a,u+=a,s=1,l="";++n<i;)if(a=r.charAt(n),a===o)s++,u+=l+o,l="";else if(a===Va)l+=a;else return s>=nh&&(!a||a===Zp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var nn=x((Lv,Ka)=>{"use strict";Ka.exports=sh;var Ha=" ",uh=" ",ah=1,oh=4;function sh(e){for(var r=0,t=0,n=e.charAt(r),i={},u,a=0;n===Ha||n===uh;){for(u=n===Ha?oh:ah,t+=u,u>1&&(t=Math.floor(t/u)*u);a<t;)i[++a]=r;n=e.charAt(++r)}return{indent:t,stops:i}}});var Qa=x((Rv,Ja)=>{"use strict";var ch=Le(),lh=et(),fh=nn();Ja.exports=hh;var Xa=`
|
||||
`,Dh=" ",ph="!";function hh(e,r){var t=e.split(Xa),n=t.length+1,i=1/0,u=[],a,o,s;for(t.unshift(lh(Dh,r)+ph);n--;)if(o=fh(t[n]),u[n]=o.stops,ch(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent<i&&(i=o.indent);else{i=1/0;break}if(i!==1/0)for(n=t.length;n--;){for(s=u[n],a=i;a&&!(a in s);)a--;t[n]=t[n].slice(s[a]+1)}return t.shift(),t.join(Xa)}});var io=x((Mv,no)=>{"use strict";var dh=Le(),mh=et(),Za=Se(),Fh=nn(),gh=Qa(),Eh=tt();no.exports=kh;var un="*",Ch="_",eo="+",an="-",ro=".",Ee=" ",oe=`
|
||||
`,nt=" ",to=")",vh="x",ke=4,Ah=/\n\n(?!\s*$)/,bh=/^\[([ X\tx])][ \t]/,xh=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,yh=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,wh=/^( {1,4}|\t)?/gm;function kh(e,r,t){for(var n=this,i=n.options.commonmark,u=n.options.pedantic,a=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C,k,T,B,_,S=!1,P,N,O,I;s<l&&(p=r.charAt(s),!(p!==nt&&p!==Ee));)s++;if(p=r.charAt(s),p===un||p===eo||p===an)h=p,m=!1;else{for(m=!0,D="";s<l&&(p=r.charAt(s),!!Za(p));)D+=p,s++;if(p=r.charAt(s),!D||!(p===ro||i&&p===to)||t&&D!=="1")return;c=parseInt(D,10),h=p}if(p=r.charAt(++s),!(p!==Ee&&p!==nt&&(u||p!==oe&&p!==""))){if(t)return!0;for(s=0,w=[],C=[],k=[];s<l;){for(F=r.indexOf(oe,s),g=s,E=!1,I=!1,F===-1&&(F=l),f=0;s<l;){if(p=r.charAt(s),p===nt)f+=ke-f%ke;else if(p===Ee)f++;else break;s++}if(T&&f>=T.indent&&(I=!0),p=r.charAt(s),v=null,!I){if(p===un||p===eo||p===an)v=p,s++,f++;else{for(D="";s<l&&(p=r.charAt(s),!!Za(p));)D+=p,s++;p=r.charAt(s),s++,D&&(p===ro||i&&p===to)&&(v=p,f+=D.length+1)}if(v)if(p=r.charAt(s),p===nt)f+=ke-f%ke,s++;else if(p===Ee){for(O=s+ke;s<O&&r.charAt(s)===Ee;)s++,f++;s===O&&r.charAt(s)===Ee&&(s-=ke-1,f-=ke-1)}else p!==oe&&p!==""&&(v=null)}if(v){if(!u&&h!==v)break;E=!0}else!i&&!I&&r.charAt(g)===Ee?I=!0:i&&T&&(I=f>=T.indent||f>ke),E=!1,s=g;if(b=r.slice(g,F),A=g===s?b:r.slice(s,F),(v===un||v===Ch||v===an)&&a.thematicBreak.call(n,e,b,!0))break;if(d=y,y=!E&&!dh(A).length,I&&T)T.value=T.value.concat(k,b),C=C.concat(k,b),k=[];else if(E)k.length!==0&&(S=!0,T.value.push(""),T.trail=k.concat()),T={value:[b],indent:f,trail:[]},w.push(T),C=C.concat(k,b),k=[];else if(y){if(d&&!i)break;k.push(b)}else{if(d||Eh(o,a,n,[e,b,!0]))break;T.value=T.value.concat(k,b),C=C.concat(k,b),k=[]}s=F+1}for(P=e(C.join(oe)).reset({type:"list",ordered:m,start:c,spread:S,children:[]}),B=n.enterList(),_=n.enterBlock(),s=-1,l=w.length;++s<l;)T=w[s].value.join(oe),N=e.now(),e(T)(Th(n,T,N),P),T=w[s].trail.join(oe),s!==l-1&&(T+=oe),e(T);return B(),_(),P}}function Th(e,r,t){var n=e.offset,i=e.options.pedantic?Bh:_h,u=null,a,o;return r=i.apply(null,arguments),e.options.gfm&&(a=r.match(bh),a&&(o=a[0].length,u=a[1].toLowerCase()===vh,n[t.line]+=o,r=r.slice(o))),{type:"listItem",spread:Ah.test(r),checked:u,children:e.tokenizeBlock(r,t)}}function Bh(e,r,t){var n=e.offset,i=t.line;return r=r.replace(yh,u),i=t.line,r.replace(wh,u);function u(a){return n[i]=(n[i]||0)+a.length,i++,""}}function _h(e,r,t){var n=e.offset,i=t.line,u,a,o,s,l,c,f;for(r=r.replace(xh,D),s=r.split(oe),l=gh(r,Fh(u).indent).split(oe),l[0]=o,n[i]=(n[i]||0)+a.length,i++,c=0,f=s.length;++c<f;)n[i]=(n[i]||0)+s[c].length-l[c].length,i++;return l.join(oe);function D(m,p,h,F,g){return a=p+h+F,o=g,Number(h)<10&&a.length%2===1&&(h=Ee+h),u=p+mh(Ee,h.length)+F,u+o}}});var so=x((Uv,oo)=>{"use strict";oo.exports=Sh;var on=`
|
||||
`,Oh=" ",uo=" ",ao="=",qh="-",Nh=3,Ph=1,Ih=2;function Sh(e,r,t){for(var n=this,i=e.now(),u=r.length,a=-1,o="",s,l,c,f,D;++a<u;){if(c=r.charAt(a),c!==uo||a>=Nh){a--;break}o+=c}for(s="",l="";++a<u;){if(c=r.charAt(a),c===on){a--;break}c===uo||c===Oh?l+=c:(s+=l+c,l="")}if(i.column+=o.length,i.offset+=o.length,o+=s+l,c=r.charAt(++a),f=r.charAt(++a),!(c!==on||f!==ao&&f!==qh)){for(o+=c,l=f,D=f===ao?Ph:Ih;++a<u;){if(c=r.charAt(a),c!==f){if(c!==on)return;a--;break}l+=c}return t?!0:e(o+l)({type:"heading",depth:D,children:n.tokenizeInline(s,i)})}}});var cn=x(sn=>{"use strict";var Lh="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rh="[^\"'=<>`\\u0000-\\u0020]+",Mh="'[^']*'",Uh='"[^"]*"',Yh="(?:"+Rh+"|"+Mh+"|"+Uh+")",Gh="(?:\\s+"+Lh+"(?:\\s*=\\s*"+Yh+")?)",co="<[A-Za-z][A-Za-z0-9\\-]*"+Gh+"*\\s*\\/?>",lo="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",zh="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Wh="<[?].*?[?]>",Vh="<![A-Za-z]+\\s+[^>]*>",jh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";sn.openCloseTag=new RegExp("^(?:"+co+"|"+lo+")");sn.tag=new RegExp("^(?:"+co+"|"+lo+"|"+zh+"|"+Wh+"|"+Vh+"|"+jh+")")});var ho=x((Gv,po)=>{"use strict";var $h=cn().openCloseTag;po.exports=sd;var Hh=" ",Kh=" ",fo=`
|
||||
`,Xh="<",Jh=/^<(script|pre|style)(?=(\s|>|$))/i,Qh=/<\/(script|pre|style)>/i,Zh=/^<!--/,ed=/-->/,rd=/^<\?/,td=/\?>/,nd=/^<![A-Za-z]/,id=/>/,ud=/^<!\[CDATA\[/,ad=/]]>/,Do=/^$/,od=new RegExp($h.source+"\\s*$");function sd(e,r,t){for(var n=this,i=n.options.blocks.join("|"),u=new RegExp("^</?("+i+")(?=(\\s|/?>|$))","i"),a=r.length,o=0,s,l,c,f,D,m,p,h=[[Jh,Qh,!0],[Zh,ed,!0],[rd,td,!0],[nd,id,!0],[ud,ad,!0],[u,Do,!0],[od,Do,!1]];o<a&&(f=r.charAt(o),!(f!==Hh&&f!==Kh));)o++;if(r.charAt(o)===Xh){for(s=r.indexOf(fo,o+1),s=s===-1?a:s,l=r.slice(o,s),c=-1,D=h.length;++c<D;)if(h[c][0].test(l)){m=h[c];break}if(m){if(t)return m[2];if(o=s,!m[1].test(l))for(;o<a;){if(s=r.indexOf(fo,o+1),s=s===-1?a:s,l=r.slice(o+1,s),m[1].test(l)){l&&(o=s);break}o=s}return p=r.slice(0,o),e(p)({type:"html",value:p})}}}});var se=x((zv,mo)=>{"use strict";mo.exports=fd;var cd=String.fromCharCode,ld=/\s/;function fd(e){return ld.test(typeof e=="number"?cd(e):e.charAt(0))}});var ln=x((Wv,Fo)=>{"use strict";var Dd=Br();Fo.exports=pd;function pd(e){return Dd(e).toLowerCase()}});var xo=x((Vv,bo)=>{"use strict";var hd=se(),dd=ln();bo.exports=Ed;var go='"',Eo="'",md="\\",Qe=`
|
||||
`,it=" ",ut=" ",Dn="[",vr="]",Fd="(",gd=")",Co=":",vo="<",Ao=">";function Ed(e,r,t){for(var n=this,i=n.options.commonmark,u=0,a=r.length,o="",s,l,c,f,D,m,p,h;u<a&&(f=r.charAt(u),!(f!==ut&&f!==it));)o+=f,u++;if(f=r.charAt(u),f===Dn){for(u++,o+=f,c="";u<a&&(f=r.charAt(u),f!==vr);)f===md&&(c+=f,u++,f=r.charAt(u)),c+=f,u++;if(!(!c||r.charAt(u)!==vr||r.charAt(u+1)!==Co)){for(m=c,o+=c+vr+Co,u=o.length,c="";u<a&&(f=r.charAt(u),!(f!==it&&f!==ut&&f!==Qe));)o+=f,u++;if(f=r.charAt(u),c="",s=o,f===vo){for(u++;u<a&&(f=r.charAt(u),!!fn(f));)c+=f,u++;if(f=r.charAt(u),f===fn.delimiter)o+=vo+c+f,u++;else{if(i)return;u-=c.length+1,c=""}}if(!c){for(;u<a&&(f=r.charAt(u),!!Cd(f));)c+=f,u++;o+=c}if(c){for(p=c,c="";u<a&&(f=r.charAt(u),!(f!==it&&f!==ut&&f!==Qe));)c+=f,u++;if(f=r.charAt(u),D=null,f===go?D=go:f===Eo?D=Eo:f===Fd&&(D=gd),!D)c="",u=o.length;else if(c){for(o+=c+f,u=o.length,c="";u<a&&(f=r.charAt(u),f!==D);){if(f===Qe){if(u++,f=r.charAt(u),f===Qe||f===D)return;c+=Qe}c+=f,u++}if(f=r.charAt(u),f!==D)return;l=o,o+=c+f,u++,h=c,c=""}else return;for(;u<a&&(f=r.charAt(u),!(f!==it&&f!==ut));)o+=f,u++;if(f=r.charAt(u),!f||f===Qe)return t?!0:(s=e(s).test().end,p=n.decode.raw(n.unescape(p),s,{nonTerminated:!1}),h&&(l=e(l).test().end,h=n.decode.raw(n.unescape(h),l)),e(o)({type:"definition",identifier:dd(m),label:m,title:h||null,url:p}))}}}}function fn(e){return e!==Ao&&e!==Dn&&e!==vr}fn.delimiter=Ao;function Cd(e){return e!==Dn&&e!==vr&&!hd(e)}});var ko=x((jv,wo)=>{"use strict";var vd=se();wo.exports=Od;var Ad=" ",at=`
|
||||
`,bd=" ",xd="-",yd=":",wd="\\",pn="|",kd=1,Td=2,yo="left",Bd="center",_d="right";function Od(e,r,t){var n=this,i,u,a,o,s,l,c,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C;if(n.options.gfm){for(i=0,v=0,l=r.length+1,c=[];i<l;){if(y=r.indexOf(at,i),w=r.indexOf(pn,i+1),y===-1&&(y=r.length),w===-1||w>y){if(v<Td)return;break}c.push(r.slice(i,y)),v++,i=y+1}for(o=c.join(at),u=c.splice(1,1)[0]||[],i=0,l=u.length,v--,a=!1,p=[];i<l;){if(D=u.charAt(i),D===pn){if(m=null,a===!1){if(C===!1)return}else p.push(a),a=!1;C=!1}else if(D===xd)m=!0,a=a||null;else if(D===yd)a===yo?a=Bd:m&&a===null?a=_d:a=yo;else if(!vd(D))return;i++}if(a!==!1&&p.push(a),!(p.length<kd)){if(t)return!0;for(E=-1,b=[],d=e(o).reset({type:"table",align:p,children:b});++E<v;){for(A=c[E],s={type:"tableRow",children:[]},E&&e(at),e(A).reset(s,d),l=A.length+1,i=0,f="",h="",F=!0;i<l;){if(D=A.charAt(i),D===Ad||D===bd){h?f+=D:e(D),i++;continue}D===""||D===pn?F?e(D):((h||D)&&!F&&(o=h,f.length>1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),g=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,g)},s)),e(f+D),f="",h=""):(f&&(h+=f,f=""),h+=D,D===wd&&i!==l-2&&(h+=A.charAt(i+1),i++)),F=!1,i++}E||e(at+u)}return d}}}});var _o=x(($v,Bo)=>{"use strict";var qd=Le(),Nd=Qt(),Pd=tt();Bo.exports=Ld;var Id=" ",Ar=`
|
||||
`,Sd=" ",To=4;function Ld(e,r,t){for(var n=this,i=n.options,u=i.commonmark,a=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Ar),l=r.length,c,f,D,m,p;s<l;){if(s===-1){s=l;break}if(r.charAt(s+1)===Ar)break;if(u){for(m=0,c=s+1;c<l;){if(D=r.charAt(c),D===Id){m=To;break}else if(D===Sd)m++;else break;c++}if(m>=To&&D!==Ar){s=r.indexOf(Ar,s+1);continue}}if(f=r.slice(s+1),Pd(o,a,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Ar,s+1),s!==-1&&qd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=Nd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var qo=x((Hv,Oo)=>{"use strict";Oo.exports=Rd;function Rd(e,r){return e.indexOf("\\",r)}});var So=x((Kv,Io)=>{"use strict";var Md=qo();Io.exports=Po;Po.locator=Md;var Ud=`
|
||||
`,No="\\";function Po(e,r,t){var n=this,i,u;if(r.charAt(0)===No&&(i=r.charAt(1),n.escape.indexOf(i)!==-1))return t?!0:(i===Ud?u={type:"break"}:u={type:"text",value:i},e(No+i)(u))}});var hn=x((Xv,Lo)=>{"use strict";Lo.exports=Yd;function Yd(e,r){return e.indexOf("<",r)}});var Go=x((Jv,Yo)=>{"use strict";var Ro=se(),Gd=mr(),zd=hn();Yo.exports=gn;gn.locator=zd;gn.notInLink=!0;var Mo="<",dn=">",Uo="@",mn="/",Fn="mailto:",ot=Fn.length;function gn(e,r,t){var n=this,i="",u=r.length,a=0,o="",s=!1,l="",c,f,D,m,p;if(r.charAt(0)===Mo){for(a++,i=Mo;a<u&&(c=r.charAt(a),!(Ro(c)||c===dn||c===Uo||c===":"&&r.charAt(a+1)===mn));)o+=c,a++;if(o){if(l+=o,o="",c=r.charAt(a),l+=c,a++,c===Uo)s=!0;else{if(c!==":"||r.charAt(a+1)!==mn)return;l+=mn,a++}for(;a<u&&(c=r.charAt(a),!(Ro(c)||c===dn));)o+=c,a++;if(c=r.charAt(a),!(!o||c!==dn))return t?!0:(l+=o,D=l,i+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,ot).toLowerCase()===Fn?(D=D.slice(ot),f.column+=ot,f.offset+=ot):l=Fn+l),m=n.inlineTokenizers,n.inlineTokenizers={text:m.text},p=n.enterLink(),D=n.tokenizeInline(D,f),n.inlineTokenizers=m,p(),e(i)({type:"link",title:null,url:Gd(l,{nonTerminated:!1}),children:D}))}}}});var Wo=x((Qv,zo)=>{"use strict";zo.exports=Wd;function Wd(e,r){var t=String(e),n=0,i;if(typeof r!="string")throw new Error("Expected character");for(i=t.indexOf(r);i!==-1;)n++,i=t.indexOf(r,i+r.length);return n}});var $o=x((Zv,jo)=>{"use strict";jo.exports=Vd;var Vo=["www.","http://","https://"];function Vd(e,r){var t=-1,n,i,u;if(!this.options.gfm)return t;for(i=Vo.length,n=-1;++n<i;)u=e.indexOf(Vo[n],r),u!==-1&&(t===-1||u<t)&&(t=u);return t}});var Qo=x((e2,Jo)=>{"use strict";var Ho=Wo(),jd=mr(),$d=Se(),En=$e(),Hd=se(),Kd=$o();Jo.exports=vn;vn.locator=Kd;vn.notInLink=!0;var Xd=33,Jd=38,Qd=41,Zd=42,e0=44,r0=45,Cn=46,t0=58,n0=59,i0=63,u0=60,Ko=95,a0=126,o0="(",Xo=")";function vn(e,r,t){var n=this,i=n.options.gfm,u=n.inlineTokenizers,a=r.length,o=-1,s=!1,l,c,f,D,m,p,h,F,g,E,v,A,b,d;if(i){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];D<a;){if(h=r.charCodeAt(D),h===Cn){if(o===D-1)break;l.push(D),o=D,D++;continue}if($d(h)||En(h)||h===r0||h===Ko){D++;continue}break}if(h===Cn&&(l.pop(),D--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,r.slice(c,D).indexOf("_")===-1)){if(t)return!0;for(F=D,m=D;D<a&&(h=r.charCodeAt(D),!(Hd(h)||h===u0));)D++,h===Xd||h===Zd||h===e0||h===Cn||h===t0||h===i0||h===Ko||h===a0||(F=D);if(D=F,r.charCodeAt(D-1)===Qd)for(p=r.slice(m,D),g=Ho(p,o0),E=Ho(p,Xo);E>g;)D=m+p.lastIndexOf(Xo),p=r.slice(m,D),E--;if(r.charCodeAt(D-1)===n0&&(D--,En(r.charCodeAt(D-1)))){for(F=D-2;En(r.charCodeAt(F));)F--;r.charCodeAt(F)===Jd&&(D=F)}return v=r.slice(0,D),b=jd(v,{nonTerminated:!1}),s&&(b="http://"+b),d=n.enterLink(),n.inlineTokenizers={text:u.text},A=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,d(),e(v)({type:"link",title:null,url:b,children:A})}}}});var ts=x((r2,rs)=>{"use strict";var s0=Se(),c0=$e(),l0=43,f0=45,D0=46,p0=95;rs.exports=es;function es(e,r){var t=this,n,i;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(i=n,i===r||!Zo(e.charCodeAt(i-1)))return es.call(t,e,n+1);for(;i>r&&Zo(e.charCodeAt(i-1));)i--;return i}function Zo(e){return s0(e)||c0(e)||e===l0||e===f0||e===D0||e===p0}});var as=x((t2,us)=>{"use strict";var h0=mr(),ns=Se(),is=$e(),d0=ts();us.exports=xn;xn.locator=d0;xn.notInLink=!0;var m0=43,An=45,st=46,F0=64,bn=95;function xn(e,r,t){var n=this,i=n.options.gfm,u=n.inlineTokenizers,a=0,o=r.length,s=-1,l,c,f,D;if(i){for(l=r.charCodeAt(a);ns(l)||is(l)||l===m0||l===An||l===st||l===bn;)l=r.charCodeAt(++a);if(a!==0&&l===F0){for(a++;a<o;){if(l=r.charCodeAt(a),ns(l)||is(l)||l===An||l===st||l===bn){a++,s===-1&&l===st&&(s=a);continue}break}if(!(s===-1||s===a||l===An||l===bn))return l===st&&a--,c=r.slice(0,a),t?!0:(D=n.enterLink(),n.inlineTokenizers={text:u.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=u,D(),e(c)({type:"link",title:null,url:"mailto:"+h0(c,{nonTerminated:!1}),children:f}))}}}});var cs=x((n2,ss)=>{"use strict";var g0=$e(),E0=hn(),C0=cn().tag;ss.exports=os;os.locator=E0;var v0="<",A0="?",b0="!",x0="/",y0=/^<a /i,w0=/^<\/a>/i;function os(e,r,t){var n=this,i=r.length,u,a;if(!(r.charAt(0)!==v0||i<3)&&(u=r.charAt(1),!(!g0(u)&&u!==A0&&u!==b0&&u!==x0)&&(a=r.match(C0),!!a)))return t?!0:(a=a[0],!n.inLink&&y0.test(a)?n.inLink=!0:n.inLink&&w0.test(a)&&(n.inLink=!1),e(a)({type:"html",value:a}))}});var yn=x((i2,ls)=>{"use strict";ls.exports=k0;function k0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t<n?t:n}});var Fs=x((u2,ms)=>{"use strict";var br=se(),T0=yn();ms.exports=ds;ds.locator=T0;var B0=`
|
||||
`,_0="!",fs='"',Ds="'",Ze="(",xr=")",wn="<",kn=">",ps="[",yr="\\",O0="]",hs="`";function ds(e,r,t){var n=this,i="",u=0,a=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C,k,T;if(a===_0&&(g=!0,i=a,a=r.charAt(++u)),a===ps&&!(!g&&n.inLink)){for(i+=a,y="",u++,A=r.length,C=e.now(),d=0,C.column+=u,C.offset+=u;u<A;){if(a=r.charAt(u),h=a,a===hs){for(f=1;r.charAt(u+1)===hs;)h+=a,u++,f++;D?f>=D&&(D=0):D=f}else if(a===yr)u++,h+=r.charAt(u);else if((!D||l)&&a===ps)d++;else if((!D||l)&&a===O0)if(d)d--;else{if(r.charAt(u+1)!==Ze)return;h+=Ze,c=!0,u++;break}y+=h,h="",u++}if(c){for(E=y,i+=y+h,u++;u<A&&(a=r.charAt(u),!!br(a));)i+=a,u++;if(a=r.charAt(u),y="",m=i,a===wn){for(u++,m+=wn;u<A&&(a=r.charAt(u),a!==kn);){if(s&&a===B0)return;y+=a,u++}if(r.charAt(u)!==kn)return;i+=wn+y+kn,w=y,u++}else{for(a=null,h="";u<A&&(a=r.charAt(u),!(h&&(a===fs||a===Ds||s&&a===Ze)));){if(br(a)){if(!o)break;h+=a}else{if(a===Ze)d++;else if(a===xr){if(d===0)break;d--}y+=h,h="",a===yr&&(y+=yr,a=r.charAt(++u)),y+=a}u++}i+=y,w=y,u=i.length}for(y="";u<A&&(a=r.charAt(u),!!br(a));)y+=a,u++;if(a=r.charAt(u),i+=y,y&&(a===fs||a===Ds||s&&a===Ze))if(u++,i+=a,y="",v=a===Ze?xr:a,p=i,s){for(;u<A&&(a=r.charAt(u),a!==v);)a===yr&&(y+=yr,a=r.charAt(++u)),u++,y+=a;if(a=r.charAt(u),a!==v)return;for(b=y,i+=y+a,u++;u<A&&(a=r.charAt(u),!!br(a));)i+=a,u++}else for(h="";u<A;){if(a=r.charAt(u),a===v)F&&(y+=v+h,h=""),F=!0;else if(!F)y+=a;else if(a===xr){i+=y+v+h,b=y;break}else br(a)?h+=a:(y+=v+h+a,h="",F=!1);u++}if(r.charAt(u)===xr)return t?!0:(i+=xr,w=n.decode.raw(n.unescape(w),e(m).test().end,{nonTerminated:!1}),b&&(p=e(p).test().end,b=n.decode.raw(n.unescape(b),p)),T={type:g?"image":"link",title:b||null,url:w},g?T.alt=n.decode.raw(n.unescape(E),C)||null:(k=n.enterLink(),T.children=n.tokenizeInline(E,C),k()),e(i)(T))}}}});var Cs=x((a2,Es)=>{"use strict";var q0=se(),N0=yn(),P0=ln();Es.exports=gs;gs.locator=N0;var Tn="link",I0="image",S0="shortcut",L0="collapsed",Bn="full",R0="!",ct="[",lt="\\",ft="]";function gs(e,r,t){var n=this,i=n.options.commonmark,u=r.charAt(0),a=0,o=r.length,s="",l="",c=Tn,f=S0,D,m,p,h,F,g,E,v;if(u===R0&&(c=I0,l=u,u=r.charAt(++a)),u===ct){for(a++,l+=u,g="",v=0;a<o;){if(u=r.charAt(a),u===ct)E=!0,v++;else if(u===ft){if(!v)break;v--}u===lt&&(g+=lt,u=r.charAt(++a)),g+=u,a++}if(s=g,D=g,u=r.charAt(a),u===ft){if(a++,s+=u,g="",!i)for(;a<o&&(u=r.charAt(a),!!q0(u));)g+=u,a++;if(u=r.charAt(a),u===ct){for(m="",g+=u,a++;a<o&&(u=r.charAt(a),!(u===ct||u===ft));)u===lt&&(m+=lt,u=r.charAt(++a)),m+=u,a++;u=r.charAt(a),u===ft?(f=m?Bn:L0,g+=m+u,a++):m="",s+=g,g=""}else{if(!D)return;m=D}if(!(f!==Bn&&E))return s=l+s,c===Tn&&n.inLink?null:t?!0:(p=e.now(),p.column+=l.length,p.offset+=l.length,m=f===Bn?m:D,h={type:c+"Reference",identifier:P0(m),label:m,referenceType:f},c===Tn?(F=n.enterLink(),h.children=n.tokenizeInline(D,p),F()):h.alt=n.decode.raw(n.unescape(D),p)||null,e(s)(h))}}}});var As=x((o2,vs)=>{"use strict";vs.exports=M0;function M0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n<t?n:t}});var ws=x((s2,ys)=>{"use strict";var U0=Le(),bs=se(),Y0=As();ys.exports=xs;xs.locator=Y0;var G0="\\",z0="*",W0="_";function xs(e,r,t){var n=this,i=0,u=r.charAt(i),a,o,s,l,c,f,D;if(!(u!==z0&&u!==W0||r.charAt(++i)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,i++,l="",u="",!(o&&bs(r.charAt(i)))))for(;i<f;){if(D=u,u=r.charAt(i),u===s&&r.charAt(i+1)===s&&(!o||!bs(D))&&(u=r.charAt(i+2),u!==s))return U0(l)?t?!0:(a=e.now(),a.column+=2,a.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,a)})):void 0;!o&&u===G0&&(l+=u,u=r.charAt(++i)),l+=u,i++}}});var Ts=x((c2,ks)=>{"use strict";ks.exports=$0;var V0=String.fromCharCode,j0=/\w/;function $0(e){return j0.test(typeof e=="number"?V0(e):e.charAt(0))}});var _s=x((l2,Bs)=>{"use strict";Bs.exports=H0;function H0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n<t?n:t}});var Is=x((f2,Ps)=>{"use strict";var K0=Le(),X0=Ts(),Os=se(),J0=_s();Ps.exports=Ns;Ns.locator=J0;var Q0="*",qs="_",Z0="\\";function Ns(e,r,t){var n=this,i=0,u=r.charAt(i),a,o,s,l,c,f,D;if(!(u!==Q0&&u!==qs)&&(o=n.options.pedantic,c=u,s=u,f=r.length,i++,l="",u="",!(o&&Os(r.charAt(i)))))for(;i<f;){if(D=u,u=r.charAt(i),u===s&&(!o||!Os(D))){if(u=r.charAt(++i),u!==s){if(!K0(l)||D===s)return;if(!o&&s===qs&&X0(u)){l+=s;continue}return t?!0:(a=e.now(),a.column++,a.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,a)}))}l+=s}!o&&u===Z0&&(l+=u,u=r.charAt(++i)),l+=u,i++}}});var Ls=x((D2,Ss)=>{"use strict";Ss.exports=em;function em(e,r){return e.indexOf("~~",r)}});var Gs=x((p2,Ys)=>{"use strict";var Rs=se(),rm=Ls();Ys.exports=Us;Us.locator=rm;var Dt="~",Ms="~~";function Us(e,r,t){var n=this,i="",u="",a="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==Dt||r.charAt(1)!==Dt||Rs(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(i=r.charAt(s),i===Dt&&u===Dt&&(!a||!Rs(a)))return t?!0:e(Ms+o+Ms)({type:"delete",children:n.tokenizeInline(o,c)});o+=u,aLine truncated
|
||||
`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Qs=x((F2,Js)=>{"use strict";var um=Ks();Js.exports=Xs;Xs.locator=um;var am=" ",om=`
|
||||
`,sm=2;function Xs(e,r,t){for(var n=r.length,i=-1,u="",a;++i<n;){if(a=r.charAt(i),a===om)return i<sm?void 0:t?!0:(u+=a,e(u)({type:"break"}));if(a!==am)return;u+=a}}});var ec=x((g2,Zs)=>{"use strict";Zs.exports=cm;function cm(e,r,t){var n=this,i,u,a,o,s,l,c,f,D,m;if(t)return!0;for(i=n.inlineMethods,o=i.length,u=n.inlineTokenizers,a=-1,D=r.length;++a<o;)f=i[a],!(f==="text"||!u[f])&&(c=u[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,r,1),l!==-1&&l<D&&(D=l));s=r.slice(0,D),m=e.now(),n.decode(s,m,p);function p(h,F,g){e(g||h)({type:"text",value:h})}}});var ic=x((E2,nc)=>{"use strict";var lm=Ie(),pt=Cu(),fm=Au(),Dm=xu(),pm=Qu(),Nn=ra();nc.exports=rc;function rc(e,r){this.file=r,this.offset={},this.options=lm(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=fm(r).toOffset,this.unescape=Dm(this,"escape"),this.decode=pm(this)}var Y=rc.prototype;Y.setOptions=ca();Y.parse=ya();Y.options=Kt();Y.exitStart=pt("atStart",!0);Y.enterList=pt("inList",!1);Y.enterLink=pt("inLink",!1);Y.enterBlock=pt("inBlock",!1);Y.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];Y.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];Y.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];Y.blockTokenizers={blankLine:ka(),indentedCode:qa(),fencedCode:Ia(),blockquote:Ya(),atxHeading:Wa(),thematicBreak:$a(),list:io(),setextHeading:so(),html:ho(),definition:xo(),table:ko(),paragraph:_o()};Y.inlineTokenizers={escape:So(),autoLink:Go(),url:Qo(),email:as(),html:cs(),link:Fs(),reference:Cs(),strong:ws(),emphasis:Is(),deletion:Gs(),code:$s(),break:Qs(),text:ec()};Y.blockMethods=tc(Y.blockTokenizers);Y.inlineMethods=tc(Y.inlineTokenizers);Y.tokenizeBlock=Nn("block");Y.tokenizeInline=Nn("inline");Y.tokenizeFactory=Nn;function tc(e){var r=[],t;for(t in e)r.push(t);return r}});var sc=x((C2,oc)=>{"use strict";var hm=gu(),dm=Ie(),uc=ic();oc.exports=ac;ac.Parser=uc;function ac(e){var r=this.data("settings"),t=hm(uc);t.prototype.options=dm(t.prototype.options,r,e),this.Parser=t}});var lc=x((v2,cc)=>{"use strict";cc.exports=mm;function mm(e){if(e)throw e}});var Pn=x((A2,fc)=>{fc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var Cc=x((b2,Ec)=>{"use strict";var ht=Object.prototype.hasOwnProperty,gc=Object.prototype.toString,Dc=Object.defineProperty,pc=Object.getOwnPropertyDescriptor,hc=function(r){return typeof Array.isArray=="function"?Array.isArray(r):gc.call(r)==="[object Array]"},dc=function(r){if(!r||gc.call(r)!=="[object Object]")return!1;var t=ht.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&ht.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var i;for(i in r);return typeof i>"u"||ht.call(r,i)},mc=function(r,t){Dc&&t.name==="__proto__"?Dc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},Fc=function(r,t){if(t==="__proto__")if(ht.call(r,t)){if(pc)return pc(r,t).value}else return;return r[t]};Ec.exports=function e(){var r,t,n,i,u,a,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(r=arguments[s],r!=null)for(t in r)n=Fc(o,t),i=Fc(r,t),o!==i&&(c&&i&&(dc(i)||(u=hc(i)))?(u?(u=!1,a=n&&hc(n)?n:[]):a=n&&dc(n)?n:{},mc(o,{name:t,newValue:e(c,a,i)})):typeof i<"u"&&mc(o,{name:t,newValue:i}));return o}});var Ac=x((x2,vc)=>{"use strict";vc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var xc=x((y2,bc)=>{"use strict";var Fm=[].slice;bc.exports=gm;function gm(e,r){var t;return n;function n(){var a=Fm.call(arguments,0),o=e.length>a.length,s;o&&a.push(i);try{s=e.apply(null,a)}catch(l){if(o&&t)throw l;return i(l)}o||(s&&typeof s.then=="function"?s.then(u,i):s instanceof Error?i(s):u(s))}function i(){t||(t=!0,r.apply(null,arguments))}function u(a){i(null,a)}}});var Bc=x((w2,Tc)=>{"use strict";var wc=xc();Tc.exports=kc;kc.wrap=wc;var yc=[].slice;function kc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var i=-1,u=yc.call(arguments,0,-1),a=arguments[arguments.length-1];if(typeof a!="function")throw new Error("Expected function as last argument, not "+a);o.apply(null,[null].concat(u));function o(s){var l=e[++i],c=yc.call(arguments,0),f=c.slice(1),D=u.length,m=-1;if(s){a(s);return}for(;++m<D;)(f[m]===null||f[m]===void 0)&&(f[m]=u[m]);u=f,l?wc(l,o).apply(null,u):a.apply(null,[null].concat(u))}}funct
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(W(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=ql([..._r].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var gt=class extends Error{name="InvalidDocError";constructor(r){super(Nl(r)),this.doc=r}},Be=gt;var Hn={};function Pl(e,r,t,n){let i=[e];for(;i.length>0;){let u=i.pop();if(u===Hn){t(i.pop());continue}t&&i.push(u,Hn);let a=W(u);if(!a)throw new Be(u);if(r?.(u)!==!1)switch(a){case j:case J:{let o=a===j?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)i.push(o[l]);break}case Q:i.push(u.flatContents,u.breakContents);break;case X:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)i.push(u.expandedStates[s]);else i.push(u.contents);break;case re:case ee:case pe:case me:case he:i.push(u.contents);break;case V:case be:case De:case de:case $:case te:break;default:throw new Be(u)}}}var Kn=Pl;function Il(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let a=i(u);return t.set(u,a),a}function i(u){switch(W(u)){case j:return r(u.map(n));case J:return r({...u,parts:u.parts.map(n)});case Q:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case X:{let{expandedStates:a,contents:o}=u;return a?(a=a.map(n),o=a[0]):o=n(o),r({...u,contents:o,expandedStates:a})}case re:case ee:case pe:case me:case he:return r({...u,contents:n(u.contents)});case V:case be:case De:case de:case $:case te:return r(u);default:throw new Be(u)}}}function Xn(e){if(e.length>0){let r=U(0,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Jn(e){let r=new Set,t=[];function n(u){if(u.type===te&&Xn(t),u.type===X){if(t.push(u),r.has(u))return!1;r.add(u)}}function i(u){u.type===X&&t.pop().break&&Xn(t)}Kn(e,n,i,!0)}function xe(e,r=nr){return Il(e,t=>typeof t=="string"?Or(r,t.split(`
|
||||
`)):t)}var ne=tr,qr=tr,Qn=tr,Zn=tr;function ir(e){return ne(e),{type:ee,contents:e}}function Fe(e,r){return Zn(e),ne(r),{type:re,contents:r,n:e}}function ur(e){return Fe({type:"root"},e)}var Ue={type:te};function Ye(e){return Qn(e),{type:J,parts:e}}function Ge(e,r={}){return ne(e),qr(r.expandedStates,!0),{type:X,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function ei(e,r="",t={}){return ne(e),r!==""&&ne(r),{type:Q,breakContents:e,flatContents:r,groupId:t.groupId}}function Or(e,r){ne(e),qr(r);let t=[];for(let n=0;n<r.length;n++)n!==0&&t.push(e),t.push(r[n]);return t}var Nr={type:$},Pr={type:$,soft:!0},ar={type:$,hard:!0},M=[ar,Ue],Sl={type:$,hard:!0,literal:!0},nr=[Sl,Ue];var Ll="cr",Rl="crlf";var Ml="\r",Ul=`\r
|
||||
`,Yl=`
|
||||
`,Gl=Yl;function ri(e){return e===Ll?Ml:e===Rl?Ul:Gl}var ti=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?R(0,A,`
|
||||
`,i):A;b&&(o+=b,a.length>0&&(u+=or(b)));break}case j:for(let b=A.length-1;b>=0;b--)a.push({indent:E,mode:v,doc:A[b]});break;case be:if(c.length>=2)throw new Error("There are too many 'cursor' in doc.");c.push(m+o.length);break;case ee:a.push({indent:ai(E,r),mode:v,doc:A.contents});break;case re:a.push({indent:ui(E,A.n,r),mode:v,doc:A.contents});break;case De:g();break;case X:switch(v){case ue:if(!s){a.push({indent:E,mode:A.break?H:ue,doc:A.contents});break}case H:{s=!1;let b={indent:E,mode:ue,doc:A.contents},d=n-u,y=l.length>0;if(!A.break&&Ir(b,a,d,y,t))a.push(b);else if(A.expandedStates){let w=U(0,A.expandedStates,-1);if(A.break){a.push({indent:E,mode:H,doc:w});break}else for(let C=1;C<A.expandedStates.length+1;C++)if(C>=A.expandedStates.length){a.push({indent:E,mode:H,doc:w});break}else{let k=A.expandedStates[C],T={indent:E,mode:ue,doc:k};if(Ir(T,a,d,y,t)){a.push(T);break}}}else a.push({indent:E,mode:H,doc:A.contents});break}}A.id&&(t[A.id]=U(0,a,-1).mode);break;case J:{let b=n-u,d=A[bt]??0,{parts:y}=A,w=y.length-d;if(w===0)break;let C=y[d+0],k=y[d+1],T={indent:E,mode:ue,doc:C},B={indent:E,mode:H,doc:C},_=Ir(T,[],b,l.length>0,t,!0);if(w===1){_?a.push(T):a.push(B);break}let S={indent:E,mode:ue,doc:k},P={indent:E,mode:H,doc:k};if(w===2){_?a.push(S,T):a.push(P,B);break}let N=y[d+2],O={indent:E,mode:v,doc:{...A,[bt]:d+2}},le=Ir({indent:E,mode:ue,doc:[C,k,N]},[],b,l.length>0,t,!0);a.push(O),le?a.push(S,T):_?a.push(P,T):a.push(P,B);break}case Q:case pe:{let b=A.groupId?t[A.groupId]:v;if(b===H){let d=A.type===Q?A.breakContents:A.negate?A.contents:ir(A.contents);d&&a.push({indent:E,mode:v,doc:d})}if(b===ue){let d=A.type===Q?A.flatContents:A.negate?ir(A.contents):A.contents;d&&a.push({indent:E,mode:v,doc:d})}break}case he:l.push({indent:E,mode:v,doc:A.contents});break;case de:l.length>0&&a.push({indent:E,mode:v,doc:ar});break;case $:switch(v){case ue:if(A.hard)s=!0;else{A.soft||(o+=" ",u+=1);break}case H:if(l.length>0){a.push({indent:E,mode:v,doc:A},...l.reverse()),l.length=0;break}A.literal?(o+=i,u=0,E.root&&(E.root.value&&(o+=E.root.value),u=E.root.length)):(g(),o+=i+E.value,u=E.length);break}break;case me:a.push({indent:E,mode:v,doc:A.contents});break;case te:break;default:throw new Be(A)}a.length===0&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=f.join("")+o,h=[...D,...c];if(h.length!==2)return{formatted:p};let F=h[0];return{formatted:p,cursorNodeStart:F,cursorNodeText:p.slice(F,U(0,h,-1))};function g(){let{text:E,count:v}=At(o);E&&(f.push(E),m+=E.length),o="",u-=v,c.length>0&&(D.push(...c.map(A=>Math.min(A,m))),c.length=0)}}function Kl(e,r){let t=e.matchAll(new RegExp(`(?:${fe(r)})+`,"gu"));return t.reduce||(t=[...t]),t.reduce((n,[i])=>Math.max(n,i.length),0)/r.length}var Sr=Kl;function Xl(e,r){let t=e.match(new RegExp(`(${fe(r)})+`,"gu"));if(t===null)return 1;let n=new Map,i=0;for(let u of t){let a=u.length/r.length;n.set(a,!0),a>i&&(i=a)}for(let u=1;u<i;u++)if(!n.get(u))return u;return i+1}var si=Xl;var ci=Object.freeze({character:"'",codePoint:39}),li=Object.freeze({character:'"',codePoint:34}),Jl=Object.freeze({preferred:ci,alternate:li}),Ql=Object.freeze({preferred:li,alternate:ci});function Zl(e,r){let{preferred:t,alternate:n}=r===!0||r==="'"?Jl:Ql,{length:i}=e,u=0,a=0;for(let o=0;o<i;o++){let s=e.charCodeAt(o);s===t.codePoint?u++:s===n.codePoint&&a++}return(u>a?n:t).character}var fi=Zl;var xt=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},Di=xt;var xi=Re(Br(),1);var ef=Array.prototype.toReversed??function(){return[...this].reverse()},rf=Me("toReversed",function(){if(Array.isArray(this))return ef}),pi=rf;function tf(){let e=globalThis,r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}var nf=tf();function hi(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function uf(e){return e=hi(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function af(e){e=hi(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function yt(e){return nf?af(e):uf(e)}var di=e=>String(e).split(/[/\\]/u).pop(),mi=e=>String(e).startsWith("file:");function Fi(e,r){if(!r)return;let t=di(r).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===t))??e.find(({extensions:n})=>n?.some(i=>t.endsWith(i)))}function of(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t?.includes(r))??e.find(({extensions:t})=>t?.includes(`.${r}`))}var sf=void 0;function gi(e,r){if(r){if(mi(r))try{r=yt(r)}catch{return}if(typeof r=="string")return e.find(({isSupported:t})=>t?.({filepath:r}))}}function cf(e,r){let t=pi(0,e.plugins).flatMap(i=>i.languages??[]);return(
Line truncated
|
||||
`,sr);if(t===-1)return;let n=e.slice(sr,t).trim(),i=e.indexOf(`
|
||||
${r}`,t),u=n;if(u||(u=r==="+++"?"toml":"yaml"),i===-1&&r==="---"&&u==="yaml"&&(i=e.indexOf(`
|
||||
...`,t)),i===-1)return;let a=i+1+sr,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let s=e.slice(0,a),l;return{language:u,explicitLanguage:n||null,value:e.slice(t+1,i),startDelimiter:r,endDelimiter:s.slice(-sr),raw:s,start:{line:1,column:0,index:0},end:{index:s.length,get line(){return l??(l=s.split(`
|
||||
`)),l.length},get column(){return l??(l=s.split(`
|
||||
`)),U(0,l,-1).length}},[Lr]:!0}}function Df(e){let r=ff(e);return r?{frontMatter:r,get content(){let{raw:t}=r;return R(0,t,/[^\n]/gu," ")+e.slice(t.length)}}:{content:e}}var _e=Df;var Ei="format";var Ci=/<!--\s*@(?:noformat|noprettier)\s*-->|\{\s*\/\*\s*@(?:noformat|noprettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:noformat|noprettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/mu,vi=/<!--\s*@(?:format|prettier)\s*-->|\{\s*\/\*\s*@(?:format|prettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:format|prettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/mu;var Rr=e=>_e(e).content.trimStart().match(vi)?.index===0,Ai=e=>_e(e).content.trimStart().match(Ci)?.index===0,bi=e=>{let{frontMatter:r}=_e(e),t=`<!-- @${Ei} -->`;return r?`${r.raw}
|
||||
|
||||
${t}
|
||||
|
||||
${e.slice(r.end.index)}`:`${t}
|
||||
|
||||
${e}`};var pf=new Set(["position","raw"]);function yi(e,r,t){if((e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=R(0,e.value,`
|
||||
`," ")),e.type==="wikiLink"&&(r.value=R(0,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,xi.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=R(0,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=R(0,e.title,/\\(?=["')])/gu,"")),t?.type==="root"&&t.children.length>0&&(t.children[0]===e||kt(t.children[0])&&t.children[1]===e)&&e.type==="html"&&Rr(e.value))return null}yi.ignoredProperties=pf;var wi=yi;var ki=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{16ff2}-\u{16ff6}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b81d}\u{2b820}-\u{2cead}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{33479}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Oe=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;var qe=e=>e.position.start.offset,Ne=e=>e.position.end.offset;var Tt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Mr=new Set([...Tt,"tableCell","paragraph","heading"]),We="non-cjk",ae="cj-letter",Pe="k-letter",cr="cjk-punctuation",hf=/\p{Script_Extensions=Hangul}/u;function Ur(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[i,u]of t.entries()){if(i%2===1){r.push({type:"whitespace",value:/\n/u.test(u)?`
|
||||
`:" "});continue}if((i===0||i===t.length-1)&&u==="")continue;let a=u.split(new RegExp(`(${ki.source})`,"u"));for(let[o,s]of a.entries())if(!((o===0||o===a.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:We,isCJ:!1,hasLeadingPunctuation:Oe.test(s[0]),hasTrailingPunctuation:Oe.test(U(0,s,-1))});continue}if(Oe.test(s)){n({type:"word",value:s,kind:cr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(hf.test(s)){n({type:"word",value:s,kind:Pe,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ae,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(i){let u=U(0,r,-1);u?.type==="word"&&!a(We,cr)&&![u.value,i.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(i);function a(o,s){return u.kind===o&&i.kind===s||u.kind===s&&i.kind===o}}}function ze(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:i}=t.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/u).groups;return{number:Number(n),leadingSpaces:i}}function Ti(e,r){return!e.ordered||e.children.length<2||ze(e.children[1],r).number!==1?!1:ze(e.children[0],r).number!==0?!0:e.children.length>2&&ze(e.children[2],r).number===1}function Yr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(`
|
||||
`)&&r.endsWith(`
|
||||
`)?t.slice(0,-1):t}function ye(e,r){return(function t(n,i,u){let a={...r(n,i,u)};return a.children&&(a.children=a.children.map((o,s)=>t(o,s,[a,...u]))),a})(e,null,[])}function Gr(e){if(e?.type!=="link"||e.children.length!==1)return!1;let[r]=e.children;return qe(e)===qe(r)&&Ne(e)===Ne(r)}function lr(e){let r;if(e.type==="html")r=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function zr(e,r){return t(e,r,n=>n.ordered===e.ordered);function t(n,i,u){let a=-1;for(let o of i.children)if(o.type===n.type&&u(o)?a++:a=-1,o===n)return a}}function df(e,r){let{node:t}=e;switch(t.type){case"code":{let{lang:n}=t;if(!n)return;let i;return n==="angular-ts"?i=wt(r,{language:"typescript"}):n==="angular-html"?i="angular":i=wt(r,{language:n}),i?async u=>{let a={parser:i};n==="ts"||n==="typescript"?a.filepath="dummy.ts":n==="tsx"&&(a.filepath="dummy.tsx");let o=await u(Yr(t,r.originalText),a),s=r.__inJsTemplate?"~":"`",l=s.repeat(Math.max(3,Sr(t.value,s)+1));return ur([l,t.lang,t.meta?" "+t.meta:"",M,xe(o),M,l])}:void 0}case"import":case"export":return n=>n(t.value,{__onHtmlBindingRoot:i=>mf(i,t.type),parser:"babel"});case"jsx":return n=>n(`<$>${t.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}function mf(e,r){let{program:{body:t}}=e;if(!t.every(n=>n.type==="ImportDeclaration"||n.type==="ExportDefaultDeclaration"||n.type==="ExportNamedDeclaration"))throw new Error(`Unexpected '${r}' in MDX.`)}var Bi=df;var fr=null;function Dr(e){if(fr!==null&&typeof fr.property){let r=fr;return fr=Dr.prototype=null,r}return fr=Dr.prototype=e??Object.create(null),new Dr}var Ff=10;for(let e=0;e<=Ff;e++)Dr();function Bt(e){return Dr(e)}function gf(e,r="type"){Bt(e);function t(n){let i=n[r],u=e[i];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return u}return t}var _i=gf;var q=[["children"],[]],Oi={root:q[0],paragraph:q[0],sentence:q[0],word:q[1],whitespace:q[1],emphasis:q[0],strong:q[0],delete:q[0],inlineCode:q[1],wikiLink:q[1],link:q[0],image:q[1],blockquote:q[0],heading:q[0],code:q[1],html:q[1],list:q[0],thematicBreak:q[1],linkReference:q[0],imageReference:q[1],definition:q[1],footnote:q[0],footnoteReference:q[1],footnoteDefinition:q[0],table:q[0],tableCell:q[0],break:q[1],liquidNode:q[1],import:q[1],export:q[1],esComment:q[1],jsx:q[1],math:q[1],inlineMath:q[1],tableRow:q[0],listItem:q[0],text:q[1]};var Ef=_i(Oi),qi=Ef;function z(e,r,t,n={}){let{processor:i=t}=n,u=[];return e.each(()=>{let a=i(e);a!==!1&&(u.length>0&&Cf(e)&&(u.push(M),(Af(e,r)||Ni(e))&&u.push(M),Ni(e)&&u.push(M)),u.push(a))},"children"),u}function Cf({node:e,parent:r}){let t=Tt.has(e.type),n=e.type==="html"&&Mr.has(r.type);return!t&&!n}var vf=new Set(["listItem","definition"]);function Af({node:e,previous:r,parent:t},n){if(Pi(r,n)||e.type==="list"&&t.type==="listItem"&&r.type==="code")return!0;let u=r.type===e.type&&vf.has(e.type),a=t.type==="listItem"&&(e.type==="list"||!Pi(t,n)),o=lr(r)==="next",s=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,l=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(u||a||o||s||l)}function Ni({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function Pi(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===`
|
||||
`)}function Si(e,r,t){let{node:n}=e,i=zr(n,e.parent),u=Ti(n,r);return z(e,r,t,{processor(){let a=s(),{node:o}=e;if(o.children.length===2&&o.children[1].type==="html"&&o.children[0].position.start.column!==o.children[1].position.start.column)return[a,Ii(e,r,t,a)];return[a,Fe(" ".repeat(a.length),Ii(e,r,t,a))];function s(){let l=n.ordered?(e.isFirst?n.start:u?1:n.start+e.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?bf(l,r):l}}})}function Ii(e,r,t,n){let{node:i}=e,u=i.checked===null?"":i.checked?"[x] ":"[ ] ";return[u,z(e,r,t,{processor({node:a,isFirst:o}){if(o&&a.type!=="list")return Fe(" ".repeat(u.length),t());let s=" ".repeat(xf(r.tabWidth-n.length,0,3));return[s,Fe(s,t())]}})]}function bf(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let i=e.length%r.tabWidth;return i===0?0:r.tabWidth-i}}function xf(e,r,t){return Math.max(r,Math.min(e,t))}function Li(e,r,t){let{node:n}=e,i=[],u=e.map(()=>e.map(({index:f})=>{let D=oi(t(),r).formatted,m=or(D);return i[f]=Math.max(i[f]??3,m),{text:D,width:m}},"children"),"children"),a=s(!1);if(r.proseWrap!=="never")return[Ue,a];let o=s(!0);return[Ue,Ge(ei(o,a))];function s(f){return Or(ar,[c(u[0],f),l(f),...u.slice(1).map(D=>c(D,f))].map(D=>`| ${D.join(" | ")} |`))}function l(f){return i.map((D,m)=>{let p=n.align[m],h=p==="center"||p==="left"?":":"-",F=p==="center"||p==="right"?":":"-",g=f?"-":"-".repeat(D-2);return`${h}${g}${F}`})}function c(f,D){return f.map(({text:m,width:p},h)=>{if(D)return m;let F=i[h]-p,g=n.align[h],E=0;g==="right"?E=F:g==="center"&&(E=Math.floor(F/2));let v=F-E;return`${" ".repeat(E)}${m}${" ".repeat(v)}`})}}function Ri(e){let{node:r}=e,t=R(0,R(0,r.value,"*","\\*"),new RegExp([`(^|${Oe.source})(_+)`,`(_+)(${Oe.source}|$)`].join("|"),"gu"),(u,a,o,s,l)=>R(0,o?`${a}${o}`:`${s}${l}`,"_","\\_")),n=(u,a,o)=>u.type==="sentence"&&o===0,i=(u,a,o)=>Gr(u.children[o-1]);return t!==r.value&&(e.match(void 0,n,i)||e.match(void 0,n,(u,a,o)=>u.type==="emphasis"&&o===0,i))&&(t=t.replace(/^(\\?[*_])+/u,u=>R(0,u,"\\",""))),t}function Mi(e,r,t){let n=e.map(t,"children");return yf(n)}function yf(e){let r=[""];return(function t(n){for(let i of n){let u=W(i);if(u===j){t(i);continue}let a=i,o=[];u===J&&([a,...o]=i.parts),r.push([r.pop(),a],...o)}})(e),Ye(r)}var _t=class{#e;constructor(r){this.#e=new Set(r)}getLeadingWhitespaceCount(r){let t=this.#e,n=0;for(let i=0;i<r.length&&t.has(r.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(r){let t=this.#e,n=0;for(let i=r.length-1;i>=0&&t.has(r.charAt(i));i--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return this.#e.has(r.charAt(0))}hasTrailingWhitespace(r){return this.#e.has(U(0,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${fe([...this.#e].join(""))}]+`,i=new RegExp(t?`(${n})`:n,"u");return r.split(i)}hasWhitespaceCharacter(r){let t=this.#e;return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=this.#e;return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=this.#e;return Array.prototype.every.call(r,n=>t.has(n))}#r(r){let t=Number.POSITIVE_INFINITY;for(let n of r.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<t&&(t=i)}return t===Number.POSITIVE_INFINITY?0:t}dedentString(r){let t=this.#r(r);return t===0?r:r.split(`
|
||||
`).map(n=>n.slice(t)).join(`
|
||||
`)}},Ui=_t;var wf=[" ",`
|
||||
`,"\f","\r"," "],kf=new Ui(wf),Ot=kf;var Tf=/^\\?.$/su,Bf=/^\n *>[ >]*$/u;function _f(e,r){return e=Of(e,r),e=Nf(e),e=If(e,r),e=Sf(e,r),e=Pf(e),e}function Of(e,r){return ye(e,t=>{if(t.type!=="text")return t;let{value:n}=t;if(n==="*"||n==="_"||!Tf.test(n)||t.position.end.offset-t.position.start.offset===n.length)return t;let i=r.originalText.slice(t.position.start.offset,t.position.end.offset);return Bf.test(i)?t:{...t,value:i}})}function qf(e,r,t){return ye(e,n=>{if(!n.children)return n;let i=[],u,a;for(let o of n.children)u&&r(u,o)?(o=t(u,o),i.splice(-1,1,o),a||(a=!0)):i.push(o),u=o;return a?{...n,children:i}:n})}function Nf(e){return qf(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Pf(e){return ye(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:i}=r;return n.type==="paragraph"&&(t===0&&(i=Ot.trimStart(i)),t===n.children.length-1&&(i=Ot.trimEnd(i))),{type:"sentence",position:r.position,children:Ur(i)}})}function If(e,r){return ye(e,(t,n,i)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let a=0;a<i.length;a++){let o=i[a];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return t})}function Sf(e,r){return ye(e,(i,u,a)=>{if(i.type==="list"&&i.children.length>0){for(let o=0;o<a.length;o++){let s=a[o];if(s.type==="list"&&!s.isAligned)return i.isAligned=!1,i}i.isAligned=n(i)}return i});function t(i){return i.children.length===0?-1:i.children[0].position.start.column-1}function n(i){if(!i.ordered)return!0;let[u,a]=i.children;if(ze(u,r).leadingSpaces.length>1)return!0;let s=t(u);if(s===-1)return!1;if(i.children.length===1)return s%r.tabWidth===0;let l=t(a);return s!==l?!1:s%r.tabWidth===0?!0:ze(a,r).leadingSpaces.length>1}}var Yi=_f;function Gi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,i=r();switch(n.type){case"whitespace":if(W(i)!==V){t.push(i,"");break}default:t.push([t.pop(),i])}},"children"),Ye(t)}var Lf=new Set(["heading","tableCell","link","wikiLink"]),zi=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Rf({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;n<t.length-1;++n){let i=t[n];if(i.type==="whitespace"&&(i.value===" "||i.value==="")){let u=t[n-1].kind,a=t[n+1].kind;(u===ae&&a===We||u===We&&a===ae)&&++r[i.value]}}e.usesCJSpaces=r[" "]>r[""]}return e.usesCJSpaces}function Mf(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let i=t.kind,u=n.kind;return Wi(i)&&Wi(u)||i===Pe&&u===ae||u===Pe&&i===ae?!0:i===cr||u===cr||i===ae&&u===ae?!1:zi.has(n.value[0])||zi.has(U(0,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Rf(e)}function Wi(e){return e===We||e===Pe}function Uf(e,r,t,n){if(t!=="always"||e.hasAncestor(a=>Lf.has(a.type)))return!1;if(n)return r!=="";let{previous:i,next:u}=e;return!i||!u?!0:r===""?!1:i.kind===Pe&&u.kind===ae||u.kind===Pe&&i.kind===ae?!0:!(i.isCJ||u.isCJ)}function qt(e,r,t,n){if(t==="preserve"&&r===`
|
||||
`)return M;let i=r===" "||r===`
|
||||
`&&Mf(e,n);return Uf(e,r,t,n)?i?Nr:Pr:i?" ":""}function Vi(e){let{previous:r,next:t}=e;return r?.type==="sentence"&&U(0,r.children,-1)?.type==="word"&&!U(0,r.children,-1).hasTrailingPunctuation||t?.type==="sentence"&&t.children[0]?.type==="word"&&!t.children[0].hasLeadingPunctuation}function Yf(e,r,t){let{node:n}=e;if(zf(e)){let i=[""],u=Ur(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let a of u){if(a.type==="word"){i.push([i.pop(),a.value]);continue}let o=qt(e,a.value,r.proseWrap,!0);if(W(o)===V){i.push([i.pop(),o]);continue}i.push(o,"")}return Ye(i)}switch(n.type){case"root":return n.children.length===0?"":[Gf(e,r,t),M];case"paragraph":return Mi(e,r,t);case"sentence":return Gi(e,t);case"word":return Ri(e);case"whitespace":{let{next:i}=e,u=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return qt(e,n.value,u)}case"emphasis":{let i;if(Gr(n.children[0]))i=r.originalText[n.position.start.offset];else{let u=Vi(e),a=e.callParent(({node:o})=>o.type==="strong"&&Vi(e));i=u||a||e.hasAncestor(o=>o.type==="emphasis")?"*":"_"}return[i,z(e,r,t),i]}case"strong":return["**",z(e,r,t),"**"];case"delete":return["~~",z(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:R(0,n.value,`
|
||||
`," "),u=si(i,"`"),a="`".repeat(u),o=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[a,o,i,o,a]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=R(0,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",z(e,r,t),"](",Nt(n.url,")"),Wr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),Wr(n.title,r),")"];case"blockquote":return["> ",Fe("> ",z(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",z(e,r,t)];case"code":{if(n.isIndented){let a=" ".repeat(4);return Fe(a,[a,xe(n.value,M)])}let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Sr(n.value,i)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",M,xe(Yr(n,r.originalText),M),M,u]}case"html":{let{parent:i,isLast:u}=e,a=i.type==="root"&&u?n.value.trimEnd():n.value,o=/^<!--.*-->$/su.test(a);return xe(a,o?M:ur(nr))}case"list":return Si(e,r,t);case"thematicBreak":{let{ancestors:i}=e,u=i.findIndex(o=>o.type==="list");return u===-1?"---":zr(i[u],i[u+1])%2===0?"***":"---"}case"linkReference":return["[",z(e,r,t),"]",n.referenceType==="full"?Pt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Pt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?Nr:" ";return Ge([Pt(n),":",ir([i,Nt(n.url),n.title===null?"":[i,Wr(n.title,r,!1)]])])}case"footnote":return["[^",z(e,r,t),"]"];case"footnoteReference":return $i(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[$i(n),": ",i?z(e,r,t):Ge([Fe(" ".repeat(4),z(e,r,t,{processor:({isFirst:u})=>u?Ge([Pr,t()]):t()}))])]}case"table":return Li(e,r,t);case"tableCell":return z(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",ur(nr)]:["\\",M];case"liquidNode":return xe(n.value,M);case"import":case"export":case"jsx":return n.value.trimEnd();case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",M,n.value?[xe(n.value,M),M]:"","$$"];case"inlineMath":return r.originalText.slice(qe(n),Ne(n));case"frontMatter":case"tableRow":case"listItem":case"text":default:throw new Di(n,"Markdown")}}function Gf(e,r,t){let n=[],i=null,{children:u}=e.node;for(let[a,o]of u.entries())switch(lr(o)){case"start":i===null&&(i={index:a,offset:o.position.end.offset});break;case"end":i!==null&&(n.push({start:i,end:{index:a,offset:o.position.start.offset}}),i=null);break;default:break}return z(e,r,t,{processor({index:a}){if(n.length>0){let o=n[0];if(a===o.start.index)return[ji(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),ji(u[o.end.index])];if(o.start.index<a&&a<o.end.index)return!1;if(a===o.end.index)return n.shift(),!1}return t()}})}function ji(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function zf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var Wf=(e,r)=>{for(let t of r)e=R(0,e,t,encodeURIComponent(t));return e};function Nt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>fe(n)).join("|"),"u").test(e)?`<${Wf(e,"<>")}>`:e}function Wr(e,r,t=!0){if(!e)return"";if(t)return" "+Wr(e,r,!1);if(e=R(0,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=fi(e,r.singleQuote);return e=R(0,e,"\\","\\\\"),e=R(0,e,n,`\\${n}`),`${n}${e}${n}`}function Vf(e){return e.index>0&&lr(e.previous)==="next"}function Pt(e){return`[${(0,Hi.default)(e.label)}]`}function $i(e){return`[^${e.label}]`}var jf={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:Yi,print:Yf,embed:Bi,massageAstNode:wi,hasPrettierIgnore:Vf,insertPragma:bi,getVisitorKeys:qi},Ki=jf;var Xi=[{name:"Markdown",type:"prose",aceMode:"markdown",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",aceMode:"markdown",extensions:[".mdx"],filenames:[],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}];vLine truncated
|
||||
|
||||
`),n=t===-1?r:r.slice(0,t);if(ul(n))return e(n)({type:il(n)?"export":"import",value:n})};zn.notInBlock=!0;zn.locator=e=>ul(e)?-1:1;var al=(e,r)=>{let t=nF.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};al.locator=(e,r)=>e.indexOf("{",r);var ol=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:i}=e.prototype;r.esSyntax=zn,n.esComment=al,t.splice(t.indexOf("paragraph"),0,"esSyntax"),i.splice(i.indexOf("text"),0,"esComment")};var uF=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let{frontMatter:i}=_e(n);if(i)return t(i.raw)({...i,type:"frontMatter"})}r.onlyAtStart=!0},sl=uF;function aF(){return e=>ye(e,(r,t,[n])=>r.type!=="html"||nl.test(r.value)||Mr.has(n.type)?r:{...r,type:"jsx"})}var cl=aF;var oF=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,i){let u=i.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,i){return n.indexOf("{",i)}},ll=oF;var sF=function(){let e="wikiLink",r=/^\[\[(?<linkContents>.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=i;function i(u,a){let o=r.exec(a);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}i.locator=function(u,a){return u.indexOf("[",a)}},fl=sF;function Fl({isMDX:e}){return r=>{let t=(0,ml.default)().use(dl.default,{commonmark:!0,...e&&{blocks:[tl]}}).use(pl.default).use(sl).use(hl.default).use(e?ol:Dl).use(ll).use(e?cl:Dl).use(fl);return t.run(t.parse(r))}}function Dl(){}var gl={astFormat:"mdast",hasPragma:Rr,hasIgnorePragma:Ai,locStart:qe,locEnd:Ne},cF={...gl,parse:Fl({isMDX:!1})},lF={...gl,parse:Fl({isMDX:!0})};var fF={mdast:Ki};return xl(DF);});
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
var El=Object.create;var Ft=Object.defineProperty;var Cl=Object.getOwnPropertyDescriptor;var vl=Object.getOwnPropertyNames;var Al=Object.getPrototypeOf,bl=Object.prototype.hasOwnProperty;var x=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Vn=(e,r)=>{for(var t in r)Ft(e,t,{get:r[t],enumerable:!0})},xl=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vl(r))!bl.call(e,i)&&i!==t&&Ft(e,i,{get:()=>r[i],enumerable:!(n=Cl(r,i))||n.enumerable});return e};var Re=(e,r,t)=>(t=e!=null?El(Al(e)):{},xl(r||!e||!e.__esModule?Ft(t,"default",{value:e,enumerable:!0}):t,e));var Tr=x((gF,jn)=>{"use strict";jn.exports=Bl;function Bl(e){return String(e).replace(/\s+/g," ")}});var Qi=x((KC,Ji)=>{"use strict";Ji.exports=Qf;var pr=9,Wr=10,Ve=32,Hf=33,Kf=58,je=91,Xf=92,St=93,hr=94,Vr=96,jr=4,Jf=1024;function Qf(e){var r=this.Parser,t=this.Compiler;Zf(r)&&rD(r,e),eD(t)&&tD(t)}function Zf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function eD(e){return!!(e&&e.prototype&&e.prototype.visitors)}function rD(e,r){for(var t=r||{},n=e.prototype,i=n.blockTokenizers,u=n.inlineTokenizers,a=n.blockMethods,o=n.inlineMethods,s=i.definition,l=u.reference,c=[],f=-1,D=a.length,m;++f<D;)m=a[f],!(m==="newline"||m==="indentedCode"||m==="paragraph"||m==="footnoteDefinition")&&c.push([m]);c.push(["footnoteDefinition"]),t.inlineNotes&&(Lt(o,"reference","inlineNote"),u.inlineNote=F),Lt(a,"definition","footnoteDefinition"),Lt(o,"reference","footnoteCall"),i.definition=E,i.footnoteDefinition=p,u.footnoteCall=h,u.reference=g,n.interruptFootnoteDefinition=c,g.locator=l.locator,h.locator=v,F.locator=A;function p(b,d,y){for(var w=this,C=w.interruptFootnoteDefinition,k=w.offset,T=d.length+1,B=0,_=[],S,P,N,O,I,le,K,L,ie,Z,ve,Ae,G;B<T&&(O=d.charCodeAt(B),!(O!==pr&&O!==Ve));)B++;if(d.charCodeAt(B++)===je&&d.charCodeAt(B++)===hr){for(P=B;B<T;){if(O=d.charCodeAt(B),O!==O||O===Wr||O===pr||O===Ve)return;if(O===St){N=B,B++;break}B++}if(!(N===void 0||P===N||d.charCodeAt(B++)!==Kf)){if(y)return!0;for(S=d.slice(P,N),I=b.now(),ie=0,Z=0,ve=B,Ae=[];B<T;){if(O=d.charCodeAt(B),O!==O||O===Wr)G={start:ie,contentStart:ve||B,contentEnd:B,end:B},Ae.push(G),O===Wr&&(ie=B+1,Z=0,ve=void 0,G.end=ie);else if(Z!==void 0)if(O===Ve||O===pr)Z+=O===Ve?1:jr-Z%jr,Z>jr&&(Z=void 0,ve=B);else{if(Z<jr&&G&&(G.contentStart===G.contentEnd||nD(C,i,w,[b,d.slice(B,Jf),!0])))break;Z=void 0,ve=B}B++}for(B=-1,T=Ae.length;T>0&&(G=Ae[T-1],G.contentStart===G.contentEnd);)T--;for(le=b(d.slice(0,G.contentEnd));++B<T;)G=Ae[B],k[I.line+B]=(k[I.line+B]||0)+(G.contentStart-G.start),_.push(d.slice(G.contentStart,G.end));return K=w.enterBlock(),L=w.tokenizeBlock(_.join(""),I),K(),le({type:"footnoteDefinition",identifier:S.toLowerCase(),label:S,children:L})}}}function h(b,d,y){var w=d.length+1,C=0,k,T,B,_;if(d.charCodeAt(C++)===je&&d.charCodeAt(C++)===hr){for(T=C;C<w;){if(_=d.charCodeAt(C),_!==_||_===Wr||_===pr||_===Ve)return;if(_===St){B=C,C++;break}C++}if(!(B===void 0||T===B))return y?!0:(k=d.slice(T,B),b(d.slice(0,C))({type:"footnoteReference",identifier:k.toLowerCase(),label:k}))}}function F(b,d,y){var w=this,C=d.length+1,k=0,T=0,B,_,S,P,N,O,I;if(d.charCodeAt(k++)===hr&&d.charCodeAt(k++)===je){for(S=k;k<C;){if(_=d.charCodeAt(k),_!==_)return;if(O===void 0)if(_===Xf)k+=2;else if(_===je)T++,k++;else if(_===St)if(T===0){P=k,k++;break}else T--,k++;else if(_===Vr){for(N=k,O=1;d.charCodeAt(N+O)===Vr;)O++;k+=O}else k++;else if(_===Vr){for(N=k,I=1;d.charCodeAt(N+I)===Vr;)I++;k+=I,O===I&&(O=void 0),I=void 0}else k++}if(P!==void 0)return y?!0:(B=b.now(),B.column+=2,B.offset+=2,b(d.slice(0,k))({type:"footnote",children:w.tokenizeInline(d.slice(S,P),B)}))}}function g(b,d,y){var w=0;if(d.charCodeAt(w)===Hf&&w++,d.charCodeAt(w)===je&&d.charCodeAt(w+1)!==hr)return l.call(this,b,d,y)}function E(b,d,y){for(var w=0,C=d.charCodeAt(w);C===Ve||C===pr;)C=d.charCodeAt(++w);if(C===je&&d.charCodeAt(w+1)!==hr)return s.call(this,b,d,y)}function v(b,d){return b.indexOf("[",d)}function A(b,d){return b.indexOf("^[",d)}}function tD(e){var r=e.prototype.visitors,t=" ";r.footnote=n,r.footnoteReference=i,r.footnoteDefinition=u;function n(a){return"^["+this.all(a).join("")+"]"}function i(a){return"[^"+(a.label||a.identifier)+"]"}function u(a){for(var o=this.all(a).join(`
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=t+c);return"[^"+(a.label||a.identifier)+"]: "+o.join(`
|
||||
`)}}function Lt(e,r,t){e.splice(e.indexOf(r),0,t)}function nD(e,r,t,n){for(var i=e.length,u=-1;++u<i;)if(r[e[u][0]].apply(t,n))return!0;return!1}});var Mt=x(Rt=>{Rt.isRemarkParser=iD;Rt.isRemarkCompiler=uD;function iD(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function uD(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var uu=x((JC,iu)=>{var Zi=Mt();iu.exports=cD;var eu=9,ru=32,$r=36,aD=48,oD=57,tu=92,sD=["math","math-inline"],nu="math-display";function cD(e){let r=this.Parser,t=this.Compiler;Zi.isRemarkParser(r)&&lD(r,e),Zi.isRemarkCompiler(t)&&fD(t,e)}function lD(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=i,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function i(a,o){return a.indexOf("$",o)}function u(a,o,s){let l=o.length,c=!1,f=!1,D=0,m,p,h,F,g,E,v;if(o.charCodeAt(D)===tu&&(f=!0,D++),o.charCodeAt(D)===$r){if(D++,f)return s?!0:a(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===$r&&(c=!0,D++),h=o.charCodeAt(D),!(h===ru||h===eu)){for(F=D;D<l;){if(p=h,h=o.charCodeAt(D+1),p===$r){if(m=o.charCodeAt(D-1),m!==ru&&m!==eu&&(h!==h||h<aD||h>oD)&&(!c||h===$r)){g=D-1,D++,c&&D++,E=D;break}}else p===tu&&(D++,h=o.charCodeAt(D+1));D++}if(E!==void 0)return s?!0:(v=o.slice(F,g+1),a(o.slice(0,E))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:sD.concat(c&&r.inlineMathDouble?[nu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function fD(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let i="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(nu)&&(i="$$"),i+n.value+i}}});var lu=x((QC,cu)=>{var au=Mt();cu.exports=dD;var ou=10,dr=32,Ut=36,su=`
|
||||
`,DD="$",pD=2,hD=["math","math-display"];function dD(){let e=this.Parser,r=this.Compiler;au.isRemarkParser(e)&&mD(e),au.isRemarkCompiler(r)&&FD(r)}function mD(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,i=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=a,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),i.splice(i.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function a(o,s,l){var c=s.length,f=0;let D,m,p,h,F,g,E,v,A,b,d;for(;f<c&&s.charCodeAt(f)===dr;)f++;for(F=f;f<c&&s.charCodeAt(f)===Ut;)f++;if(g=f-F,!(g<pD)){for(;f<c&&s.charCodeAt(f)===dr;)f++;for(E=f;f<c;){if(D=s.charCodeAt(f),D===Ut)return;if(D===ou)break;f++}if(s.charCodeAt(f)===ou){if(l)return!0;for(m=[],E!==f&&m.push(s.slice(E,f)),f++,p=s.indexOf(su,f+1),p=p===-1?c:p;f<c;){for(v=!1,b=f,d=p,h=p,A=0;h>b&&s.charCodeAt(h-1)===dr;)h--;for(;h>b&&s.charCodeAt(h-1)===Ut;)A++,h--;for(g<=A&&s.indexOf(DD,b)===h&&(v=!0,d=h);b<=d&&b-f<F&&s.charCodeAt(b)===dr;)b++;if(v)for(;d>b&&s.charCodeAt(d-1)===dr;)d--;if((!v||b!==d)&&m.push(s.slice(b,d)),v)break;f=p+1,p=s.indexOf(su,f+1),p=p===-1?c:p}return m=m.join(`
|
||||
`),o(s.slice(0,p))({type:"math",value:m,data:{hName:"div",hProperties:{className:hD.concat()},hChildren:[{type:"text",value:m}]}})}}}}function FD(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var Du=x((ZC,fu)=>{var gD=uu(),ED=lu();fu.exports=CD;function CD(e){var r=e||{};ED.call(this,r),gD.call(this,r)}});var Ie=x((ev,pu)=>{pu.exports=AD;var vD=Object.prototype.hasOwnProperty;function AD(){for(var e={},r=0;r<arguments.length;r++){var t=arguments[r];for(var n in t)vD.call(t,n)&&(e[n]=t[n])}return e}});var hu=x((rv,Yt)=>{typeof Object.create=="function"?Yt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Yt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Fu=x((tv,mu)=>{"use strict";var bD=Ie(),du=hu();mu.exports=xD;function xD(e){var r,t,n;du(u,e),du(i,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():bD(n));return u;function i(a){return e.apply(this,a)}function u(){return this instanceof u?e.apply(this,arguments):new i(arguments)}}});var Eu=x((nv,gu)=>{"use strict";gu.exports=yD;function yD(e,r,t){return n;function n(){var i=t||this,u=i[e];return i[e]=!r,a;function a(){i[e]=u}}}});var vu=x((iv,Cu)=>{"use strict";Cu.exports=wD;function wD(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:i,toPosition:i,toOffset:u};function i(a){var o=-1;if(a>-1&&a<t[t.length-1]){for(;++o<t.length;)if(t[o]>a)return{line:o+1,column:a-(t[o-1]||0)+1,offset:a}}return{}}function u(a){var o=a&&a.line,s=a&&a.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l<t[t.length-1]?l:-1}}});var bu=x((uv,Au)=>{"use strict";Au.exports=kD;var Gt="\\";function kD(e,r){return t;function t(n){for(var i=0,u=n.indexOf(Gt),a=e[r],o=[],s;u!==-1;)o.push(n.slice(i,u)),i=u+1,s=n.charAt(i),(!s||a.indexOf(s)===-1)&&o.push(Gt),u=n.indexOf(Gt,i+1);return o.push(n.slice(i)),o.join("")}}});var xu=x((av,TD)=>{TD.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var yu=x((ov,BD)=>{BD.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var Se=x((sv,wu)=>{"use strict";wu.exports=_D;function _D(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Tu=x((cv,ku)=>{"use strict";ku.exports=OD;function OD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var $e=x((lv,Bu)=>{"use strict";Bu.exports=qD;function qD(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var Ou=x((fv,_u)=>{"use strict";var ND=$e(),PD=Se();_u.exports=ID;function ID(e){return ND(e)||PD(e)}});var qu=x((Dv,SD)=>{SD.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);T!==-1;)l++,k=T,T=C.indexOf(`
|
||||
`,T+1);k===-1?c+=C.length:c=C.length-k,l in u&&(k!==-1?c+=u[l]:c<=u[l]&&(c=u[l]+1))}function E(){var C=[],k=l+1;return function(){for(var T=l+1;k<T;)C.push((u[k]||0)+1),k++;return C}}function v(){var C={line:l,column:c};return C.offset=i.toOffset(C),C}function A(C){this.start=C,this.end=v()}function b(C){t.slice(0,C.length)!==C&&i.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),v())}function d(){var C=v();return k;function k(T,B){var _=T.position,S=_?_.start:C,P=[],N=_&&_.end.line,O=C.line;if(T.position=new A(S),_&&B&&_.indent){if(P=_.indent,N<O){for(;++N<O;)P.push((u[N]||0)+1);P.push(C.column)}B=P.concat(B)}return T.position.indent=B||[],T}}function y(C,k){var T=k?k.children:a,B=T[T.length-1],_;return B&&C.type===B.type&&(C.type==="text"||C.type==="blockquote")&&Qu(B)&&Qu(C)&&(_=C.type==="text"?op:sp,C=_.call(i,B,C)),C!==B&&T.push(C),i.atStart&&a.length!==0&&i.exitStart(),C}function w(C){var k=E(),T=d(),B=v();return b(C),_.reset=S,S.test=P,_.test=P,t=t.slice(C.length),g(C),k=k(),_;function _(N,O){return T(y(T(N),O),k)}function S(){var N=_.apply(null,arguments);return l=B.line,c=B.column,t=C+t,N}function P(){var N=T({});return l=B.line,c=B.column,t=C+t,N.position}}}}function Qu(e){var r,t;return e.type!=="text"||!e.position?!0:(r=e.position.start,t=e.position.end,r.line!==t.line||t.column-r.column===e.value.length)}function op(e,r){return e.value+=r.value,e}function sp(e,r){return this.options.commonmark||this.options.gfm?r:(e.children=e.children.concat(r.children),e)}});var na=x((Fv,ta)=>{"use strict";ta.exports=Kr;var $t=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],Ht=$t.concat(["~","|"]),ra=Ht.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Kr.default=$t;Kr.gfm=Ht;Kr.commonmark=ra;function Kr(e){var r=e||{};return r.commonmark?ra:r.gfm?Ht:$t}});var ua=x((gv,ia)=>{"use strict";ia.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var Kt=x((Ev,aa)=>{"use strict";aa.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:ua()}});var sa=x((Cv,oa)=>{"use strict";var cp=Ie(),lp=na(),fp=Kt();oa.exports=Dp;function Dp(e){var r=this,t=r.options,n,i;if(e==null)e={};else if(typeof e=="object")e=cp(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in fp){if(i=e[n],i==null&&(i=t[n]),n!=="blocks"&&typeof i!="boolean"||n==="blocks"&&typeof i!="object")throw new Error("Invalid value `"+i+"` for setting `options."+n+"`");e[n]=i}return r.options=e,r.escape=lp(e),r}});var fa=x((vv,la)=>{"use strict";la.exports=ca;function ca(e){if(e==null)return mp;if(typeof e=="string")return dp(e);if(typeof e=="object")return"length"in e?hp(e):pp(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function pp(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function hp(e){for(var r=[],t=-1;++t<e.length;)r[t]=ca(e[t]);return n;function n(){for(var i=-1;++i<r.length;)if(r[i].apply(this,arguments))return!0;return!1}}function dp(e){return r;function r(t){return!!(t&&t.type===e)}}function mp(){return!0}});var pa=x((Av,Da)=>{Da.exports=Fp;function Fp(e){return e}});var Fa=x((bv,ma)=>{"use strict";ma.exports=Xr;var gp=fa(),Ep=pa(),ha=!0,da="skip",Xt=!1;Xr.CONTINUE=ha;Xr.SKIP=da;Xr.EXIT=Xt;function Xr(e,r,t,n){var i,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=gp(r),i=n?-1:1,a(e,null,[])();function a(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+Ep(c.type+(f?"<"+f+">":""))+")"),D;function D(){var m=l.concat(o),p=[],h,F;if((!r||u(o,s,l[l.length-1]||null))&&(p=Cp(t(o,l)),p[0]===Xt))return p;if(o.children&&p[0]!==da)for(F=(n?o.children.length:-1)+i;F>-1&&F<o.children.length;){if(h=a(o.children[F],F,m)(),h[0]===Xt)return h;F=typeof h[1]=="number"?h[1]:F+i}return p}}}function Cp(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ha,e]:[e]}});var Ea=x((xv,ga)=>{"use strict";ga.exports=Qr;var Jr=Fa(),vp=Jr.CONTINUE,Ap=Jr.SKIP,bp=Jr.EXIT;Qr.CONTINUE=vp;Qr.SKIP=Ap;Qr.EXIT=bp;function Qr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Jr(e,r,i,n);function i(u,a){var o=a[a.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var va=x((yv,Ca)=>{"use strict";var xp=Ea();Ca.exports=yp;function yp(e,r){return xp(e,r?wp:kp),e}function wp(e){delete e.position}function kp(e){e.position=void 0}});var xa=x((wv,ba)=>{"use strict";var Aa=Ie(),Tp=va();ba.exports=Op;var Bp=`
|
||||
`,_p=/\r\n|\r/g;function Op(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=Aa(t),i;return r=r.replace(_p,Bp),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),i={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||Aa(t)}},e.options.position||Tp(i,!0),i}});var wa=x((kv,ya)=>{"use strict";var qp=/^[ \t]*(\n|$)/;ya.exports=Np;function Np(e,r,t){for(var n,i="",u=0,a=r.length;u<a&&(n=qp.exec(r.slice(u)),n!=null);)u+=n[0].length,i+=n[0];if(i!==""){if(t)return!0;e(i)}}});var Zr=x((Tv,ka)=>{"use strict";var ge="",Jt;ka.exports=Pp;function Pp(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Jt!==e||typeof Jt>"u")Jt=e,ge="";else if(ge.length>=t)return ge.substr(0,t);for(;t>ge.length&&r>1;)r&1&&(ge+=e),r>>=1,e+=e;return ge+=e,ge=ge.substr(0,t),ge}});var Qt=x((Bv,Ta)=>{"use strict";Ta.exports=Ip;function Ip(e){return String(e).replace(/\n+$/,"")}});var Oa=x((_v,_a)=>{"use strict";var Sp=Zr(),Lp=Qt();_a.exports=Up;var Zt=`
|
||||
`,Ba=" ",en=" ",Rp=4,Mp=Sp(en,Rp);function Up(e,r,t){for(var n=-1,i=r.length,u="",a="",o="",s="",l,c,f;++n<i;)if(l=r.charAt(n),f)if(f=!1,u+=o,a+=s,o="",s="",l===Zt)o=l,s=l;else for(u+=l,a+=l;++n<i;){if(l=r.charAt(n),!l||l===Zt){s=l,o=l;break}u+=l,a+=l}else if(l===en&&r.charAt(n+1)===l&&r.charAt(n+2)===l&&r.charAt(n+3)===l)o+=Mp,n+=3,f=!0;else if(l===Ba)o+=l,f=!0;else{for(c="";l===Ba||l===en;)c+=l,l=r.charAt(++n);if(l!==Zt)break;o+=c+l,s+=l}if(a)return t?!0:e(u)({type:"code",lang:null,meta:null,value:Lp(a)})}});var Pa=x((Ov,Na)=>{"use strict";Na.exports=Wp;var et=`
|
||||
`,Fr=" ",Xe=" ",Yp="~",qa="`",Gp=3,zp=4;function Wp(e,r,t){var n=this,i=n.options.gfm,u=r.length+1,a=0,o="",s,l,c,f,D,m,p,h,F,g,E,v,A;if(i){for(;a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)o+=c,a++;if(v=a,c=r.charAt(a),!(c!==Yp&&c!==qa)){for(a++,l=c,s=1,o+=c;a<u&&(c=r.charAt(a),c===l);)o+=c,s++,a++;if(!(s<Gp)){for(;a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)o+=c,a++;for(f="",p="";a<u&&(c=r.charAt(a),!(c===et||l===qa&&c===l));)c===Xe||c===Fr?p+=c:(f+=p+c,p=""),a++;if(c=r.charAt(a),!(c&&c!==et)){if(t)return!0;A=e.now(),A.column+=o.length,A.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),A),p&&(o+=p),p="",g="",E="",h="",F="";for(var b=!0;a<u;){if(c=r.charAt(a),h+=g,F+=E,g="",E="",c!==et){h+=c,E+=c,a++;continue}for(b?(o+=c,b=!1):(g+=c,E+=c),p="",a++;a<u&&(c=r.charAt(a),c===Xe);)p+=c,a++;if(g+=p,E+=p.slice(v),!(p.length>=zp)){for(p="";a<u&&(c=r.charAt(a),c===l);)p+=c,a++;if(g+=p,E+=p,!(p.length<s)){for(p="";a<u&&(c=r.charAt(a),!(c!==Xe&&c!==Fr));)g+=c,E+=c,a++;if(!c||c===et)break}}}for(o+=h+g,a=-1,u=f.length;++a<u;)if(c=f.charAt(a),c===Xe||c===Fr)D||(D=f.slice(0,a));else if(D){m=f.slice(a);break}return e(o)({type:"code",lang:D||f||null,meta:m||null,value:F})}}}}}});var Le=x((Je,Ia)=>{Je=Ia.exports=Vp;function Vp(e){return e.trim?e.trim():Je.right(Je.left(e))}Je.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Je.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var rt=x((qv,Sa)=>{"use strict";Sa.exports=jp;function jp(e,r,t,n){for(var i=e.length,u=-1,a,o;++u<i;)if(a=e[u],o=a[1]||{},!(o.pedantic!==void 0&&o.pedantic!==t.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==t.options.commonmark)&&r[a[0]].apply(t,n))return!0;return!1}});var Ua=x((Nv,Ma)=>{"use strict";var $p=Le(),Hp=rt();Ma.exports=Kp;var rn=`
|
||||
`,La=" ",tn=" ",Ra=">";function Kp(e,r,t){for(var n=this,i=n.offset,u=n.blockTokenizers,a=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],m,p=0,h,F,g,E,v,A,b,d;p<l&&(h=r.charAt(p),!(h!==tn&&h!==La));)p++;if(r.charAt(p)===Ra){if(t)return!0;for(p=0;p<l;){for(g=r.indexOf(rn,p),A=p,b=!1,g===-1&&(g=l);p<l&&(h=r.charAt(p),!(h!==tn&&h!==La));)p++;if(r.charAt(p)===Ra?(p++,b=!0,r.charAt(p)===tn&&p++):p=A,E=r.slice(p,g),!b&&!$p(E)){p=A;break}if(!b&&(F=r.slice(p),Hp(a,u,n,[e,F,!0])))break;v=A===p?E:r.slice(A,g),D.push(p-A),c.push(v),f.push(E),p=g+1}for(p=-1,l=D.length,m=e(c.join(rn));++p<l;)i[s]=(i[s]||0)+D[p],s++;return d=n.enterBlock(),f=n.tokenizeBlock(f.join(rn),o),d(),m({type:"blockquote",children:f})}}});var za=x((Pv,Ga)=>{"use strict";Ga.exports=Jp;var Ya=`
|
||||
`,gr=" ",Er=" ",Cr="#",Xp=6;function Jp(e,r,t){for(var n=this,i=n.options.pedantic,u=r.length+1,a=-1,o=e.now(),s="",l="",c,f,D;++a<u;){if(c=r.charAt(a),c!==Er&&c!==gr){a--;break}s+=c}for(D=0;++a<=u;){if(c=r.charAt(a),c!==Cr){a--;break}s+=c,D++}if(!(D>Xp)&&!(!D||!i&&r.charAt(a+1)===Cr)){for(u=r.length+1,f="";++a<u;){if(c=r.charAt(a),c!==Er&&c!==gr){a--;break}f+=c}if(!(!i&&f.length===0&&c&&c!==Ya)){if(t)return!0;for(s+=f,f="",l="";++a<u&&(c=r.charAt(a),!(!c||c===Ya));){if(c!==Er&&c!==gr&&c!==Cr){l+=f+c,f="";continue}for(;c===Er||c===gr;)f+=c,c=r.charAt(++a);if(!i&&l&&!f&&c===Cr){l+=c;continue}for(;c===Cr;)f+=c,c=r.charAt(++a);for(;c===Er||c===gr;)f+=c,c=r.charAt(++a);a--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:D,children:n.tokenizeInline(l,o)})}}}});var ja=x((Iv,Va)=>{"use strict";Va.exports=ih;var Qp=" ",Zp=`
|
||||
`,Wa=" ",eh="*",rh="-",th="_",nh=3;function ih(e,r,t){for(var n=-1,i=r.length+1,u="",a,o,s,l;++n<i&&(a=r.charAt(n),!(a!==Qp&&a!==Wa));)u+=a;if(!(a!==eh&&a!==rh&&a!==th))for(o=a,u+=a,s=1,l="";++n<i;)if(a=r.charAt(n),a===o)s++,u+=l+o,l="";else if(a===Wa)l+=a;else return s>=nh&&(!a||a===Zp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var nn=x((Sv,Ha)=>{"use strict";Ha.exports=sh;var $a=" ",uh=" ",ah=1,oh=4;function sh(e){for(var r=0,t=0,n=e.charAt(r),i={},u,a=0;n===$a||n===uh;){for(u=n===$a?oh:ah,t+=u,u>1&&(t=Math.floor(t/u)*u);a<t;)i[++a]=r;n=e.charAt(++r)}return{indent:t,stops:i}}});var Ja=x((Lv,Xa)=>{"use strict";var ch=Le(),lh=Zr(),fh=nn();Xa.exports=hh;var Ka=`
|
||||
`,Dh=" ",ph="!";function hh(e,r){var t=e.split(Ka),n=t.length+1,i=1/0,u=[],a,o,s;for(t.unshift(lh(Dh,r)+ph);n--;)if(o=fh(t[n]),u[n]=o.stops,ch(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent<i&&(i=o.indent);else{i=1/0;break}if(i!==1/0)for(n=t.length;n--;){for(s=u[n],a=i;a&&!(a in s);)a--;t[n]=t[n].slice(s[a]+1)}return t.shift(),t.join(Ka)}});var no=x((Rv,to)=>{"use strict";var dh=Le(),mh=Zr(),Qa=Se(),Fh=nn(),gh=Ja(),Eh=rt();to.exports=kh;var un="*",Ch="_",Za="+",an="-",eo=".",Ee=" ",oe=`
|
||||
`,tt=" ",ro=")",vh="x",ke=4,Ah=/\n\n(?!\s*$)/,bh=/^\[([ X\tx])][ \t]/,xh=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,yh=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,wh=/^( {1,4}|\t)?/gm;function kh(e,r,t){for(var n=this,i=n.options.commonmark,u=n.options.pedantic,a=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C,k,T,B,_,S=!1,P,N,O,I;s<l&&(p=r.charAt(s),!(p!==tt&&p!==Ee));)s++;if(p=r.charAt(s),p===un||p===Za||p===an)h=p,m=!1;else{for(m=!0,D="";s<l&&(p=r.charAt(s),!!Qa(p));)D+=p,s++;if(p=r.charAt(s),!D||!(p===eo||i&&p===ro)||t&&D!=="1")return;c=parseInt(D,10),h=p}if(p=r.charAt(++s),!(p!==Ee&&p!==tt&&(u||p!==oe&&p!==""))){if(t)return!0;for(s=0,w=[],C=[],k=[];s<l;){for(F=r.indexOf(oe,s),g=s,E=!1,I=!1,F===-1&&(F=l),f=0;s<l;){if(p=r.charAt(s),p===tt)f+=ke-f%ke;else if(p===Ee)f++;else break;s++}if(T&&f>=T.indent&&(I=!0),p=r.charAt(s),v=null,!I){if(p===un||p===Za||p===an)v=p,s++,f++;else{for(D="";s<l&&(p=r.charAt(s),!!Qa(p));)D+=p,s++;p=r.charAt(s),s++,D&&(p===eo||i&&p===ro)&&(v=p,f+=D.length+1)}if(v)if(p=r.charAt(s),p===tt)f+=ke-f%ke,s++;else if(p===Ee){for(O=s+ke;s<O&&r.charAt(s)===Ee;)s++,f++;s===O&&r.charAt(s)===Ee&&(s-=ke-1,f-=ke-1)}else p!==oe&&p!==""&&(v=null)}if(v){if(!u&&h!==v)break;E=!0}else!i&&!I&&r.charAt(g)===Ee?I=!0:i&&T&&(I=f>=T.indent||f>ke),E=!1,s=g;if(b=r.slice(g,F),A=g===s?b:r.slice(s,F),(v===un||v===Ch||v===an)&&a.thematicBreak.call(n,e,b,!0))break;if(d=y,y=!E&&!dh(A).length,I&&T)T.value=T.value.concat(k,b),C=C.concat(k,b),k=[];else if(E)k.length!==0&&(S=!0,T.value.push(""),T.trail=k.concat()),T={value:[b],indent:f,trail:[]},w.push(T),C=C.concat(k,b),k=[];else if(y){if(d&&!i)break;k.push(b)}else{if(d||Eh(o,a,n,[e,b,!0]))break;T.value=T.value.concat(k,b),C=C.concat(k,b),k=[]}s=F+1}for(P=e(C.join(oe)).reset({type:"list",ordered:m,start:c,spread:S,children:[]}),B=n.enterList(),_=n.enterBlock(),s=-1,l=w.length;++s<l;)T=w[s].value.join(oe),N=e.now(),e(T)(Th(n,T,N),P),T=w[s].trail.join(oe),s!==l-1&&(T+=oe),e(T);return B(),_(),P}}function Th(e,r,t){var n=e.offset,i=e.options.pedantic?Bh:_h,u=null,a,o;return r=i.apply(null,arguments),e.options.gfm&&(a=r.match(bh),a&&(o=a[0].length,u=a[1].toLowerCase()===vh,n[t.line]+=o,r=r.slice(o))),{type:"listItem",spread:Ah.test(r),checked:u,children:e.tokenizeBlock(r,t)}}function Bh(e,r,t){var n=e.offset,i=t.line;return r=r.replace(yh,u),i=t.line,r.replace(wh,u);function u(a){return n[i]=(n[i]||0)+a.length,i++,""}}function _h(e,r,t){var n=e.offset,i=t.line,u,a,o,s,l,c,f;for(r=r.replace(xh,D),s=r.split(oe),l=gh(r,Fh(u).indent).split(oe),l[0]=o,n[i]=(n[i]||0)+a.length,i++,c=0,f=s.length;++c<f;)n[i]=(n[i]||0)+s[c].length-l[c].length,i++;return l.join(oe);function D(m,p,h,F,g){return a=p+h+F,o=g,Number(h)<10&&a.length%2===1&&(h=Ee+h),u=p+mh(Ee,h.length)+F,u+o}}});var oo=x((Mv,ao)=>{"use strict";ao.exports=Sh;var on=`
|
||||
`,Oh=" ",io=" ",uo="=",qh="-",Nh=3,Ph=1,Ih=2;function Sh(e,r,t){for(var n=this,i=e.now(),u=r.length,a=-1,o="",s,l,c,f,D;++a<u;){if(c=r.charAt(a),c!==io||a>=Nh){a--;break}o+=c}for(s="",l="";++a<u;){if(c=r.charAt(a),c===on){a--;break}c===io||c===Oh?l+=c:(s+=l+c,l="")}if(i.column+=o.length,i.offset+=o.length,o+=s+l,c=r.charAt(++a),f=r.charAt(++a),!(c!==on||f!==uo&&f!==qh)){for(o+=c,l=f,D=f===uo?Ph:Ih;++a<u;){if(c=r.charAt(a),c!==f){if(c!==on)return;a--;break}l+=c}return t?!0:e(o+l)({type:"heading",depth:D,children:n.tokenizeInline(s,i)})}}});var cn=x(sn=>{"use strict";var Lh="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rh="[^\"'=<>`\\u0000-\\u0020]+",Mh="'[^']*'",Uh='"[^"]*"',Yh="(?:"+Rh+"|"+Mh+"|"+Uh+")",Gh="(?:\\s+"+Lh+"(?:\\s*=\\s*"+Yh+")?)",so="<[A-Za-z][A-Za-z0-9\\-]*"+Gh+"*\\s*\\/?>",co="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",zh="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Wh="<[?].*?[?]>",Vh="<![A-Za-z]+\\s+[^>]*>",jh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";sn.openCloseTag=new RegExp("^(?:"+so+"|"+co+")");sn.tag=new RegExp("^(?:"+so+"|"+co+"|"+zh+"|"+Wh+"|"+Vh+"|"+jh+")")});var po=x((Yv,Do)=>{"use strict";var $h=cn().openCloseTag;Do.exports=sd;var Hh=" ",Kh=" ",lo=`
|
||||
`,Xh="<",Jh=/^<(script|pre|style)(?=(\s|>|$))/i,Qh=/<\/(script|pre|style)>/i,Zh=/^<!--/,ed=/-->/,rd=/^<\?/,td=/\?>/,nd=/^<![A-Za-z]/,id=/>/,ud=/^<!\[CDATA\[/,ad=/]]>/,fo=/^$/,od=new RegExp($h.source+"\\s*$");function sd(e,r,t){for(var n=this,i=n.options.blocks.join("|"),u=new RegExp("^</?("+i+")(?=(\\s|/?>|$))","i"),a=r.length,o=0,s,l,c,f,D,m,p,h=[[Jh,Qh,!0],[Zh,ed,!0],[rd,td,!0],[nd,id,!0],[ud,ad,!0],[u,fo,!0],[od,fo,!1]];o<a&&(f=r.charAt(o),!(f!==Hh&&f!==Kh));)o++;if(r.charAt(o)===Xh){for(s=r.indexOf(lo,o+1),s=s===-1?a:s,l=r.slice(o,s),c=-1,D=h.length;++c<D;)if(h[c][0].test(l)){m=h[c];break}if(m){if(t)return m[2];if(o=s,!m[1].test(l))for(;o<a;){if(s=r.indexOf(lo,o+1),s=s===-1?a:s,l=r.slice(o+1,s),m[1].test(l)){l&&(o=s);break}o=s}return p=r.slice(0,o),e(p)({type:"html",value:p})}}}});var se=x((Gv,ho)=>{"use strict";ho.exports=fd;var cd=String.fromCharCode,ld=/\s/;function fd(e){return ld.test(typeof e=="number"?cd(e):e.charAt(0))}});var ln=x((zv,mo)=>{"use strict";var Dd=Tr();mo.exports=pd;function pd(e){return Dd(e).toLowerCase()}});var bo=x((Wv,Ao)=>{"use strict";var hd=se(),dd=ln();Ao.exports=Ed;var Fo='"',go="'",md="\\",Qe=`
|
||||
`,nt=" ",it=" ",Dn="[",vr="]",Fd="(",gd=")",Eo=":",Co="<",vo=">";function Ed(e,r,t){for(var n=this,i=n.options.commonmark,u=0,a=r.length,o="",s,l,c,f,D,m,p,h;u<a&&(f=r.charAt(u),!(f!==it&&f!==nt));)o+=f,u++;if(f=r.charAt(u),f===Dn){for(u++,o+=f,c="";u<a&&(f=r.charAt(u),f!==vr);)f===md&&(c+=f,u++,f=r.charAt(u)),c+=f,u++;if(!(!c||r.charAt(u)!==vr||r.charAt(u+1)!==Eo)){for(m=c,o+=c+vr+Eo,u=o.length,c="";u<a&&(f=r.charAt(u),!(f!==nt&&f!==it&&f!==Qe));)o+=f,u++;if(f=r.charAt(u),c="",s=o,f===Co){for(u++;u<a&&(f=r.charAt(u),!!fn(f));)c+=f,u++;if(f=r.charAt(u),f===fn.delimiter)o+=Co+c+f,u++;else{if(i)return;u-=c.length+1,c=""}}if(!c){for(;u<a&&(f=r.charAt(u),!!Cd(f));)c+=f,u++;o+=c}if(c){for(p=c,c="";u<a&&(f=r.charAt(u),!(f!==nt&&f!==it&&f!==Qe));)c+=f,u++;if(f=r.charAt(u),D=null,f===Fo?D=Fo:f===go?D=go:f===Fd&&(D=gd),!D)c="",u=o.length;else if(c){for(o+=c+f,u=o.length,c="";u<a&&(f=r.charAt(u),f!==D);){if(f===Qe){if(u++,f=r.charAt(u),f===Qe||f===D)return;c+=Qe}c+=f,u++}if(f=r.charAt(u),f!==D)return;l=o,o+=c+f,u++,h=c,c=""}else return;for(;u<a&&(f=r.charAt(u),!(f!==nt&&f!==it));)o+=f,u++;if(f=r.charAt(u),!f||f===Qe)return t?!0:(s=e(s).test().end,p=n.decode.raw(n.unescape(p),s,{nonTerminated:!1}),h&&(l=e(l).test().end,h=n.decode.raw(n.unescape(h),l)),e(o)({type:"definition",identifier:dd(m),label:m,title:h||null,url:p}))}}}}function fn(e){return e!==vo&&e!==Dn&&e!==vr}fn.delimiter=vo;function Cd(e){return e!==Dn&&e!==vr&&!hd(e)}});var wo=x((Vv,yo)=>{"use strict";var vd=se();yo.exports=Od;var Ad=" ",ut=`
|
||||
`,bd=" ",xd="-",yd=":",wd="\\",pn="|",kd=1,Td=2,xo="left",Bd="center",_d="right";function Od(e,r,t){var n=this,i,u,a,o,s,l,c,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C;if(n.options.gfm){for(i=0,v=0,l=r.length+1,c=[];i<l;){if(y=r.indexOf(ut,i),w=r.indexOf(pn,i+1),y===-1&&(y=r.length),w===-1||w>y){if(v<Td)return;break}c.push(r.slice(i,y)),v++,i=y+1}for(o=c.join(ut),u=c.splice(1,1)[0]||[],i=0,l=u.length,v--,a=!1,p=[];i<l;){if(D=u.charAt(i),D===pn){if(m=null,a===!1){if(C===!1)return}else p.push(a),a=!1;C=!1}else if(D===xd)m=!0,a=a||null;else if(D===yd)a===xo?a=Bd:m&&a===null?a=_d:a=xo;else if(!vd(D))return;i++}if(a!==!1&&p.push(a),!(p.length<kd)){if(t)return!0;for(E=-1,b=[],d=e(o).reset({type:"table",align:p,children:b});++E<v;){for(A=c[E],s={type:"tableRow",children:[]},E&&e(ut),e(A).reset(s,d),l=A.length+1,i=0,f="",h="",F=!0;i<l;){if(D=A.charAt(i),D===Ad||D===bd){h?f+=D:e(D),i++;continue}D===""||D===pn?F?e(D):((h||D)&&!F&&(o=h,f.length>1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),g=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(h,g)},s)),e(f+D),f="",h=""):(f&&(h+=f,f=""),h+=D,D===wd&&i!==l-2&&(h+=A.charAt(i+1),i++)),F=!1,i++}E||e(ut+u)}return d}}}});var Bo=x((jv,To)=>{"use strict";var qd=Le(),Nd=Qt(),Pd=rt();To.exports=Ld;var Id=" ",Ar=`
|
||||
`,Sd=" ",ko=4;function Ld(e,r,t){for(var n=this,i=n.options,u=i.commonmark,a=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(Ar),l=r.length,c,f,D,m,p;s<l;){if(s===-1){s=l;break}if(r.charAt(s+1)===Ar)break;if(u){for(m=0,c=s+1;c<l;){if(D=r.charAt(c),D===Id){m=ko;break}else if(D===Sd)m++;else break;c++}if(m>=ko&&D!==Ar){s=r.indexOf(Ar,s+1);continue}}if(f=r.slice(s+1),Pd(o,a,n,[e,f,!0]))break;if(c=s,s=r.indexOf(Ar,s+1),s!==-1&&qd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=Nd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var Oo=x(($v,_o)=>{"use strict";_o.exports=Rd;function Rd(e,r){return e.indexOf("\\",r)}});var Io=x((Hv,Po)=>{"use strict";var Md=Oo();Po.exports=No;No.locator=Md;var Ud=`
|
||||
`,qo="\\";function No(e,r,t){var n=this,i,u;if(r.charAt(0)===qo&&(i=r.charAt(1),n.escape.indexOf(i)!==-1))return t?!0:(i===Ud?u={type:"break"}:u={type:"text",value:i},e(qo+i)(u))}});var hn=x((Kv,So)=>{"use strict";So.exports=Yd;function Yd(e,r){return e.indexOf("<",r)}});var Yo=x((Xv,Uo)=>{"use strict";var Lo=se(),Gd=mr(),zd=hn();Uo.exports=gn;gn.locator=zd;gn.notInLink=!0;var Ro="<",dn=">",Mo="@",mn="/",Fn="mailto:",at=Fn.length;function gn(e,r,t){var n=this,i="",u=r.length,a=0,o="",s=!1,l="",c,f,D,m,p;if(r.charAt(0)===Ro){for(a++,i=Ro;a<u&&(c=r.charAt(a),!(Lo(c)||c===dn||c===Mo||c===":"&&r.charAt(a+1)===mn));)o+=c,a++;if(o){if(l+=o,o="",c=r.charAt(a),l+=c,a++,c===Mo)s=!0;else{if(c!==":"||r.charAt(a+1)!==mn)return;l+=mn,a++}for(;a<u&&(c=r.charAt(a),!(Lo(c)||c===dn));)o+=c,a++;if(c=r.charAt(a),!(!o||c!==dn))return t?!0:(l+=o,D=l,i+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,at).toLowerCase()===Fn?(D=D.slice(at),f.column+=at,f.offset+=at):l=Fn+l),m=n.inlineTokenizers,n.inlineTokenizers={text:m.text},p=n.enterLink(),D=n.tokenizeInline(D,f),n.inlineTokenizers=m,p(),e(i)({type:"link",title:null,url:Gd(l,{nonTerminated:!1}),children:D}))}}}});var zo=x((Jv,Go)=>{"use strict";Go.exports=Wd;function Wd(e,r){var t=String(e),n=0,i;if(typeof r!="string")throw new Error("Expected character");for(i=t.indexOf(r);i!==-1;)n++,i=t.indexOf(r,i+r.length);return n}});var jo=x((Qv,Vo)=>{"use strict";Vo.exports=Vd;var Wo=["www.","http://","https://"];function Vd(e,r){var t=-1,n,i,u;if(!this.options.gfm)return t;for(i=Wo.length,n=-1;++n<i;)u=e.indexOf(Wo[n],r),u!==-1&&(t===-1||u<t)&&(t=u);return t}});var Jo=x((Zv,Xo)=>{"use strict";var $o=zo(),jd=mr(),$d=Se(),En=$e(),Hd=se(),Kd=jo();Xo.exports=vn;vn.locator=Kd;vn.notInLink=!0;var Xd=33,Jd=38,Qd=41,Zd=42,e0=44,r0=45,Cn=46,t0=58,n0=59,i0=63,u0=60,Ho=95,a0=126,o0="(",Ko=")";function vn(e,r,t){var n=this,i=n.options.gfm,u=n.inlineTokenizers,a=r.length,o=-1,s=!1,l,c,f,D,m,p,h,F,g,E,v,A,b,d;if(i){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];D<a;){if(h=r.charCodeAt(D),h===Cn){if(o===D-1)break;l.push(D),o=D,D++;continue}if($d(h)||En(h)||h===r0||h===Ho){D++;continue}break}if(h===Cn&&(l.pop(),D--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,r.slice(c,D).indexOf("_")===-1)){if(t)return!0;for(F=D,m=D;D<a&&(h=r.charCodeAt(D),!(Hd(h)||h===u0));)D++,h===Xd||h===Zd||h===e0||h===Cn||h===t0||h===i0||h===Ho||h===a0||(F=D);if(D=F,r.charCodeAt(D-1)===Qd)for(p=r.slice(m,D),g=$o(p,o0),E=$o(p,Ko);E>g;)D=m+p.lastIndexOf(Ko),p=r.slice(m,D),E--;if(r.charCodeAt(D-1)===n0&&(D--,En(r.charCodeAt(D-1)))){for(F=D-2;En(r.charCodeAt(F));)F--;r.charCodeAt(F)===Jd&&(D=F)}return v=r.slice(0,D),b=jd(v,{nonTerminated:!1}),s&&(b="http://"+b),d=n.enterLink(),n.inlineTokenizers={text:u.text},A=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,d(),e(v)({type:"link",title:null,url:b,children:A})}}}});var rs=x((e2,es)=>{"use strict";var s0=Se(),c0=$e(),l0=43,f0=45,D0=46,p0=95;es.exports=Zo;function Zo(e,r){var t=this,n,i;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(i=n,i===r||!Qo(e.charCodeAt(i-1)))return Zo.call(t,e,n+1);for(;i>r&&Qo(e.charCodeAt(i-1));)i--;return i}function Qo(e){return s0(e)||c0(e)||e===l0||e===f0||e===D0||e===p0}});var us=x((r2,is)=>{"use strict";var h0=mr(),ts=Se(),ns=$e(),d0=rs();is.exports=xn;xn.locator=d0;xn.notInLink=!0;var m0=43,An=45,ot=46,F0=64,bn=95;function xn(e,r,t){var n=this,i=n.options.gfm,u=n.inlineTokenizers,a=0,o=r.length,s=-1,l,c,f,D;if(i){for(l=r.charCodeAt(a);ts(l)||ns(l)||l===m0||l===An||l===ot||l===bn;)l=r.charCodeAt(++a);if(a!==0&&l===F0){for(a++;a<o;){if(l=r.charCodeAt(a),ts(l)||ns(l)||l===An||l===ot||l===bn){a++,s===-1&&l===ot&&(s=a);continue}break}if(!(s===-1||s===a||l===An||l===bn))return l===ot&&a--,c=r.slice(0,a),t?!0:(D=n.enterLink(),n.inlineTokenizers={text:u.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=u,D(),e(c)({type:"link",title:null,url:"mailto:"+h0(c,{nonTerminated:!1}),children:f}))}}}});var ss=x((t2,os)=>{"use strict";var g0=$e(),E0=hn(),C0=cn().tag;os.exports=as;as.locator=E0;var v0="<",A0="?",b0="!",x0="/",y0=/^<a /i,w0=/^<\/a>/i;function as(e,r,t){var n=this,i=r.length,u,a;if(!(r.charAt(0)!==v0||i<3)&&(u=r.charAt(1),!(!g0(u)&&u!==A0&&u!==b0&&u!==x0)&&(a=r.match(C0),!!a)))return t?!0:(a=a[0],!n.inLink&&y0.test(a)?n.inLink=!0:n.inLink&&w0.test(a)&&(n.inLink=!1),e(a)({type:"html",value:a}))}});var yn=x((n2,cs)=>{"use strict";cs.exports=k0;function k0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t<n?t:n}});var ms=x((i2,ds)=>{"use strict";var br=se(),T0=yn();ds.exports=hs;hs.locator=T0;var B0=`
|
||||
`,_0="!",ls='"',fs="'",Ze="(",xr=")",wn="<",kn=">",Ds="[",yr="\\",O0="]",ps="`";function hs(e,r,t){var n=this,i="",u=0,a=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,m,p,h,F,g,E,v,A,b,d,y,w,C,k,T;if(a===_0&&(g=!0,i=a,a=r.charAt(++u)),a===Ds&&!(!g&&n.inLink)){for(i+=a,y="",u++,A=r.length,C=e.now(),d=0,C.column+=u,C.offset+=u;u<A;){if(a=r.charAt(u),h=a,a===ps){for(f=1;r.charAt(u+1)===ps;)h+=a,u++,f++;D?f>=D&&(D=0):D=f}else if(a===yr)u++,h+=r.charAt(u);else if((!D||l)&&a===Ds)d++;else if((!D||l)&&a===O0)if(d)d--;else{if(r.charAt(u+1)!==Ze)return;h+=Ze,c=!0,u++;break}y+=h,h="",u++}if(c){for(E=y,i+=y+h,u++;u<A&&(a=r.charAt(u),!!br(a));)i+=a,u++;if(a=r.charAt(u),y="",m=i,a===wn){for(u++,m+=wn;u<A&&(a=r.charAt(u),a!==kn);){if(s&&a===B0)return;y+=a,u++}if(r.charAt(u)!==kn)return;i+=wn+y+kn,w=y,u++}else{for(a=null,h="";u<A&&(a=r.charAt(u),!(h&&(a===ls||a===fs||s&&a===Ze)));){if(br(a)){if(!o)break;h+=a}else{if(a===Ze)d++;else if(a===xr){if(d===0)break;d--}y+=h,h="",a===yr&&(y+=yr,a=r.charAt(++u)),y+=a}u++}i+=y,w=y,u=i.length}for(y="";u<A&&(a=r.charAt(u),!!br(a));)y+=a,u++;if(a=r.charAt(u),i+=y,y&&(a===ls||a===fs||s&&a===Ze))if(u++,i+=a,y="",v=a===Ze?xr:a,p=i,s){for(;u<A&&(a=r.charAt(u),a!==v);)a===yr&&(y+=yr,a=r.charAt(++u)),u++,y+=a;if(a=r.charAt(u),a!==v)return;for(b=y,i+=y+a,u++;u<A&&(a=r.charAt(u),!!br(a));)i+=a,u++}else for(h="";u<A;){if(a=r.charAt(u),a===v)F&&(y+=v+h,h=""),F=!0;else if(!F)y+=a;else if(a===xr){i+=y+v+h,b=y;break}else br(a)?h+=a:(y+=v+h+a,h="",F=!1);u++}if(r.charAt(u)===xr)return t?!0:(i+=xr,w=n.decode.raw(n.unescape(w),e(m).test().end,{nonTerminated:!1}),b&&(p=e(p).test().end,b=n.decode.raw(n.unescape(b),p)),T={type:g?"image":"link",title:b||null,url:w},g?T.alt=n.decode.raw(n.unescape(E),C)||null:(k=n.enterLink(),T.children=n.tokenizeInline(E,C),k()),e(i)(T))}}}});var Es=x((u2,gs)=>{"use strict";var q0=se(),N0=yn(),P0=ln();gs.exports=Fs;Fs.locator=N0;var Tn="link",I0="image",S0="shortcut",L0="collapsed",Bn="full",R0="!",st="[",ct="\\",lt="]";function Fs(e,r,t){var n=this,i=n.options.commonmark,u=r.charAt(0),a=0,o=r.length,s="",l="",c=Tn,f=S0,D,m,p,h,F,g,E,v;if(u===R0&&(c=I0,l=u,u=r.charAt(++a)),u===st){for(a++,l+=u,g="",v=0;a<o;){if(u=r.charAt(a),u===st)E=!0,v++;else if(u===lt){if(!v)break;v--}u===ct&&(g+=ct,u=r.charAt(++a)),g+=u,a++}if(s=g,D=g,u=r.charAt(a),u===lt){if(a++,s+=u,g="",!i)for(;a<o&&(u=r.charAt(a),!!q0(u));)g+=u,a++;if(u=r.charAt(a),u===st){for(m="",g+=u,a++;a<o&&(u=r.charAt(a),!(u===st||u===lt));)u===ct&&(m+=ct,u=r.charAt(++a)),m+=u,a++;u=r.charAt(a),u===lt?(f=m?Bn:L0,g+=m+u,a++):m="",s+=g,g=""}else{if(!D)return;m=D}if(!(f!==Bn&&E))return s=l+s,c===Tn&&n.inLink?null:t?!0:(p=e.now(),p.column+=l.length,p.offset+=l.length,m=f===Bn?m:D,h={type:c+"Reference",identifier:P0(m),label:m,referenceType:f},c===Tn?(F=n.enterLink(),h.children=n.tokenizeInline(D,p),F()):h.alt=n.decode.raw(n.unescape(D),p)||null,e(s)(h))}}}});var vs=x((a2,Cs)=>{"use strict";Cs.exports=M0;function M0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n<t?n:t}});var ys=x((o2,xs)=>{"use strict";var U0=Le(),As=se(),Y0=vs();xs.exports=bs;bs.locator=Y0;var G0="\\",z0="*",W0="_";function bs(e,r,t){var n=this,i=0,u=r.charAt(i),a,o,s,l,c,f,D;if(!(u!==z0&&u!==W0||r.charAt(++i)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,i++,l="",u="",!(o&&As(r.charAt(i)))))for(;i<f;){if(D=u,u=r.charAt(i),u===s&&r.charAt(i+1)===s&&(!o||!As(D))&&(u=r.charAt(i+2),u!==s))return U0(l)?t?!0:(a=e.now(),a.column+=2,a.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,a)})):void 0;!o&&u===G0&&(l+=u,u=r.charAt(++i)),l+=u,i++}}});var ks=x((s2,ws)=>{"use strict";ws.exports=$0;var V0=String.fromCharCode,j0=/\w/;function $0(e){return j0.test(typeof e=="number"?V0(e):e.charAt(0))}});var Bs=x((c2,Ts)=>{"use strict";Ts.exports=H0;function H0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n<t?n:t}});var Ps=x((l2,Ns)=>{"use strict";var K0=Le(),X0=ks(),_s=se(),J0=Bs();Ns.exports=qs;qs.locator=J0;var Q0="*",Os="_",Z0="\\";function qs(e,r,t){var n=this,i=0,u=r.charAt(i),a,o,s,l,c,f,D;if(!(u!==Q0&&u!==Os)&&(o=n.options.pedantic,c=u,s=u,f=r.length,i++,l="",u="",!(o&&_s(r.charAt(i)))))for(;i<f;){if(D=u,u=r.charAt(i),u===s&&(!o||!_s(D))){if(u=r.charAt(++i),u!==s){if(!K0(l)||D===s)return;if(!o&&s===Os&&X0(u)){l+=s;continue}return t?!0:(a=e.now(),a.column++,a.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,a)}))}l+=s}!o&&u===Z0&&(l+=u,u=r.charAt(++i)),l+=u,i++}}});var Ss=x((f2,Is)=>{"use strict";Is.exports=em;function em(e,r){return e.indexOf("~~",r)}});var Ys=x((D2,Us)=>{"use strict";var Ls=se(),rm=Ss();Us.exports=Ms;Ms.locator=rm;var ft="~",Rs="~~";function Ms(e,r,t){var n=this,i="",u="",a="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==ft||r.charAt(1)!==ft||Ls(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(i=r.charAt(s),i===ft&&u===ft&&(!a||!Ls(a)))return t?!0:e(Rs+o+Rs)({type:"delete",children:n.tokenizeInline(o,c)});o+=u,aLine truncated
|
||||
`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Js=x((m2,Xs)=>{"use strict";var um=Hs();Xs.exports=Ks;Ks.locator=um;var am=" ",om=`
|
||||
`,sm=2;function Ks(e,r,t){for(var n=r.length,i=-1,u="",a;++i<n;){if(a=r.charAt(i),a===om)return i<sm?void 0:t?!0:(u+=a,e(u)({type:"break"}));if(a!==am)return;u+=a}}});var Zs=x((F2,Qs)=>{"use strict";Qs.exports=cm;function cm(e,r,t){var n=this,i,u,a,o,s,l,c,f,D,m;if(t)return!0;for(i=n.inlineMethods,o=i.length,u=n.inlineTokenizers,a=-1,D=r.length;++a<o;)f=i[a],!(f==="text"||!u[f])&&(c=u[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,r,1),l!==-1&&l<D&&(D=l));s=r.slice(0,D),m=e.now(),n.decode(s,m,p);function p(h,F,g){e(g||h)({type:"text",value:h})}}});var nc=x((g2,tc)=>{"use strict";var lm=Ie(),Dt=Eu(),fm=vu(),Dm=bu(),pm=Ju(),Nn=ea();tc.exports=ec;function ec(e,r){this.file=r,this.offset={},this.options=lm(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=fm(r).toOffset,this.unescape=Dm(this,"escape"),this.decode=pm(this)}var Y=ec.prototype;Y.setOptions=sa();Y.parse=xa();Y.options=Kt();Y.exitStart=Dt("atStart",!0);Y.enterList=Dt("inList",!1);Y.enterLink=Dt("inLink",!1);Y.enterBlock=Dt("inBlock",!1);Y.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];Y.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];Y.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];Y.blockTokenizers={blankLine:wa(),indentedCode:Oa(),fencedCode:Pa(),blockquote:Ua(),atxHeading:za(),thematicBreak:ja(),list:no(),setextHeading:oo(),html:po(),definition:bo(),table:wo(),paragraph:Bo()};Y.inlineTokenizers={escape:Io(),autoLink:Yo(),url:Jo(),email:us(),html:ss(),link:ms(),reference:Es(),strong:ys(),emphasis:Ps(),deletion:Ys(),code:js(),break:Js(),text:Zs()};Y.blockMethods=rc(Y.blockTokenizers);Y.inlineMethods=rc(Y.inlineTokenizers);Y.tokenizeBlock=Nn("block");Y.tokenizeInline=Nn("inline");Y.tokenizeFactory=Nn;function rc(e){var r=[],t;for(t in e)r.push(t);return r}});var oc=x((E2,ac)=>{"use strict";var hm=Fu(),dm=Ie(),ic=nc();ac.exports=uc;uc.Parser=ic;function uc(e){var r=this.data("settings"),t=hm(ic);t.prototype.options=dm(t.prototype.options,r,e),this.Parser=t}});var cc=x((C2,sc)=>{"use strict";sc.exports=mm;function mm(e){if(e)throw e}});var Pn=x((v2,lc)=>{lc.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var Ec=x((A2,gc)=>{"use strict";var pt=Object.prototype.hasOwnProperty,Fc=Object.prototype.toString,fc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,pc=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Fc.call(r)==="[object Array]"},hc=function(r){if(!r||Fc.call(r)!=="[object Object]")return!1;var t=pt.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&pt.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var i;for(i in r);return typeof i>"u"||pt.call(r,i)},dc=function(r,t){fc&&t.name==="__proto__"?fc(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},mc=function(r,t){if(t==="__proto__")if(pt.call(r,t)){if(Dc)return Dc(r,t).value}else return;return r[t]};gc.exports=function e(){var r,t,n,i,u,a,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(r=arguments[s],r!=null)for(t in r)n=mc(o,t),i=mc(r,t),o!==i&&(c&&i&&(hc(i)||(u=pc(i)))?(u?(u=!1,a=n&&pc(n)?n:[]):a=n&&hc(n)?n:{},dc(o,{name:t,newValue:e(c,a,i)})):typeof i<"u"&&dc(o,{name:t,newValue:i}));return o}});var vc=x((b2,Cc)=>{"use strict";Cc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var bc=x((x2,Ac)=>{"use strict";var Fm=[].slice;Ac.exports=gm;function gm(e,r){var t;return n;function n(){var a=Fm.call(arguments,0),o=e.length>a.length,s;o&&a.push(i);try{s=e.apply(null,a)}catch(l){if(o&&t)throw l;return i(l)}o||(s&&typeof s.then=="function"?s.then(u,i):s instanceof Error?i(s):u(s))}function i(){t||(t=!0,r.apply(null,arguments))}function u(a){i(null,a)}}});var Tc=x((y2,kc)=>{"use strict";var yc=bc();kc.exports=wc;wc.wrap=yc;var xc=[].slice;function wc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var i=-1,u=xc.call(arguments,0,-1),a=arguments[arguments.length-1];if(typeof a!="function")throw new Error("Expected function as last argument, not "+a);o.apply(null,[null].concat(u));function o(s){var l=e[++i],c=xc.call(arguments,0),f=c.slice(1),D=u.length,m=-1;if(s){a(s);return}for(;++m<D;)(f[m]===null||f[m]===void 0)&&(f[m]=u[m]);u=f,l?yc(l,o).apply(null,u):a.apply(null,[null].concat(u))}}funct
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(W(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=ql([...Br].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var gt=class extends Error{name="InvalidDocError";constructor(r){super(Nl(r)),this.doc=r}},Be=gt;var $n={};function Pl(e,r,t,n){let i=[e];for(;i.length>0;){let u=i.pop();if(u===$n){t(i.pop());continue}t&&i.push(u,$n);let a=W(u);if(!a)throw new Be(u);if(r?.(u)!==!1)switch(a){case j:case J:{let o=a===j?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)i.push(o[l]);break}case Q:i.push(u.flatContents,u.breakContents);break;case X:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)i.push(u.expandedStates[s]);else i.push(u.contents);break;case re:case ee:case pe:case me:case he:i.push(u.contents);break;case V:case be:case De:case de:case $:case te:break;default:throw new Be(u)}}}var Hn=Pl;function Il(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let a=i(u);return t.set(u,a),a}function i(u){switch(W(u)){case j:return r(u.map(n));case J:return r({...u,parts:u.parts.map(n)});case Q:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case X:{let{expandedStates:a,contents:o}=u;return a?(a=a.map(n),o=a[0]):o=n(o),r({...u,contents:o,expandedStates:a})}case re:case ee:case pe:case me:case he:return r({...u,contents:n(u.contents)});case V:case be:case De:case de:case $:case te:return r(u);default:throw new Be(u)}}}function Kn(e){if(e.length>0){let r=U(0,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Xn(e){let r=new Set,t=[];function n(u){if(u.type===te&&Kn(t),u.type===X){if(t.push(u),r.has(u))return!1;r.add(u)}}function i(u){u.type===X&&t.pop().break&&Kn(t)}Hn(e,n,i,!0)}function xe(e,r=nr){return Il(e,t=>typeof t=="string"?_r(r,t.split(`
|
||||
`)):t)}var ne=tr,Or=tr,Jn=tr,Qn=tr;function ir(e){return ne(e),{type:ee,contents:e}}function Fe(e,r){return Qn(e),ne(r),{type:re,contents:r,n:e}}function ur(e){return Fe({type:"root"},e)}var Ue={type:te};function Ye(e){return Jn(e),{type:J,parts:e}}function Ge(e,r={}){return ne(e),Or(r.expandedStates,!0),{type:X,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function Zn(e,r="",t={}){return ne(e),r!==""&&ne(r),{type:Q,breakContents:e,flatContents:r,groupId:t.groupId}}function _r(e,r){ne(e),Or(r);let t=[];for(let n=0;n<r.length;n++)n!==0&&t.push(e),t.push(r[n]);return t}var qr={type:$},Nr={type:$,soft:!0},ar={type:$,hard:!0},M=[ar,Ue],Sl={type:$,hard:!0,literal:!0},nr=[Sl,Ue];var Ll="cr",Rl="crlf";var Ml="\r",Ul=`\r
|
||||
`,Yl=`
|
||||
`,Gl=Yl;function ei(e){return e===Ll?Ml:e===Rl?Ul:Gl}var ri=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?R(0,A,`
|
||||
`,i):A;b&&(o+=b,a.length>0&&(u+=or(b)));break}case j:for(let b=A.length-1;b>=0;b--)a.push({indent:E,mode:v,doc:A[b]});break;case be:if(c.length>=2)throw new Error("There are too many 'cursor' in doc.");c.push(m+o.length);break;case ee:a.push({indent:ui(E,r),mode:v,doc:A.contents});break;case re:a.push({indent:ii(E,A.n,r),mode:v,doc:A.contents});break;case De:g();break;case X:switch(v){case ue:if(!s){a.push({indent:E,mode:A.break?H:ue,doc:A.contents});break}case H:{s=!1;let b={indent:E,mode:ue,doc:A.contents},d=n-u,y=l.length>0;if(!A.break&&Pr(b,a,d,y,t))a.push(b);else if(A.expandedStates){let w=U(0,A.expandedStates,-1);if(A.break){a.push({indent:E,mode:H,doc:w});break}else for(let C=1;C<A.expandedStates.length+1;C++)if(C>=A.expandedStates.length){a.push({indent:E,mode:H,doc:w});break}else{let k=A.expandedStates[C],T={indent:E,mode:ue,doc:k};if(Pr(T,a,d,y,t)){a.push(T);break}}}else a.push({indent:E,mode:H,doc:A.contents});break}}A.id&&(t[A.id]=U(0,a,-1).mode);break;case J:{let b=n-u,d=A[bt]??0,{parts:y}=A,w=y.length-d;if(w===0)break;let C=y[d+0],k=y[d+1],T={indent:E,mode:ue,doc:C},B={indent:E,mode:H,doc:C},_=Pr(T,[],b,l.length>0,t,!0);if(w===1){_?a.push(T):a.push(B);break}let S={indent:E,mode:ue,doc:k},P={indent:E,mode:H,doc:k};if(w===2){_?a.push(S,T):a.push(P,B);break}let N=y[d+2],O={indent:E,mode:v,doc:{...A,[bt]:d+2}},le=Pr({indent:E,mode:ue,doc:[C,k,N]},[],b,l.length>0,t,!0);a.push(O),le?a.push(S,T):_?a.push(P,T):a.push(P,B);break}case Q:case pe:{let b=A.groupId?t[A.groupId]:v;if(b===H){let d=A.type===Q?A.breakContents:A.negate?A.contents:ir(A.contents);d&&a.push({indent:E,mode:v,doc:d})}if(b===ue){let d=A.type===Q?A.flatContents:A.negate?ir(A.contents):A.contents;d&&a.push({indent:E,mode:v,doc:d})}break}case he:l.push({indent:E,mode:v,doc:A.contents});break;case de:l.length>0&&a.push({indent:E,mode:v,doc:ar});break;case $:switch(v){case ue:if(A.hard)s=!0;else{A.soft||(o+=" ",u+=1);break}case H:if(l.length>0){a.push({indent:E,mode:v,doc:A},...l.reverse()),l.length=0;break}A.literal?(o+=i,u=0,E.root&&(E.root.value&&(o+=E.root.value),u=E.root.length)):(g(),o+=i+E.value,u=E.length);break}break;case me:a.push({indent:E,mode:v,doc:A.contents});break;case te:break;default:throw new Be(A)}a.length===0&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=f.join("")+o,h=[...D,...c];if(h.length!==2)return{formatted:p};let F=h[0];return{formatted:p,cursorNodeStart:F,cursorNodeText:p.slice(F,U(0,h,-1))};function g(){let{text:E,count:v}=At(o);E&&(f.push(E),m+=E.length),o="",u-=v,c.length>0&&(D.push(...c.map(A=>Math.min(A,m))),c.length=0)}}function Kl(e,r){let t=e.matchAll(new RegExp(`(?:${fe(r)})+`,"gu"));return t.reduce||(t=[...t]),t.reduce((n,[i])=>Math.max(n,i.length),0)/r.length}var Ir=Kl;function Xl(e,r){let t=e.match(new RegExp(`(${fe(r)})+`,"gu"));if(t===null)return 1;let n=new Map,i=0;for(let u of t){let a=u.length/r.length;n.set(a,!0),a>i&&(i=a)}for(let u=1;u<i;u++)if(!n.get(u))return u;return i+1}var oi=Xl;var si=Object.freeze({character:"'",codePoint:39}),ci=Object.freeze({character:'"',codePoint:34}),Jl=Object.freeze({preferred:si,alternate:ci}),Ql=Object.freeze({preferred:ci,alternate:si});function Zl(e,r){let{preferred:t,alternate:n}=r===!0||r==="'"?Jl:Ql,{length:i}=e,u=0,a=0;for(let o=0;o<i;o++){let s=e.charCodeAt(o);s===t.codePoint?u++:s===n.codePoint&&a++}return(u>a?n:t).character}var li=Zl;var xt=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},fi=xt;var bi=Re(Tr(),1);var ef=Array.prototype.toReversed??function(){return[...this].reverse()},rf=Me("toReversed",function(){if(Array.isArray(this))return ef}),Di=rf;function tf(){let e=globalThis,r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}var nf=tf();function pi(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function uf(e){return e=pi(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function af(e){e=pi(e);let r=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(r=`\\\\${e.hostname}${r}`),r}function yt(e){return nf?af(e):uf(e)}var hi=e=>String(e).split(/[/\\]/u).pop(),di=e=>String(e).startsWith("file:");function mi(e,r){if(!r)return;let t=hi(r).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===t))??e.find(({extensions:n})=>n?.some(i=>t.endsWith(i)))}function of(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t?.includes(r))??e.find(({extensions:t})=>t?.includes(`.${r}`))}var sf=void 0;function Fi(e,r){if(r){if(di(r))try{r=yt(r)}catch{return}if(typeof r=="string")return e.find(({isSupported:t})=>t?.({filepath:r}))}}function cf(e,r){let t=Di(0,e.plugins).flatMap(i=>i.languages??[]);return(
Line truncated
|
||||
`,sr);if(t===-1)return;let n=e.slice(sr,t).trim(),i=e.indexOf(`
|
||||
${r}`,t),u=n;if(u||(u=r==="+++"?"toml":"yaml"),i===-1&&r==="---"&&u==="yaml"&&(i=e.indexOf(`
|
||||
...`,t)),i===-1)return;let a=i+1+sr,o=e.charAt(a+1);if(!/\s?/u.test(o))return;let s=e.slice(0,a),l;return{language:u,explicitLanguage:n||null,value:e.slice(t+1,i),startDelimiter:r,endDelimiter:s.slice(-sr),raw:s,start:{line:1,column:0,index:0},end:{index:s.length,get line(){return l??(l=s.split(`
|
||||
`)),l.length},get column(){return l??(l=s.split(`
|
||||
`)),U(0,l,-1).length}},[Sr]:!0}}function Df(e){let r=ff(e);return r?{frontMatter:r,get content(){let{raw:t}=r;return R(0,t,/[^\n]/gu," ")+e.slice(t.length)}}:{content:e}}var _e=Df;var gi="format";var Ei=/<!--\s*@(?:noformat|noprettier)\s*-->|\{\s*\/\*\s*@(?:noformat|noprettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:noformat|noprettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/mu,Ci=/<!--\s*@(?:format|prettier)\s*-->|\{\s*\/\*\s*@(?:format|prettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:format|prettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/mu;var Lr=e=>_e(e).content.trimStart().match(Ci)?.index===0,vi=e=>_e(e).content.trimStart().match(Ei)?.index===0,Ai=e=>{let{frontMatter:r}=_e(e),t=`<!-- @${gi} -->`;return r?`${r.raw}
|
||||
|
||||
${t}
|
||||
|
||||
${e.slice(r.end.index)}`:`${t}
|
||||
|
||||
${e}`};var pf=new Set(["position","raw"]);function xi(e,r,t){if((e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=R(0,e.value,`
|
||||
`," ")),e.type==="wikiLink"&&(r.value=R(0,e.value.trim(),/[\t\n]+/gu," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,bi.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=R(0,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=R(0,e.title,/\\(?=["')])/gu,"")),t?.type==="root"&&t.children.length>0&&(t.children[0]===e||kt(t.children[0])&&t.children[1]===e)&&e.type==="html"&&Lr(e.value))return null}xi.ignoredProperties=pf;var yi=xi;var wi=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{16ff2}-\u{16ff6}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b81d}\u{2b820}-\u{2cead}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{33479}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u,Oe=/(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u;var qe=e=>e.position.start.offset,Ne=e=>e.position.end.offset;var Tt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Rr=new Set([...Tt,"tableCell","paragraph","heading"]),We="non-cjk",ae="cj-letter",Pe="k-letter",cr="cjk-punctuation",hf=/\p{Script_Extensions=Hangul}/u;function Mr(e){let r=[],t=e.split(/([\t\n ]+)/u);for(let[i,u]of t.entries()){if(i%2===1){r.push({type:"whitespace",value:/\n/u.test(u)?`
|
||||
`:" "});continue}if((i===0||i===t.length-1)&&u==="")continue;let a=u.split(new RegExp(`(${wi.source})`,"u"));for(let[o,s]of a.entries())if(!((o===0||o===a.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:We,isCJ:!1,hasLeadingPunctuation:Oe.test(s[0]),hasTrailingPunctuation:Oe.test(U(0,s,-1))});continue}if(Oe.test(s)){n({type:"word",value:s,kind:cr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(hf.test(s)){n({type:"word",value:s,kind:Pe,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:ae,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(i){let u=U(0,r,-1);u?.type==="word"&&!a(We,cr)&&![u.value,i.value].some(o=>/\u3000/u.test(o))&&r.push({type:"whitespace",value:""}),r.push(i);function a(o,s){return u.kind===o&&i.kind===s||u.kind===s&&i.kind===o}}}function ze(e,r){let t=r.originalText.slice(e.position.start.offset,e.position.end.offset),{numberText:n,leadingSpaces:i}=t.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/u).groups;return{number:Number(n),leadingSpaces:i}}function ki(e,r){return!e.ordered||e.children.length<2||ze(e.children[1],r).number!==1?!1:ze(e.children[0],r).number!==0?!0:e.children.length>2&&ze(e.children[2],r).number===1}function Ur(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(`
|
||||
`)&&r.endsWith(`
|
||||
`)?t.slice(0,-1):t}function ye(e,r){return(function t(n,i,u){let a={...r(n,i,u)};return a.children&&(a.children=a.children.map((o,s)=>t(o,s,[a,...u]))),a})(e,null,[])}function Yr(e){if(e?.type!=="link"||e.children.length!==1)return!1;let[r]=e.children;return qe(e)===qe(r)&&Ne(e)===Ne(r)}function lr(e){let r;if(e.type==="html")r=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/u))}return r?r[1]||"next":!1}function Gr(e,r){return t(e,r,n=>n.ordered===e.ordered);function t(n,i,u){let a=-1;for(let o of i.children)if(o.type===n.type&&u(o)?a++:a=-1,o===n)return a}}function df(e,r){let{node:t}=e;switch(t.type){case"code":{let{lang:n}=t;if(!n)return;let i;return n==="angular-ts"?i=wt(r,{language:"typescript"}):n==="angular-html"?i="angular":i=wt(r,{language:n}),i?async u=>{let a={parser:i};n==="ts"||n==="typescript"?a.filepath="dummy.ts":n==="tsx"&&(a.filepath="dummy.tsx");let o=await u(Ur(t,r.originalText),a),s=r.__inJsTemplate?"~":"`",l=s.repeat(Math.max(3,Ir(t.value,s)+1));return ur([l,t.lang,t.meta?" "+t.meta:"",M,xe(o),M,l])}:void 0}case"import":case"export":return n=>n(t.value,{__onHtmlBindingRoot:i=>mf(i,t.type),parser:"babel"});case"jsx":return n=>n(`<$>${t.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}function mf(e,r){let{program:{body:t}}=e;if(!t.every(n=>n.type==="ImportDeclaration"||n.type==="ExportDefaultDeclaration"||n.type==="ExportNamedDeclaration"))throw new Error(`Unexpected '${r}' in MDX.`)}var Ti=df;var fr=null;function Dr(e){if(fr!==null&&typeof fr.property){let r=fr;return fr=Dr.prototype=null,r}return fr=Dr.prototype=e??Object.create(null),new Dr}var Ff=10;for(let e=0;e<=Ff;e++)Dr();function Bt(e){return Dr(e)}function gf(e,r="type"){Bt(e);function t(n){let i=n[r],u=e[i];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return u}return t}var Bi=gf;var q=[["children"],[]],_i={root:q[0],paragraph:q[0],sentence:q[0],word:q[1],whitespace:q[1],emphasis:q[0],strong:q[0],delete:q[0],inlineCode:q[1],wikiLink:q[1],link:q[0],image:q[1],blockquote:q[0],heading:q[0],code:q[1],html:q[1],list:q[0],thematicBreak:q[1],linkReference:q[0],imageReference:q[1],definition:q[1],footnote:q[0],footnoteReference:q[1],footnoteDefinition:q[0],table:q[0],tableCell:q[0],break:q[1],liquidNode:q[1],import:q[1],export:q[1],esComment:q[1],jsx:q[1],math:q[1],inlineMath:q[1],tableRow:q[0],listItem:q[0],text:q[1]};var Ef=Bi(_i),Oi=Ef;function z(e,r,t,n={}){let{processor:i=t}=n,u=[];return e.each(()=>{let a=i(e);a!==!1&&(u.length>0&&Cf(e)&&(u.push(M),(Af(e,r)||qi(e))&&u.push(M),qi(e)&&u.push(M)),u.push(a))},"children"),u}function Cf({node:e,parent:r}){let t=Tt.has(e.type),n=e.type==="html"&&Rr.has(r.type);return!t&&!n}var vf=new Set(["listItem","definition"]);function Af({node:e,previous:r,parent:t},n){if(Ni(r,n)||e.type==="list"&&t.type==="listItem"&&r.type==="code")return!0;let u=r.type===e.type&&vf.has(e.type),a=t.type==="listItem"&&(e.type==="list"||!Ni(t,n)),o=lr(r)==="next",s=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,l=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(u||a||o||s||l)}function qi({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function Ni(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===`
|
||||
`)}function Ii(e,r,t){let{node:n}=e,i=Gr(n,e.parent),u=ki(n,r);return z(e,r,t,{processor(){let a=s(),{node:o}=e;if(o.children.length===2&&o.children[1].type==="html"&&o.children[0].position.start.column!==o.children[1].position.start.column)return[a,Pi(e,r,t,a)];return[a,Fe(" ".repeat(a.length),Pi(e,r,t,a))];function s(){let l=n.ordered?(e.isFirst?n.start:u?1:n.start+e.index)+(i%2===0?". ":") "):i%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?bf(l,r):l}}})}function Pi(e,r,t,n){let{node:i}=e,u=i.checked===null?"":i.checked?"[x] ":"[ ] ";return[u,z(e,r,t,{processor({node:a,isFirst:o}){if(o&&a.type!=="list")return Fe(" ".repeat(u.length),t());let s=" ".repeat(xf(r.tabWidth-n.length,0,3));return[s,Fe(s,t())]}})]}function bf(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let i=e.length%r.tabWidth;return i===0?0:r.tabWidth-i}}function xf(e,r,t){return Math.max(r,Math.min(e,t))}function Si(e,r,t){let{node:n}=e,i=[],u=e.map(()=>e.map(({index:f})=>{let D=ai(t(),r).formatted,m=or(D);return i[f]=Math.max(i[f]??3,m),{text:D,width:m}},"children"),"children"),a=s(!1);if(r.proseWrap!=="never")return[Ue,a];let o=s(!0);return[Ue,Ge(Zn(o,a))];function s(f){return _r(ar,[c(u[0],f),l(f),...u.slice(1).map(D=>c(D,f))].map(D=>`| ${D.join(" | ")} |`))}function l(f){return i.map((D,m)=>{let p=n.align[m],h=p==="center"||p==="left"?":":"-",F=p==="center"||p==="right"?":":"-",g=f?"-":"-".repeat(D-2);return`${h}${g}${F}`})}function c(f,D){return f.map(({text:m,width:p},h)=>{if(D)return m;let F=i[h]-p,g=n.align[h],E=0;g==="right"?E=F:g==="center"&&(E=Math.floor(F/2));let v=F-E;return`${" ".repeat(E)}${m}${" ".repeat(v)}`})}}function Li(e){let{node:r}=e,t=R(0,R(0,r.value,"*","\\*"),new RegExp([`(^|${Oe.source})(_+)`,`(_+)(${Oe.source}|$)`].join("|"),"gu"),(u,a,o,s,l)=>R(0,o?`${a}${o}`:`${s}${l}`,"_","\\_")),n=(u,a,o)=>u.type==="sentence"&&o===0,i=(u,a,o)=>Yr(u.children[o-1]);return t!==r.value&&(e.match(void 0,n,i)||e.match(void 0,n,(u,a,o)=>u.type==="emphasis"&&o===0,i))&&(t=t.replace(/^(\\?[*_])+/u,u=>R(0,u,"\\",""))),t}function Ri(e,r,t){let n=e.map(t,"children");return yf(n)}function yf(e){let r=[""];return(function t(n){for(let i of n){let u=W(i);if(u===j){t(i);continue}let a=i,o=[];u===J&&([a,...o]=i.parts),r.push([r.pop(),a],...o)}})(e),Ye(r)}var _t=class{#e;constructor(r){this.#e=new Set(r)}getLeadingWhitespaceCount(r){let t=this.#e,n=0;for(let i=0;i<r.length&&t.has(r.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(r){let t=this.#e,n=0;for(let i=r.length-1;i>=0&&t.has(r.charAt(i));i--)n++;return n}getLeadingWhitespace(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(0,t)}getTrailingWhitespace(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(r.length-t)}hasLeadingWhitespace(r){return this.#e.has(r.charAt(0))}hasTrailingWhitespace(r){return this.#e.has(U(0,r,-1))}trimStart(r){let t=this.getLeadingWhitespaceCount(r);return r.slice(t)}trimEnd(r){let t=this.getTrailingWhitespaceCount(r);return r.slice(0,r.length-t)}trim(r){return this.trimEnd(this.trimStart(r))}split(r,t=!1){let n=`[${fe([...this.#e].join(""))}]+`,i=new RegExp(t?`(${n})`:n,"u");return r.split(i)}hasWhitespaceCharacter(r){let t=this.#e;return Array.prototype.some.call(r,n=>t.has(n))}hasNonWhitespaceCharacter(r){let t=this.#e;return Array.prototype.some.call(r,n=>!t.has(n))}isWhitespaceOnly(r){let t=this.#e;return Array.prototype.every.call(r,n=>t.has(n))}#r(r){let t=Number.POSITIVE_INFINITY;for(let n of r.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<t&&(t=i)}return t===Number.POSITIVE_INFINITY?0:t}dedentString(r){let t=this.#r(r);return t===0?r:r.split(`
|
||||
`).map(n=>n.slice(t)).join(`
|
||||
`)}},Mi=_t;var wf=[" ",`
|
||||
`,"\f","\r"," "],kf=new Mi(wf),Ot=kf;var Tf=/^\\?.$/su,Bf=/^\n *>[ >]*$/u;function _f(e,r){return e=Of(e,r),e=Nf(e),e=If(e,r),e=Sf(e,r),e=Pf(e),e}function Of(e,r){return ye(e,t=>{if(t.type!=="text")return t;let{value:n}=t;if(n==="*"||n==="_"||!Tf.test(n)||t.position.end.offset-t.position.start.offset===n.length)return t;let i=r.originalText.slice(t.position.start.offset,t.position.end.offset);return Bf.test(i)?t:{...t,value:i}})}function qf(e,r,t){return ye(e,n=>{if(!n.children)return n;let i=[],u,a;for(let o of n.children)u&&r(u,o)?(o=t(u,o),i.splice(-1,1,o),a||(a=!0)):i.push(o),u=o;return a?{...n,children:i}:n})}function Nf(e){return qf(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Pf(e){return ye(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:i}=r;return n.type==="paragraph"&&(t===0&&(i=Ot.trimStart(i)),t===n.children.length-1&&(i=Ot.trimEnd(i))),{type:"sentence",position:r.position,children:Mr(i)}})}function If(e,r){return ye(e,(t,n,i)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let a=0;a<i.length;a++){let o=i[a];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return t})}function Sf(e,r){return ye(e,(i,u,a)=>{if(i.type==="list"&&i.children.length>0){for(let o=0;o<a.length;o++){let s=a[o];if(s.type==="list"&&!s.isAligned)return i.isAligned=!1,i}i.isAligned=n(i)}return i});function t(i){return i.children.length===0?-1:i.children[0].position.start.column-1}function n(i){if(!i.ordered)return!0;let[u,a]=i.children;if(ze(u,r).leadingSpaces.length>1)return!0;let s=t(u);if(s===-1)return!1;if(i.children.length===1)return s%r.tabWidth===0;let l=t(a);return s!==l?!1:s%r.tabWidth===0?!0:ze(a,r).leadingSpaces.length>1}}var Ui=_f;function Yi(e,r){let t=[""];return e.each(()=>{let{node:n}=e,i=r();switch(n.type){case"whitespace":if(W(i)!==V){t.push(i,"");break}default:t.push([t.pop(),i])}},"children"),Ye(t)}var Lf=new Set(["heading","tableCell","link","wikiLink"]),Gi=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Rf({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;n<t.length-1;++n){let i=t[n];if(i.type==="whitespace"&&(i.value===" "||i.value==="")){let u=t[n-1].kind,a=t[n+1].kind;(u===ae&&a===We||u===We&&a===ae)&&++r[i.value]}}e.usesCJSpaces=r[" "]>r[""]}return e.usesCJSpaces}function Mf(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let i=t.kind,u=n.kind;return zi(i)&&zi(u)||i===Pe&&u===ae||u===Pe&&i===ae?!0:i===cr||u===cr||i===ae&&u===ae?!1:Gi.has(n.value[0])||Gi.has(U(0,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Rf(e)}function zi(e){return e===We||e===Pe}function Uf(e,r,t,n){if(t!=="always"||e.hasAncestor(a=>Lf.has(a.type)))return!1;if(n)return r!=="";let{previous:i,next:u}=e;return!i||!u?!0:r===""?!1:i.kind===Pe&&u.kind===ae||u.kind===Pe&&i.kind===ae?!0:!(i.isCJ||u.isCJ)}function qt(e,r,t,n){if(t==="preserve"&&r===`
|
||||
`)return M;let i=r===" "||r===`
|
||||
`&&Mf(e,n);return Uf(e,r,t,n)?i?qr:Nr:i?" ":""}function Wi(e){let{previous:r,next:t}=e;return r?.type==="sentence"&&U(0,r.children,-1)?.type==="word"&&!U(0,r.children,-1).hasTrailingPunctuation||t?.type==="sentence"&&t.children[0]?.type==="word"&&!t.children[0].hasLeadingPunctuation}function Yf(e,r,t){let{node:n}=e;if(zf(e)){let i=[""],u=Mr(r.originalText.slice(n.position.start.offset,n.position.end.offset));for(let a of u){if(a.type==="word"){i.push([i.pop(),a.value]);continue}let o=qt(e,a.value,r.proseWrap,!0);if(W(o)===V){i.push([i.pop(),o]);continue}i.push(o,"")}return Ye(i)}switch(n.type){case"root":return n.children.length===0?"":[Gf(e,r,t),M];case"paragraph":return Ri(e,r,t);case"sentence":return Yi(e,t);case"word":return Li(e);case"whitespace":{let{next:i}=e,u=i&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value)?"never":r.proseWrap;return qt(e,n.value,u)}case"emphasis":{let i;if(Yr(n.children[0]))i=r.originalText[n.position.start.offset];else{let u=Wi(e),a=e.callParent(({node:o})=>o.type==="strong"&&Wi(e));i=u||a||e.hasAncestor(o=>o.type==="emphasis")?"*":"_"}return[i,z(e,r,t),i]}case"strong":return["**",z(e,r,t),"**"];case"delete":return["~~",z(e,r,t),"~~"];case"inlineCode":{let i=r.proseWrap==="preserve"?n.value:R(0,n.value,`
|
||||
`," "),u=oi(i,"`"),a="`".repeat(u),o=i.startsWith("`")||i.endsWith("`")||/^[\n ]/u.test(i)&&/[\n ]$/u.test(i)&&/[^\n ]/u.test(i)?" ":"";return[a,o,i,o,a]}case"wikiLink":{let i="";return r.proseWrap==="preserve"?i=n.value:i=R(0,n.value,/[\t\n]+/gu," "),["[[",i,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let i="mailto:";return["<",n.url.startsWith(i)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+i.length)!==i?n.url.slice(i.length):n.url,">"]}case"[":return["[",z(e,r,t),"](",Nt(n.url,")"),zr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),zr(n.title,r),")"];case"blockquote":return["> ",Fe("> ",z(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",z(e,r,t)];case"code":{if(n.isIndented){let a=" ".repeat(4);return Fe(a,[a,xe(n.value,M)])}let i=r.__inJsTemplate?"~":"`",u=i.repeat(Math.max(3,Ir(n.value,i)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",M,xe(Ur(n,r.originalText),M),M,u]}case"html":{let{parent:i,isLast:u}=e,a=i.type==="root"&&u?n.value.trimEnd():n.value,o=/^<!--.*-->$/su.test(a);return xe(a,o?M:ur(nr))}case"list":return Ii(e,r,t);case"thematicBreak":{let{ancestors:i}=e,u=i.findIndex(o=>o.type==="list");return u===-1?"---":Gr(i[u],i[u+1])%2===0?"***":"---"}case"linkReference":return["[",z(e,r,t),"]",n.referenceType==="full"?Pt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Pt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let i=r.proseWrap==="always"?qr:" ";return Ge([Pt(n),":",ir([i,Nt(n.url),n.title===null?"":[i,zr(n.title,r,!1)]])])}case"footnote":return["[^",z(e,r,t),"]"];case"footnoteReference":return ji(n);case"footnoteDefinition":{let i=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[ji(n),": ",i?z(e,r,t):Ge([Fe(" ".repeat(4),z(e,r,t,{processor:({isFirst:u})=>u?Ge([Nr,t()]):t()}))])]}case"table":return Si(e,r,t);case"tableCell":return z(e,r,t);case"break":return/\s/u.test(r.originalText[n.position.start.offset])?[" ",ur(nr)]:["\\",M];case"liquidNode":return xe(n.value,M);case"import":case"export":case"jsx":return n.value.trimEnd();case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",M,n.value?[xe(n.value,M),M]:"","$$"];case"inlineMath":return r.originalText.slice(qe(n),Ne(n));case"frontMatter":case"tableRow":case"listItem":case"text":default:throw new fi(n,"Markdown")}}function Gf(e,r,t){let n=[],i=null,{children:u}=e.node;for(let[a,o]of u.entries())switch(lr(o)){case"start":i===null&&(i={index:a,offset:o.position.end.offset});break;case"end":i!==null&&(n.push({start:i,end:{index:a,offset:o.position.start.offset}}),i=null);break;default:break}return z(e,r,t,{processor({index:a}){if(n.length>0){let o=n[0];if(a===o.start.index)return[Vi(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),Vi(u[o.end.index])];if(o.start.index<a&&a<o.end.index)return!1;if(a===o.end.index)return n.shift(),!1}return t()}})}function Vi(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function zf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var Wf=(e,r)=>{for(let t of r)e=R(0,e,t,encodeURIComponent(t));return e};function Nt(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>fe(n)).join("|"),"u").test(e)?`<${Wf(e,"<>")}>`:e}function zr(e,r,t=!0){if(!e)return"";if(t)return" "+zr(e,r,!1);if(e=R(0,e,/\\(?=["')])/gu,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=li(e,r.singleQuote);return e=R(0,e,"\\","\\\\"),e=R(0,e,n,`\\${n}`),`${n}${e}${n}`}function Vf(e){return e.index>0&&lr(e.previous)==="next"}function Pt(e){return`[${(0,$i.default)(e.label)}]`}function ji(e){return`[^${e.label}]`}var jf={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:Ui,print:Yf,embed:Ti,massageAstNode:yi,hasPrettierIgnore:Vf,insertPragma:Ai,getVisitorKeys:Oi},Hi=jf;var Ki=[{name:"Markdown",type:"prose",aceMode:"markdown",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",aceMode:"markdown",extensions:[".mdx"],filenames:[],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}];vLine truncated
|
||||
|
||||
`),n=t===-1?r:r.slice(0,t);if(il(n))return e(n)({type:nl(n)?"export":"import",value:n})};zn.notInBlock=!0;zn.locator=e=>il(e)?-1:1;var ul=(e,r)=>{let t=nF.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};ul.locator=(e,r)=>e.indexOf("{",r);var al=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:i}=e.prototype;r.esSyntax=zn,n.esComment=ul,t.splice(t.indexOf("paragraph"),0,"esSyntax"),i.splice(i.indexOf("text"),0,"esComment")};var uF=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let{frontMatter:i}=_e(n);if(i)return t(i.raw)({...i,type:"frontMatter"})}r.onlyAtStart=!0},ol=uF;function aF(){return e=>ye(e,(r,t,[n])=>r.type!=="html"||tl.test(r.value)||Rr.has(n.type)?r:{...r,type:"jsx"})}var sl=aF;var oF=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,i){let u=i.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,i){return n.indexOf("{",i)}},cl=oF;var sF=function(){let e="wikiLink",r=/^\[\[(?<linkContents>.+?)\]\]/su,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=i;function i(u,a){let o=r.exec(a);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}i.locator=function(u,a){return u.indexOf("[",a)}},ll=sF;function ml({isMDX:e}){return r=>{let t=(0,dl.default)().use(hl.default,{commonmark:!0,...e&&{blocks:[rl]}}).use(Dl.default).use(ol).use(pl.default).use(e?al:fl).use(cl).use(e?sl:fl).use(ll);return t.run(t.parse(r))}}function fl(){}var Fl={astFormat:"mdast",hasPragma:Lr,hasIgnorePragma:vi,locStart:qe,locEnd:Ne},cF={...Fl,parse:ml({isMDX:!1})},lF={...Fl,parse:ml({isMDX:!0})};var fF={mdast:Hi};export{gl as default,Ki as languages,Xi as options,Wn as parsers,fF as printers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
meriyah: Parser;
|
||||
};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var Ue=Object.defineProperty;var q2=Object.getOwnPropertyDescriptor;var P2=Object.getOwnPropertyNames;var O2=Object.prototype.hasOwnProperty;var mt=(e,t)=>{for(var n in t)Ue(e,n,{get:t[n],enumerable:!0})},V2=(e,t,n,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P2(t))!O2.call(e,o)&&o!==n&&Ue(e,o,{get:()=>t[o],enumerable:!(u=q2(t,o))||u.enumerable});return e};var R2=e=>V2(Ue({},"__esModule",{value:!0}),e);var Gu={};mt(Gu,{parsers:()=>gt});var gt={};mt(gt,{meriyah:()=>Zu});var Q=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var M2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},v2=Q("replaceAll",function(){if(typeof this=="string")return M2}),p=v2;var U2=55296,J2=56319,_2=56320,X2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===U2&&(n>J2||++t>=e||(this.charCodeAt(t)&64512)!==_2))return!1}return!0},j2=Q("isWellFormed",function(){if(typeof this=="string")return X2}),rt=j2;var Ct=((e,t)=>{let n=new Uint32Array(69632),u=0,o=0;for(;u<2597;){let i=e[u++];if(i<0)o-=i;else{let l=e[u++];i&2&&(l=t[l]),i&1?n.fill(l,o,o+=e[u++]):n[o++]=l}}return n})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,61,2,62,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,63,2,0,0,4294836735,0,3221225471,0,4294901942,2,64,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,58,2,7,2,6,0,4286643967,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,929054175,0,65487,0,4294828015,0,4092591615,0,1885355487,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,69,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,70,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,9,2,0,2,15,2,22,3,0,10,2,72,2,0,2,73,2,74,2,75,2,0,2,76,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,77,2,5,3,0,2,2,78,0,2151677951,2,29,2,10,0,909311,3,0,2,0,814743551,2,48,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,108,2,51,2,0,2,79,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,9,2,18,3,0,2,2,53,0,1046528,3,0,3,2,10,2,0,2,127,0,4294960127,2,9,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,80,2,9,2,0,2,81,2,82,2,83,0,12288,2,54,0,1048577,2,84,2,14,-1,2,14,0,131042,2,85,2,86,2,87,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,88,2,2,0,-16,2,89,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,49,2,0,-1,2,17,-16,3,0,206,-2,3,0,692,2,71,-1,2,17,2,9,3,0,8,2,91,2,18,2,0,0,3220242431,3,0,3,2,19,2,92,2,93,3,0,2,2,94,2,0,2,20,2,95,2,0,0,4351,2,0,2,10,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,10,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,99,2,100,2,22,2,23,3,0,3,0,67057663,3,0,349,2,101,2,102,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,103,2,104,3,0,2,2,19,2,105,3,0,10,2,9,2,17,2,0,2,46,2,0,2,31,2,106,2,25,0,1638399,0,57344,2,107,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,109,-1,2,110,2,111,2,112,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,65,2,6,2,12,2,9,2,0,2,113,-1,3,0,4,2,9,2,23,2,114,2,7,2,0,2,115,2,0,2,116,2,117,2,118,2,0,2,10,3,0,9,2,21,2,30,2,31,2,119,2,120,-2,2,121,2,122,2,30,2,21,2,8,-2,2,123,2,30,3,32,2,-1,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,47,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,125,0,4227858432,2,20,2,43,2,36,2,17,2,37,2,17,2,124,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,145,2,0,2,56,2,55,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,59,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,133,0,4190109695,2,52,-2,2,134,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,66,2,17,2,0,2,42,-3,2,31,-2,2,0,2,45,2,57,2,44,2,45,2,135,2,46,0,8388351,-2,2,136,0,3028287487,2,47,2,138,0,33259519,2,23,2,7,2,48,-7,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,67,-2,3,0,28,2,32,-3,3,0,3,2,49,3,0,6,2,50,-81,2,17,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-1,2,140,2Line truncated
|
||||
`);return t.length>1&&t.every(n=>n.trimStart()[0]==="*")}var ct=new WeakMap;function Iu(e){return ct.has(e)||ct.set(e,Lu(e)),ct.get(e)}var st=Iu;function qu(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&J(u)===H(t)&&st(u)&&st(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[H(u),J(t)]),!l2(u)&&!fe(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}var c2=qu;function Pu(e){return e!==null&&typeof e=="object"}var s2=Pu;var ye=null;function Ae(e){if(ye!==null&&typeof ye.property){let t=ye;return ye=Ae.prototype=null,t}return ye=Ae.prototype=e??Object.create(null),new Ae}var Ou=10;for(let e=0;e<=Ou;e++)Ae();function dt(e){return Ae(e)}function Vu(e,t="type"){dt(e);function n(u){let o=u[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return n}var d2=Vu;var s=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],a2={AccessorProperty:s[0],AnyTypeAnnotation:s[1],ArgumentPlaceholder:s[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:s[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:s[3],AsExpression:s[4],AssignmentExpression:s[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:s[6],BigIntLiteral:s[1],BigIntLiteralTypeAnnotation:s[1],BigIntTypeAnnotation:s[1],BinaryExpression:s[5],BindExpression:["object","callee"],BlockStatement:s[7],BooleanLiteral:s[1],BooleanLiteralTypeAnnotation:s[1],BooleanTypeAnnotation:s[1],BreakStatement:s[8],CallExpression:s[9],CatchClause:["param","body"],ChainExpression:s[3],ClassAccessorProperty:s[0],ClassBody:s[10],ClassDeclaration:s[11],ClassExpression:s[11],ClassImplements:s[12],ClassMethod:s[13],ClassPrivateMethod:s[13],ClassPrivateProperty:s[14],ClassProperty:s[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:s[15],ConditionalExpression:s[16],ConditionalTypeAnnotation:s[17],ContinueStatement:s[8],DebuggerStatement:s[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:s[18],DeclareEnum:s[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:s[20],DeclareFunction:["id","predicate"],DeclareHook:s[21],DeclareInterface:s[22],DeclareModule:s[19],DeclareModuleExports:s[23],DeclareNamespace:s[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:s[24],DeclareVariable:s[21],Decorator:s[3],Directive:s[18],DirectiveLiteral:s[1],DoExpression:s[10],DoWhileStatement:s[25],EmptyStatement:s[1],EmptyTypeAnnotation:s[1],EnumBigIntBody:s[26],EnumBigIntMember:s[27],EnumBooleanBody:s[26],EnumBooleanMember:s[27],EnumDeclaration:s[19],EnumDefaultedMember:s[21],EnumNumberBody:s[26],EnumNumberMember:s[27],EnumStringBody:s[26],EnumStringMember:s[27],EnumSymbolBody:s[26],ExistsTypeAnnotation:s[1],ExperimentalRestProperty:s[6],ExperimentalSpreadProperty:s[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:s[28],ExportNamedDeclaration:s[20],ExportNamespaceSpecifier:s[28],ExportSpecifier:["local","exported"],ExpressionStatement:s[3],File:["program"],ForInStatement:s[29],ForOfStatement:s[29],ForStatement:["init","test","update","body"],FunctionDeclaration:s[30],FunctionExpression:s[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(k2,"").trimEnd();let u=Object.create(null),o=p(0,e,y2,"").replace(k2,"").trimEnd(),i;for(;i=y2.exec(e);){let l=p(0,i[2],_u,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...Hu,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var b2=["noformat","noprettier"],D2=["format","prettier"];function zu(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var C2=zu;function E2(e){let t=C2(e);t&&(e=e.slice(t.length+1));let n=A2(e),{pragmas:u,comments:o}=T2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function w2(e){let{pragmas:t}=E2(e);return D2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function S2(e){let{pragmas:t}=E2(e);return b2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function Ku(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:w2,hasIgnorePragma:S2,locStart:H,locEnd:J,...e}}var B2=Ku;var F2="module";var N2="commonjs",L2=[F2,N2];function I2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return F2;if(/\.(?:cjs|cts)$/iu.test(e))return N2}}var $u={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function Wu(e,t){let n=[],u=t2(e,{...$u,sourceType:t,onComment:n});return u.comments=n,u}function Yu(e){let{description:t,loc:n}=e;return n?n2(t,{loc:{start:{line:n.start.line,column:n.start.column+1},end:{line:n.end.line,column:n.end.column+1}},cause:e}):e}function Qu(e,t){let n=I2(t?.filepath),u=(n?[n]:L2).map(i=>()=>Wu(e,i)),o;try{o=u2(u)}catch({errors:[i]}){throw Yu(i)}return h2(o,{parser:"meriyah",text:e})}var Zu=B2(Qu);return R2(Gu);});
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
var q2=Object.defineProperty;var gt=(e,t)=>{for(var n in t)q2(e,n,{get:t[n],enumerable:!0})};var I2={};gt(I2,{parsers:()=>at});var at={};gt(at,{meriyah:()=>$u});var Q=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var P2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},O2=Q("replaceAll",function(){if(typeof this=="string")return P2}),p=O2;var V2=55296,R2=56319,M2=56320,v2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===V2&&(n>R2||++t>=e||(this.charCodeAt(t)&64512)!==M2))return!1}return!0},U2=Q("isWellFormed",function(){if(typeof this=="string")return v2}),mt=U2;var Dt=((e,t)=>{let n=new Uint32Array(69632),u=0,o=0;for(;u<2597;){let i=e[u++];if(i<0)o-=i;else{let l=e[u++];i&2&&(l=t[l]),i&1?n.fill(l,o,o+=e[u++]):n[o++]=l}}return n})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,61,2,62,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,63,2,0,0,4294836735,0,3221225471,0,4294901942,2,64,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,58,2,7,2,6,0,4286643967,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,929054175,0,65487,0,4294828015,0,4092591615,0,1885355487,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,69,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,70,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,9,2,0,2,15,2,22,3,0,10,2,72,2,0,2,73,2,74,2,75,2,0,2,76,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,77,2,5,3,0,2,2,78,0,2151677951,2,29,2,10,0,909311,3,0,2,0,814743551,2,48,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,108,2,51,2,0,2,79,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,9,2,18,3,0,2,2,53,0,1046528,3,0,3,2,10,2,0,2,127,0,4294960127,2,9,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,80,2,9,2,0,2,81,2,82,2,83,0,12288,2,54,0,1048577,2,84,2,14,-1,2,14,0,131042,2,85,2,86,2,87,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,88,2,2,0,-16,2,89,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,49,2,0,-1,2,17,-16,3,0,206,-2,3,0,692,2,71,-1,2,17,2,9,3,0,8,2,91,2,18,2,0,0,3220242431,3,0,3,2,19,2,92,2,93,3,0,2,2,94,2,0,2,20,2,95,2,0,0,4351,2,0,2,10,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,10,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,99,2,100,2,22,2,23,3,0,3,0,67057663,3,0,349,2,101,2,102,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,103,2,104,3,0,2,2,19,2,105,3,0,10,2,9,2,17,2,0,2,46,2,0,2,31,2,106,2,25,0,1638399,0,57344,2,107,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,109,-1,2,110,2,111,2,112,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,65,2,6,2,12,2,9,2,0,2,113,-1,3,0,4,2,9,2,23,2,114,2,7,2,0,2,115,2,0,2,116,2,117,2,118,2,0,2,10,3,0,9,2,21,2,30,2,31,2,119,2,120,-2,2,121,2,122,2,30,2,21,2,8,-2,2,123,2,30,3,32,2,-1,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,47,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,125,0,4227858432,2,20,2,43,2,36,2,17,2,37,2,17,2,124,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,145,2,0,2,56,2,55,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,59,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,133,0,4190109695,2,52,-2,2,134,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,66,2,17,2,0,2,42,-3,2,31,-2,2,0,2,45,2,57,2,44,2,45,2,135,2,46,0,8388351,-2,2,136,0,3028287487,2,47,2,138,0,33259519,2,23,2,7,2,48,-7,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,67,-2,3,0,28,2,32,-3,3,0,3,2,49,3,0,6,2,50,-81,2,17,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-1,2,140,2,10,-1,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,8323099,3,0,230,2,30,2,54,2,8,-3,3,0,3,2,35,-271,2,141,3,0,9,2,142,2,143,2,55,3,0,11,2,7,-72,3,0,3,2,144,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,56,2,0,2,146,2,147,2,60,2,0,2,148,2,149,2,150,3,0,10,2,151,2,152,2,22,3,56,2,3,153,2,3,57,2,0,4294954999,2,0,-16,2,0,2,90,2,0,0,2105343,0,4160749584,0,65534,-34,2,8,2,155,-6,0,4194303871,0,4294903771,2,0,2,58,2,98,-3,2,0,0,1073684479,0,17407,-9,2,17,2,49,2,0,2,32,-14,2,17,2,32,-6,2,17,2,12,-6,2,8,0,3225419775,-7,2,156,3,0,6,0,8323103,-1,3,0,2,2,59,-37,2,60,2,157,2,158,2,159,2,160,2,161,-105,2,26,-32,3,0,1335,-1,3,0,136,2,9,3,0,180,2,24,3,0,233,2,162,3,0,18,2,9,-7Line truncated
|
||||
`);return t.length>1&&t.every(n=>n.trimStart()[0]==="*")}var ft=new WeakMap;function Bu(e){return ft.has(e)||ft.set(e,Su(e)),ft.get(e)}var ct=Bu;function Fu(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&J(u)===H(t)&&ct(u)&&ct(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[H(u),J(t)]),!o2(u)&&!fe(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}var f2=Fu;function Nu(e){return e!==null&&typeof e=="object"}var c2=Nu;var ye=null;function Ae(e){if(ye!==null&&typeof ye.property){let t=ye;return ye=Ae.prototype=null,t}return ye=Ae.prototype=e??Object.create(null),new Ae}var Lu=10;for(let e=0;e<=Lu;e++)Ae();function st(e){return Ae(e)}function Iu(e,t="type"){st(e);function n(u){let o=u[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return n}var s2=Iu;var s=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],d2={AccessorProperty:s[0],AnyTypeAnnotation:s[1],ArgumentPlaceholder:s[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:s[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:s[3],AsExpression:s[4],AssignmentExpression:s[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:s[6],BigIntLiteral:s[1],BigIntLiteralTypeAnnotation:s[1],BigIntTypeAnnotation:s[1],BinaryExpression:s[5],BindExpression:["object","callee"],BlockStatement:s[7],BooleanLiteral:s[1],BooleanLiteralTypeAnnotation:s[1],BooleanTypeAnnotation:s[1],BreakStatement:s[8],CallExpression:s[9],CatchClause:["param","body"],ChainExpression:s[3],ClassAccessorProperty:s[0],ClassBody:s[10],ClassDeclaration:s[11],ClassExpression:s[11],ClassImplements:s[12],ClassMethod:s[13],ClassPrivateMethod:s[13],ClassPrivateProperty:s[14],ClassProperty:s[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:s[15],ConditionalExpression:s[16],ConditionalTypeAnnotation:s[17],ContinueStatement:s[8],DebuggerStatement:s[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:s[18],DeclareEnum:s[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:s[20],DeclareFunction:["id","predicate"],DeclareHook:s[21],DeclareInterface:s[22],DeclareModule:s[19],DeclareModuleExports:s[23],DeclareNamespace:s[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:s[24],DeclareVariable:s[21],Decorator:s[3],Directive:s[18],DirectiveLiteral:s[1],DoExpression:s[10],DoWhileStatement:s[25],EmptyStatement:s[1],EmptyTypeAnnotation:s[1],EnumBigIntBody:s[26],EnumBigIntMember:s[27],EnumBooleanBody:s[26],EnumBooleanMember:s[27],EnumDeclaration:s[19],EnumDefaultedMember:s[21],EnumNumberBody:s[26],EnumNumberMember:s[27],EnumStringBody:s[26],EnumStringMember:s[27],EnumSymbolBody:s[26],ExistsTypeAnnotation:s[1],ExperimentalRestProperty:s[6],ExperimentalSpreadProperty:s[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:s[28],ExportNamedDeclaration:s[20],ExportNamespaceSpecifier:s[28],ExportSpecifier:["local","exported"],ExpressionStatement:s[3],File:["program"],ForInStatement:s[29],ForOfStatement:s[29],ForStatement:["init","test","update","body"],FunctionDeclaration:s[30],FunctionExpression:s[30],FunctionTypeAnnotation:["typeParameters","this","params"
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(h2,"").trimEnd();let u=Object.create(null),o=p(0,e,k2,"").replace(h2,"").trimEnd(),i;for(;i=k2.exec(e);){let l=p(0,i[2],Mu,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...Ju,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var T2=["noformat","noprettier"],b2=["format","prettier"];function _u(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var D2=_u;function C2(e){let t=D2(e);t&&(e=e.slice(t.length+1));let n=y2(e),{pragmas:u,comments:o}=A2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function E2(e){let{pragmas:t}=C2(e);return b2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function w2(e){let{pragmas:t}=C2(e);return T2.some(n=>Object.prototype.hasOwnProperty.call(t,n))}function Xu(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:E2,hasIgnorePragma:w2,locStart:H,locEnd:J,...e}}var S2=Xu;var B2="module";var F2="commonjs",N2=[B2,F2];function L2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return B2;if(/\.(?:cjs|cts)$/iu.test(e))return F2}}var ju={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function Hu(e,t){let n=[],u=e2(e,{...ju,sourceType:t,onComment:n});return u.comments=n,u}function zu(e){let{description:t,loc:n}=e;return n?t2(t,{loc:{start:{line:n.start.line,column:n.start.column+1},end:{line:n.end.line,column:n.end.column+1}},cause:e}):e}function Ku(e,t){let n=L2(t?.filepath),u=(n?[n]:N2).map(i=>()=>Hu(e,i)),o;try{o=n2(u)}catch({errors:[i]}){throw zu(i)}return r2(o,{parser:"meriyah",text:e})}var $u=S2(Ku);export{I2 as default,at as parsers};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
css: Parser;
|
||||
less: Parser;
|
||||
scss: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
postcss: Printer;
|
||||
};
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var bl=Object.create;var bt=Object.defineProperty;var El=Object.getOwnPropertyDescriptor;var Sl=Object.getOwnPropertyNames;var kl=Object.getPrototypeOf,Tl=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sn=(t,e)=>{for(var s in e)bt(t,s,{get:e[s],enumerable:!0})},nn=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Sl(e))!Tl.call(t,n)&&n!==s&&bt(t,n,{get:()=>e[n],enumerable:!(r=El(e,n))||r.enumerable});return t};var Te=(t,e,s)=>(s=t!=null?bl(kl(t)):{},nn(e||!t||!t.__esModule?bt(s,"default",{value:t,enumerable:!0}):s,t)),Al=t=>nn(bt({},"__esModule",{value:!0}),t);var Ci=w((lx,os)=>{var x=String,Oi=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};os.exports=Oi();os.exports.createColors=Oi});var as=w(()=>{});var jt=w((px,Ri)=>{"use strict";var Ni=Ci(),Pi=as(),st=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Ni.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:h,red:c}=Ni.createColors(!0);n=g=>f(c(g)),r=g=>h(g),Pi&&(i=g=>Pi(g))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;return o.slice(u,a).map((f,h)=>{let c=u+1+h,g=" "+(" "+c).slice(-l)+" | ";if(c===this.line){if(f.length>160){let d=20,p=Math.max(0,this.column-d),m=Math.max(this.column+d,this.endColumn+d),y=f.slice(p,m),v=r(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return n(">")+r(g)+i(y)+`
|
||||
`+v+n("^")}let b=r(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(g)+i(f)+`
|
||||
`+b+n("^")}return" "+r(g)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};Ri.exports=st;st.default=st});var Ht=w((hx,qi)=>{"use strict";var Ii={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Rc(t){return t[0].toUpperCase()+t.slice(1)}var nt=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(s+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let s=e.nodes.length-1;for(;s>0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,s!==n||r)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+s+e.text+r+"*/",e)}decl(e,s){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),s&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Ii[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Rc(r);this[u]?n=this[u](o,e):o.walk(a=>{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Ii[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};qi.exports=nt;nt.default=nt});var it=w((dx,Li)=>{"use strict";var Ic=Ht();function us(t,e){new Ic(e).stringify(t)}Li.exports=us;us.default=us});var Kt=w((mx,ls)=>{"use strict";ls.exports.isClean=Symbol("isClean");ls.exports.my=Symbol("my")});var ut=w((yx,Di)=>{"use strict";var qc=jt(),Lc=Ht(),Dc=it(),{isClean:ot,my:Mc}=Kt();function cs(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>cs(o,s)):(i==="object"&&n!==null&&(n=cs(n)),s[r]=n)}return s}function ee(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var at=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ot]=!1,this[Mc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=cs(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new qc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[ot]=!0}markDirty(){if(this[ot]){this[ot]=!1;let e=this;for(;e=e.parent;)e[ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ee(r,this.source.start),ee(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=ee(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:ee(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:ee(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(ee(s,this.source.start),ee(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:ee(s,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:ee(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new Lc().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Dc){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Di.exports=at;at.default=at});var Me=w((gx,Mi)=>{"use strict";var Bc=ut(),lt=class extends Bc{constructor(e){super(e),this.type="comment"}};Mi.exports=lt;lt.default=lt});var ft=w((wx,Bi)=>{"use strict";var Uc=ut(),ct=class extends Uc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Bi.exports=ct;ct.default=ct});var fe=w((vx,ji)=>{"use strict";var Ui=Me(),Fi=ft(),Fc=ut(),{isClean:$i,my:Wi}=Kt(),fs,Gi,Yi,ps;function Vi(t){return t.map(e=>(e.nodes&&(e.nodes=Vi(e.nodes)),delete e.source,e))}function zi(t){if(t[$i]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)zi(e)}var z=class t extends Fc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=Vi(Gi
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[ms]=s,s}var Be=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!eo||/^\w+:\/\//.test(s.from)||ys(s.from)?this.file=s.from:this.file=gs(s.from)),eo&&Hc){let r=new jc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Yc(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,l;if(s&&typeof s=="object"){let h=s,c=r;if(typeof h.offset=="number"){a=h.offset;let g=this.fromOffset(a);s=g.line,r=g.col}else s=h.line,r=h.column,a=this.fromLineAndColumn(s,r);if(typeof c.offset=="number"){u=c.offset;let g=this.fromOffset(u);o=g.line,i=g.col}else o=c.line,i=c.column,u=this.fromLineAndColumn(c.line,c.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let h=this.fromOffset(a);s=h.line,r=h.col}let f=this.origin(s,r,o,i);return f?l=new Zi(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):l=new Zi(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),l.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(Qt&&(l.input.url=Qt(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,s){return to(this)[e-1]+s-1}fromOffset(e){let s=to(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;ys(o.source)?a=Qt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Qt(this.map.mapFile));let l={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ji)l.file=Ji(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(l.source=f),l}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};ro.exports=Be;Be.default=Be;ds&&ds.registerInput&&ds.registerInput(Be)});var Xt=w((Tx,no)=>{"use strict";var so=fe(),Fe=class extends so{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};no.exports=Fe;Fe.default=Fe;so.registerAtRule(Fe)});var $e=w((Ax,uo)=>{"use strict";var io=fe(),oo,ao,pe=class extends io{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new oo(new ao,this,e).stringify()}};pe.registerLazyResult=t=>{oo=t};pe.registerProcessor=t=>{ao=t};uo.exports=pe;pe.default=pe;io.registerRoot(pe)});var ws=w((Ox,lo)=>{"use strict";var pt={comma(t){return pt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return pt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",l=!1;for(let f of t)l?l=!1:f==="\\"?l=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};lo.exports=pt;pt.default=pt});var Jt=w((Cx,fo)=>{"use strict";var co=fe(),Kc=ws(),We=class extends co{get selectors(){return Kc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};fo.exports=We;We.default=We;co.registerRule(We)});var tr=w((Nx,ho)=>{"use strict";var Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,er=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qc=/.[\r\n"'(/\\]/,po=/[\da-f]/i;ho.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,l,f,h,c,g,b,d=r.length,p=0,m=[],y=[];function v(){return p}function O(W){throw e.error("Unclosed "+W,p)}function q(){return y.length===0&&p>=d}function H(W){if(y.length)return y.pop();if(p>=d)return;let A=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(p),i){case 10:case 32:case 9:case 13:case 12:{a=p;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(p,a)],p=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let k=String.fromCharCode(i);f=[k,k,p];break}case 40:{if(b=m.length?m.pop()[1]:"",g=r.charCodeAt(p+1),b==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(n||A){a=p;break}else O("bracket");for(c=a;r.charCodeAt(c-1)===92;)c-=1,h=!h}while(h);f=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||Qc.test(o)?f=["(","(",p]:(f=["brackets",o,p,a],p=a);break}case 39:case 34:{l=i===39?"'":'"',a=p;do{if(h=!1,a=r.indexOf(l,a+1),a===-1)if(n||A){a=p+1;break}else O("string");for(c=a;r.charCodeAt(c-1)===92;)c-=1,h=!h}while(h);f=["string",r.slice(p,a+1),p,a],p=a;break}case 64:{Zt.lastIndex=p+1,Zt.test(r),Zt.lastIndex===0?a=r.length-1:a=Zt.lastIndex-2,f=["at-word",r.slice(p,a+1),p,a],p=a;break}case 92:{for(a=p,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,po.test(r.charAt(a)))){for(;po.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(p,a+1),p,a],p=a;break}default:{i===47&&r.charCodeAt(p+1)===42?(a=r.indexOf("*/",p+2)+1,a===0&&(n||A?a=r.length:O("comment")),f=["comment",r.slice(p,a+1),p,a],p=a):(er.lastIndex=p+1,er.test(r),er.lastIndex===0?a=r.length-1:a=er.lastIndex-2,f=["word",r.slice(p,a+1),p,a],m.push(f),p=a);break}}return p++,f}function ne(W){y.push(W)}return{back:ne,endOfFile:q,nextToken:H,position:v}}});var rr=w((Px,go)=>{"use strict";var Xc=Xt(),Jc=Me(),Zc=ft(),ef=$e(),mo=Jt(),tf=tr(),yo={empty:!0,space:!0};function rf(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var vs=class{constructor(e){this.input=e,this.root=new ef,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Xc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Jc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=tf(this.input)}decl(e,s){let r=new Zc;this.init(r,e[0][2]);let n=e[e.
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new uf(n),this.tokenizer=af(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),xs.exports.isInlineComment.bind(this)(t)}return!1}}});var _o=w((qx,xo)=>{xo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Eo=w((Lx,bo)=>{var lf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,cf=/\.[0-9]/,ff=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&lf.test(e)===!1&&cf.test(e)===!1};bo.exports={isMixinToken:ff}});var ko=w((Dx,So)=>{var pf=tr(),hf=/^url\((.+)\)/;So.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=pf({css:s});for(t.filename=s.replace(hf,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Co=w((Mx,Oo)=>{var To=/:$/,Ao=/^:(\s+)?/;Oo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(To.test(e)){let[r]=e.match(To);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(Ao.test(s)){let[r]=s.match(Ao);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Ro=w((Ux,Po)=>{var df=Me(),mf=rr(),{isInlineComment:yf}=vo(),{interpolation:No}=_o(),{isMixinToken:gf}=Eo(),wf=ko(),vf=Co(),xf=/(!\s*important)$/i;Po.exports=class extends mf{constructor(...e){super(...e),this.lastNode=null}atrule(e){No.bind(this)(e)||(super.atrule(e),wf(this.lastNode),vf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new df,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(l=>l[0]==="brackets"),i=e.findIndex(l=>l[0]==="("),o="";if((n<0||n>3)&&i>0){let l=e.reduce((v,O,q)=>O[0]===")"?q:v),h=e.slice(i,l+i).map(v=>v[1]).join(""),[c]=e.slice(i),g=[c[2],c[3]],[b]=e.slice(l,l+1),d=[b[2],b[3]],p=["brackets",h].concat(g,d),m=e.slice(0,i),y=e.slice(l+1);e=m,e.push(p),e=e.concat(y)}let u=[];for(let l of e)if((l[1]==="!"||u.length)&&u.push(l),l[1]==="important")break;if(u.length){let[l]=u,f=e.indexOf(l),h=u[u.length-1],c=[l[2],l[3]],g=[h[4],h[5]],d=["word",u.map(p=>p[1]).join("")].concat(c,g);e.splice(f,u.length,d)}let a=e.findIndex(l=>xf.test(l[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let l of e.reverse())this.tokenizer.back(l);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){yf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),No.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(gf(s)){this.mixin(e);return}super.unknownWord(e)}}});var qo=w(($x,Io)=>{var _f=Ht();Io.exports=class extends _f{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Lo=w((Wx,_s)=>{var bf=Ue(),Ef=Ro(),Sf=qo();_s.exports={parse(t,e){let s=new bf(t,e),r=new Ef(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Os().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return S([n(a)]).process(o,u)},n};S.stringify=ap;S.parse=ip;S.fromJSON=ep;S.list=sp;S.comment=t=>new ta(t);S.atRule=t=>new ea(t);S.decl=t=>new ra(t);S.rule=t=>new ia(t);S.root=t=>new na(t);S.document=t=>new sa(t);S.CssSyntaxError=Zf;S.Declaration=ra;S.Container=Jf;S.Processor=Os;S.Document=sa;S.Comment=ta;S.Warning=up;S.AtRule=ea;S.Result=op;S.Input=tp;S.Rule=ia;S.Root=na;S.Node=np;rp.registerPostcss(S);oa.exports=S;S.default=S});var ua=w((r_,aa)=>{var{Container:lp}=or(),Cs=class extends lp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};aa.exports=Cs});var fa=w((s_,ca)=>{"use strict";var ar=/[\t\n\f\r "#'()/;[\\\]{}]/g,ur=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cp=/.[\r\n"'(/\\]/,la=/[\da-f]/i,lr=/[\n\f\r]/g;ca.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,l,f,h,c,g,b=r.length,d=0,p=[],m=[],y;function v(){return d}function O(A){throw e.error("Unclosed "+A,d)}function q(){return m.length===0&&d>=b}function H(){let A=1,k=!1,N=!1;for(;A>0;)o+=1,r.length<=o&&O("interpolation"),i=r.charCodeAt(o),c=r.charCodeAt(o+1),k?!N&&i===k?(k=!1,N=!1):i===92?N=!N:N&&(N=!1):i===39||i===34?k=i:i===125?A-=1:i===35&&c===123&&(A+=1)}function ne(A){if(m.length)return m.pop();if(d>=b)return;let k=A?A.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{o=d;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);g=["space",r.slice(d,o)],d=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let N=String.fromCharCode(i);g=[N,N,d];break}case 44:{g=["word",",",d,d+1];break}case 40:{if(h=p.length?p.pop()[1]:"",c=r.charCodeAt(d+1),h==="url"&&c!==39&&c!==34){for(y=1,f=!1,o=d+1;o<=r.length-1;){if(c=r.charCodeAt(o),c===92)f=!f;else if(c===40)y+=1;else if(c===41&&(y-=1,y===0))break;o+=1}a=r.slice(d,o+1),g=["brackets",a,d,o],d=o}else o=r.indexOf(")",d+1),a=r.slice(d,o+1),o===-1||cp.test(a)?g=["(","(",d]:(g=["brackets",a,d,o],d=o);break}case 39:case 34:{for(u=i,o=d,f=!1;o<b&&(o++,o===b&&O("string"),i=r.charCodeAt(o),c=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&c===123&&H();g=["string",r.slice(d,o+1),d,o],d=o;break}case 64:{ar.lastIndex=d+1,ar.test(r),ar.lastIndex===0?o=r.length-1:o=ar.lastIndex-2,g=["at-word",r.slice(d,o+1),d,o],d=o;break}case 92:{for(o=d,l=!0;r.charCodeAt(o+1)===92;)o+=1,l=!l;if(i=r.charCodeAt(o+1),l&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,la.test(r.charAt(o)))){for(;la.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}g=["word",r.slice(d,o+1),d,o],d=o;break}default:c=r.charCodeAt(d+1),i===35&&c===123?(o=d,H(),a=r.slice(d,o+1),g=["word",a,d,o],d=o):i===47&&c===42?(o=r.indexOf("*/",d+2)+1,o===0&&(n||k?o=r.length:O("comment")),g=["comment",r.slice(d,o+1),d,o],d=o):i===47&&c===47?(lr.lastIndex=d+1,lr.test(r),lr.lastIndex===0?o=r.length-1:o=lr.lastIndex-2,a=r.slice(d,o+1),g=["comment",a,d,o,"inline"],d=o):(ur.lastIndex=d+1,ur.test(r),ur.lastIndex===0?o=r.length-1:o=ur.lastIndex-2,g=["word",r.slice(d,o+1),d,o],p.push(g),d=o);break}return d++,g}function W(A){m.push(A)}return{back:W,endOfFile:q,nextToken:ne,position:v}}});var ha=w((n_,pa)=>{var{Comment:fp}=or(),pp=rr(),hp=ua(),dp=fa(),Ns=class extends pp{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new fp;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=dp(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new hp;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let l=this.stringFrom(e,a);l=this.spacesFromEnd(e)+l,l!==" !important"&&(i.raws.important=l);break}else if(u[1]==="important"){let l=e.slice(0),f="";for(let h=a;h>0;h--){let c=l[h][0];if(f.trim().indexOf("!")===0&&c!=="space")break;f=l.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=l)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};pa.exports=Ns});var ma=w((i_,da)=>{var{Input:mp}=or(),yp=ha();da.exports=function(e,s){let r=new mp(e,s),n=new yp(r);return n.parse(),n.root}});var Rs=w(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});function vp(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Ps.default=vp});var qs=w(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var xp=Rs(),ga=_p(xp);function _p(t){return t&&t.__esModule?t:{default:t}}function vt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}vt.prototype=Object.create(ga.default.prototype);vt.constructor=ga.default;vt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};vt.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};Is.default=vt});var _a=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.parseMediaFeature=xa;xt.parseMediaQuery=Ds;xt.parseMediaList=Sp;var bp=Rs(),wa=va(bp),Ep=qs(),Ls=va(Ep);function va(t){return t&&t.__esModule?t:{default:t}}function xa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,l=t;t[0]==="("&&t[t.length-1]===")"&&(l=t.substring(1,t.length-1),a++);for(var f=0;f<l.length;f++){var h=l[f];if((h==="'"||h==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:h}),n++):s[n].mode==="string"&&s[n].character===h&&l[f-1]!=="\\"&&(s.pop(),n--)),h==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):h==="}"&&(s.pop(),n--),s[n].mode==="normal"&&h===":"){var c=l.substring(f+1);u={type:"value",before:/^(\s*)/.exec(c)[1],after:/(\s*)$/.exec(c)[1],value:c.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=h}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Ds(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=xa(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new Ls.default(i):new wa.default(i)),i=o(),n=!1)}for(var l=0;l<s.length;l++)if(i=s[l],l>0&&(s[l-1].after=i.before),i.type===void 0){if(l>0){if(s[l-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[l-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=p+u,h=n-o[u].length):(f=p,h=d),e.push(["comment",a,p,m-d,f,n-h,m]),d=h,p=f,m=n):(Or.lastIndex=m+1,Or.test(s),Or.lastIndex===0?n=s.length-1:n=Or.lastIndex-2,e.push(["word",s.slice(m,n+1),p,m-d,p,n-d,m]),m=n);break}m++}return e}fu.exports=Cr.default});var mu=w((Nr,du)=>{"use strict";Nr.__esModule=!0;var rm=(function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}})(),sm=Us(),nm=I(sm),im=Fs(),js=I(im),om=$s(),am=I(om),um=Ra(),lm=I(um),cm=qa(),Hs=I(cm),fm=Ma(),pm=I(fm),hm=Ua(),dm=I(hm),mm=$a(),ym=I(mm),gm=Ga(),wm=I(gm),vm=Va(),xm=I(vm),_m=ja(),bm=I(_m),Em=Ka(),Sm=I(Em),km=Xa(),Tm=I(km),Am=Za(),Om=I(Am),Cm=tu(),Nm=I(Cm),Pm=su(),Rm=I(Pm),Im=pu(),hu=I(Im),qm=B(),Lm=Dm(qm);function Dm(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function Mm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Bm=(function(){function t(e){Mm(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new lm.default;var s=new Hs.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,hu.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,hu.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new Sm.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),l=a[0].trim();r.value=this.lossy?l:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=l[0]==="'"||l[0]==='"',r.raws.unquoted=r.quoted?l.slice(1,-1):l}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new Om.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new Hs.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new dm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new Nm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===Lm.PSEUDO){var r=new Hs.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var F=w((M_,xu)=>{"use strict";var zm=j(),Ve=class extends zm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};Ve.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Ve.prototype[e]&&(Ve.prototype[e]=function(s){return this.walkType(t,s)})};xu.exports=Ve});var bu=w((U_,_u)=>{"use strict";var jm=F();_u.exports=class extends jm{constructor(e){super(e),this.type="root"}}});var Su=w(($_,Eu)=>{"use strict";var Hm=F();Eu.exports=class extends Hm{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var Au=w((W_,Tu)=>{"use strict";var ku=F(),Rr=class extends ku{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};ku.registerWalker(Rr);Tu.exports=Rr});var Cu=w((G_,Ou)=>{"use strict";var Km=F(),Qm=j(),Ir=class extends Qm{constructor(e){super(e),this.type="colon"}};Km.registerWalker(Ir);Ou.exports=Ir});var Pu=w((Y_,Nu)=>{"use strict";var Xm=F(),Jm=j(),qr=class extends Jm{constructor(e){super(e),this.type="comma"}};Xm.registerWalker(qr);Nu.exports=qr});var Iu=w((V_,Ru)=>{"use strict";var Zm=F(),ey=j(),Lr=class extends ey{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Zm.registerWalker(Lr);Ru.exports=Lr});var Du=w((z_,Lu)=>{"use strict";var qu=F(),Dr=class extends qu{constructor(e){super(e),this.type="func",this.unbalanced=-1}};qu.registerWalker(Dr);Lu.exports=Dr});var Bu=w((j_,Mu)=>{"use strict";var ty=F(),ry=j(),Mr=class extends ry{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};ty.registerWalker(Mr);Mu.exports=Mr});var Fu=w((H_,Uu)=>{"use strict";var sy=F(),ny=j(),Br=class extends ny{constructor(e){super(e),this.type="operator"}};sy.registerWalker(Br);Uu.exports=Br});var Wu=w((K_,$u)=>{"use strict";var iy=F(),oy=j(),Ur=class extends oy{constructor(e){super(e),this.type="paren",this.parenType=""}};iy.registerWalker(Ur);$u.exports=Ur});var Yu=w((Q_,Gu)=>{"use strict";var ay=F(),uy=j(),Fr=class extends uy{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};ay.registerWalker(Fr);Gu.exports=Fr});var zu=w((X_,Vu)=>{"use strict";var ly=F(),cy=j(),$r=class extends cy{constructor(e){super(e),this.type="word"}};ly.registerWalker($r);Vu.exports=$r});var Hu=w((J_,ju)=>{"use strict";var fy=F(),py=j(),Wr=class extends py{constructor(e){super(e),this.type="unicode-range"}};fy.registerWalker(Wr);ju.exports=Wr});var Qu=w((Z_,Ku)=>{"use strict";var Qs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);c=N!==-1?N-1:i}p=n.slice(a,c+1),b=p.split(`
|
||||
`),d=b.length-1,d>0?(y=u+d,v=c-b[d].length):(y=u,v=o),r.push(["comment",p,u,a-o,y,c-v,a]),o=v,u=y,a=c}else if(h===35&&!dy.test(n.slice(a+1,a+2)))c=a+1,r.push(["#",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1;else if((h===117||h===85)&&n.charCodeAt(a+1)===43){c=a+2;do c+=1,h=n.charCodeAt(c);while(c<i&&my.test(n.slice(c,c+1)));r.push(["unicoderange",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1}else if(h===47)c=a+1,r.push(["operator",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1;else{let k=hy;if(h>=48&&h<=57&&(k=ze),k.lastIndex=a+1,k.test(n),k.lastIndex===0?c=n.length-1:c=k.lastIndex-2,k===ze||h===46){let N=n.charCodeAt(c),tn=n.charCodeAt(c+1),rn=n.charCodeAt(c+2);(N===101||N===69)&&(tn===45||tn===43)&&rn>=48&&rn<=57&&(ze.lastIndex=c+2,ze.test(n),ze.lastIndex===0?c=n.length-1:c=ze.lastIndex-2)}r.push(["word",n.slice(a,c+1),u,a-o,u,c-o,a]),a=c}break}a++}return r}});var tl=w((tb,el)=>{"use strict";var Xs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};el.exports=Xs});var il=w((sb,nl)=>{"use strict";var yy=bu(),gy=Su(),wy=Au(),vy=Cu(),xy=Pu(),_y=Iu(),by=Du(),Ey=Bu(),Sy=Fu(),rl=Wu(),ky=Yu(),sl=zu(),Ty=Hu(),Ay=Zu(),Oy=Us(),Cy=Fs(),Ny=$s(),Py=tl();function Ry(t){return t.sort((e,s)=>e-s)}nl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new yy;let n=new gy;this.root.append(n),this.current=n,this.tokens=Ay(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new vy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new xy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new _y({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new Py(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new Sy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new rl({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new sl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(ue(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=ql([...Ct].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var zr=class extends Error{name="InvalidDocError";constructor(e){super(Ll(e)),this.doc=e}},on=zr;function Dl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(ue(i)){case He:return e(i.map(r));case ae:return e({...i,parts:i.parts.map(r)});case me:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case oe:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Ae:case ie:case Tt:case Ot:case Oe:return e({...i,contents:r(i.contents)});case je:case St:case kt:case At:case X:case Ce:return e(i);default:throw new on(i)}}}function Ml(t){return t.type===X&&!t.hard?t.soft?"":" ":t.type===me?t.flatContents:t}function an(t){return Dl(t,Ml)}var $=K,ye=K,un=K,ln=K;function L(t){return $(t),{type:ie,contents:t}}function Bl(t,e){return ln(t),$(e),{type:Ae,contents:e,n:t}}function le(t){return Bl(-1,t)}var Ne={type:Ce};function Pe(t){return un(t),{type:ae,parts:t}}function D(t,e={}){return $(t),ye(e.expandedStates,!0),{type:oe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Nt(t,e="",s={}){return $(t),e!==""&&$(e),{type:me,breakContents:t,flatContents:e,groupId:s.groupId}}function Y(t,e){$(t),ye(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}var C={type:X},M={type:X,soft:!0},Ul={type:X,hard:!0},T=[Ul,Ne];function cn(t){return $(t),{type:Oe,contents:t}}function $l(t){return Array.isArray(t)&&t.length>0}var ce=$l;var fn=Object.freeze({character:"'",codePoint:39}),pn=Object.freeze({character:'"',codePoint:34}),Wl=Object.freeze({preferred:fn,alternate:pn}),Gl=Object.freeze({preferred:pn,alternate:fn});function Yl(t,e){let{preferred:s,alternate:r}=e===!0||e==="'"?Wl:Gl,{length:n}=t,i=0,o=0;for(let u=0;u<n;u++){let a=t.charCodeAt(u);a===s.codePoint?i++:a===r.codePoint&&o++}return(i>o?r:s).character}var hn=Yl;var Vl=/\\(["'\\])|(["'])/gu;function zl(t,e){let s=e==='"'?"'":'"',r=E(0,t,Vl,(n,i,o)=>i?i===s?s:n:o===e?"\\"+o:o);return e+r+e}var dn=zl;function jl(t,e){K(/^(?<quote>["']).*\k<quote>$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":hn(s,e.singleQuote);return t.charAt(0)===r?t:dn(s,r)}var Pt=jl;var jr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},mn=jr;var Rt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function Hl(t){return!!t?.[Rt]}var Re=Hl;var Ke=3;function Kl(t){let e=t.slice(0,Ke);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,Ke);if(s===-1)return;let r=t.slice(Ke,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+Ke,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o),l;return{language:i,explicitLanguage:r||null,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-Ke),raw:a,start:{line:1,column:0,index:0},end:{index:a.length,get line(){return l??(l=a.split(`
|
||||
`)),l.length},get column(){return l??(l=a.split(`
|
||||
`)),G(0,l,-1).length}},[Rt]:!0}}function Ql(t){let e=Kl(t);return e?{frontMatter:e,get content(){let{raw:s}=e;return E(0,s,/[^\n]/gu," ")+t.slice(s.length)}}:{content:t}}var ge=Ql;var Xl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function yn(t,e,s){if(t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Re(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&G(0,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=Jl(t.value)),t.type==="selector-combinator"&&(e.value=E(0,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(0,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:r}=e;/\s[a-zA-Z]$/u.test(r)&&(e.__prettier_attribute_selector_flag=G(0,r,-1),r=r.slice(0,-1)),r=r.trim(),r=r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/u,"$<value>"),e.value=r,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(0,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&(r.value.endsWith("[")||r.value.endsWith("]"))||r.type==="value-word"&&(r.value.startsWith("]")||r.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}yn.ignoredProperties=Xl;function Jl(t){return E(0,E(0,t,"'",'"'),/\\([^\da-f])/giu,"$1")}var gn=yn;function wn(){}wn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var vn=wn;var Qe=null;function Xe(t){if(Qe!==null&&typeof Qe.property){let e=Qe;return Qe=Xe.prototype=null,e}return Qe=Xe.prototype=t??Object.create(null),new Xe}var Zl=10;for(let t=0;t<=Zl;t++)Xe();function Hr(t){return Xe(t)}function ec(t,e="type"){Hr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var xn=ec;var _=[[],["nodes"],["group"]],_n={"css-root":["frontMatter","nodes"],"css-comment":_[0],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":_[1],"media-query":_[1],"media-type":_[0],"media-feature-expression":_[1],"media-feature":_[0],"media-colon":_[0],"media-value":_[0],"media-keyword":_[0],"media-url":_[0],"media-unknown":_[0],"selector-root":_[1],"selector-selector":_[1],"selector-comment":_[0],"selector-string":_[0],"selector-tag":_[0],"selector-id":_[0],"selector-class":_[0],"selector-attribute":_[0],"selector-combinator":_[1],"selector-universal":_[0],"selector-pseudo":_[1],"selector-nesting":_[0],"selector-unknown":_[0],"value-value":_[2],"value-root":_[2],"value-comment":_[0],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":_[2],"value-paren":_[0],"value-number":_[0],"value-operator":_[0],"value-word":_[0],"value-colon":_[0],"value-comma":_[0],"value-string":_[0],"value-atword":_[0],"value-unicode-range":_[0],"value-unknown":_[0]};var tc=xn(_n),bn=tc;function rc(t,e){let s=0;for(let r=0;r<t.line-1;++r)s=e.indexOf(`
|
||||
`,s)+1;return s+t.column}var Kr=rc;function It(t){return(e,s,r)=>{let n=!!r?.backwards;if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Uw=It(/\s/u),qt=It(" "),En=It(",; "),Lt=It(/[^\n\r]/u);function Sn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function kn(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?Sn(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return Kr(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Qr(t,e){if(t.type==="css-comment"&&t.inline)return Lt(e,t.source.startOffset);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let s=Kr(t.source.end,e);return t.type==="value-word"?Sn(t,s):s}if(ce(t.nodes))return Qr(G(0,t.nodes,-1),e)}return null}function Xr(t,e){t.source&&(t.source.startOffset=kn(t,e),t.source.endOffset=Qr(t,e));for(let s in t){let r=t[s];s==="source"||!r||typeof r!="object"||(r.type==="value-root"||r.type==="value-unknown"?Tn(r,sc(t),r.text||r.value):Xr(r,e))}}function Tn(t,e,s){t.source&&(t.source.startOffset=kn(t,s)+e,t.source.endOffset=Qr(t,s)+e);for(let r in t){let n=t[r];r==="source"||!n||typeof n!="object"||Tn(n,e,s)}}function sc(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/u)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function An(t){let e="initial",s="initial",r,n=!1,i=[];for(let o=0;o<t.length;o++){let u=t[o];switch(e){case"initial":if(u==="'"){e="single-quotes";continue}if(u==='"'){e="double-quotes";continue}if((u==="u"||u==="U")&&t.slice(o,o+4).toLowerCase()==="url("){e="url",o+=3;continue}if(u==="*"&&t[o-1]==="/"){e="comment-block";continue}if(u==="/"&&t[o-1]==="/"){e="comment-inline",r=o-1;continue}continue;case"single-quotes":if(u==="'"&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")"&&(e="initial"),u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":(u==='"'||u==="'"||u==="*")&&(n=!0),(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+E(0,t.slice(o,u),/["'*]/gu," ")+t.slice(u);return t}var P=t=>t.source?.startOffset,R=t=>t.source?.endOffset;var nc=/\*\/$/,ic=/^\/\*\*?/,Pn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,oc=/(^|\s+)\/\/([^\n\r]*)/g,On=/^(\r?\n)+/,ac=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Cn=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,uc=/(\r?\n|^) *\* ?/g,Rn=[];function In(t){let e=t.match(Pn);return e?e[0].trimStart():""}function qn(t){let s=t.match(Pn)?.[0];return s==null?t:t.slice(s.length)}function Ln(t){t=E(0,t.replace(ic,"").replace(nc,""),uc,"$1");let s="";for(;s!==t;)s=t,t=E(0,t,ac,`
|
||||
$1 $2
|
||||
`);t=t.replace(On,"").trimEnd();let r=Object.create(null),n=E(0,t,Cn,"").replace(On,"").trimEnd(),i;for(;i=Cn.exec(t);){let o=E(0,i[2],oc,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...Rn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Dn({comments:t="",pragmas:e={}}){let o=Object.keys(e),u=o.flatMap(l=>Nn(l,e[l])).map(l=>` * ${l}
|
||||
`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let l=e[o[0]];return`/** ${Nn(o[0],l)[0]} */`}}let a=t.split(`
|
||||
`).map(l=>` * ${l}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(t?a:"")+(t&&o.length>0?` *
|
||||
`:"")+u+" */"}function Nn(t,e){return[...Rn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Mn=["noformat","noprettier"],Bn=["format","prettier"],Un="format";function lc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var Fn=lc;function Jr(t){let e=Fn(t);e&&(t=t.slice(e.length+1));let s=In(t),{pragmas:r,comments:n}=Ln(s);return{shebang:e,text:t,pragmas:r,comments:n}}function $n(t){let{pragmas:e}=Jr(t);return Bn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Wn(t){let{pragmas:e}=Jr(t);return Mn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Gn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Jr(t),i=qn(s),o=Dn({pragmas:{[Un]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var Yn=t=>$n(ge(t).content),Vn=t=>Wn(ge(t).content),zn=t=>{let{frontMatter:e,content:s}=ge(t);return(e?e.raw+`
|
||||
|
||||
`:"")+Gn(s)};var cc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function jn(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var fc=new Set(["initial","inherit","unset","revert"]);function Hn(t){return fc.has(t.toLowerCase())}function Kn(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function Ie(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function qe(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function Qn(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let s=e.raws?.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))})}function we(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Xn(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(s=>s.type==="css-atrule")?.name==="import"}function Jn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Zn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function ei(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function ti(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function ri(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function si(t){return t.type==="value-word"&&t.value==="in"}function Dt(t){return t.type==="value-operator"&&t.value==="*"}function ve(t){return t?.type==="value-operator"&&t.value==="/"}function J(t){return t.type==="value-operator"&&t.value==="+"}function xe(t){return t.type==="value-operator"&&t.value==="-"}function pc(t){return t.type==="value-operator"&&t.value==="%"}function Mt(t){return Dt(t)||ve(t)||J(t)||xe(t)||pc(t)}function ni(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function ii(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function Je(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function es(t){return t.raws?.params&&/^\(\s*\)$/u.test(t.raws.params)}function Bt(t){return t.name.startsWith("prettier-placeholder")}function oi(t){return t.prop.startsWith("@prettier-placeholder")}function ai(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function ui(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function li(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function Z(t){return t?.raws?.before===""}function Ut(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function Zr(t){return t.type==="value-paren_group"&&t.groups?.[0]&&Ut(t.groups[0])}function ts(t,e){if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;return!Zr(s)&&!(r&&Zr(r))?!1:!!(t.findAncestor(i=>i.type==="css-decl")?.prop?.startsWith("$")||Zr(r)||r.type==="value-func")}function Ze(t){return t.type==="value-comment"&&t.inline}function Ft(t){return t.type==="value-word"&&t.value==="#"}function rs(t){return t.type==="value-word"&&t.value==="{"}function $t(t){return t.type==="value-word"&&t.value==="}"}function et(t){return["value-word","value-atword"].includes(t.type)}function Wt(t){return t?.type==="value-colon"}function ci(t,e){if(!Ut(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:Wt(s[r+1])}function fi(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function pi(t){return t.type!=="value-func"?!1:cc.has(t.value.toLowerCase())}function Le(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function tt(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function hi(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,r=e.groups[s];if(r?.type==="value-word"&&r.value==="with")return!0}return!1}function rt(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function hc(t,e,s){let{node:r}=t,n=t.parent,i=t.grandparent,o=jn(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(p=>p.type==="css-atrule"),l=a&&Je(a,e),f=r.groups.some(p=>Ze(p)),h=t.map(s,"groups"),c=[""],g=qe(t,"url"),b=!1,d=!1;for(let p=0;p<r.groups.length;++p){let m=r.groups[p-1],y=r.groups[p],v=r.groups[p+1],O=r.groups[p+2];if(Ze(y)&&!v){c.push([c.pop(),cn([" ",h[p]])]);continue}if(c.push([c.pop(),h[p]]),g){(v&&J(v)||J(y))&&c.
Line truncated
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function vc(t,e,s){let r=!!s?.backwards;if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===`
|
||||
`)return e-2;if(xi(n))return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(xi(n))return e+1}return e}var Yt=vc;function xc(t,e,s={}){let r=qt(t,s.backwards?e-1:e,s),n=Yt(t,r,s);return r!==n}var Vt=xc;function _c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var _i=_c;function bc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Lt(t,e):e}var bi=bc;function Ec(t,e){let s=null,r=e;for(;r!==s;)s=r,r=En(t,r),r=_i(t,r),r=qt(t,r);return r=bi(t,r),r=Yt(t,r),r!==!1&&Vt(t,r)}var zt=Ec;function Sc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(P(t),P(e.close)).trimEnd().endsWith(","))}function kc(t,e){return Zn(t.grandparent)&&Sc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&vi(e)&&t.callParent(()=>ts(t,e))?Nt(","):""}function Ei(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:g})=>typeof g=="string"?g:s(),"groups");if(n&&Jn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let g=is(t);ye(i);let b=Ac(Y(",",i),2),d=Y(g?T:C,b);return L(g?[T,d]:D([Tc(t)?M:"",Pe(d)]))}let o=t.map(({node:g,isLast:b,index:d})=>{let p=i[d];Ut(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&g.groups[2]?.type==="value-paren_group"&&ue(p)===oe&&ue(p.contents)===ie&&ue(p.contents.contents)===ae&&(p=D(le(p)));let m=[p,b?kc(t,e):","];if(!b&&g.type==="value-comma_group"&&ce(g.groups)){let y=G(0,g.groups,-1);!y.source&&y.close&&(y=y.close),y.source&&zt(e.originalText,R(y))&&m.push(T)}return m},"groups"),u=ci(r,n),a=hi(r,n),l=ts(t,e),f=a||l&&!u,h=a||u,c=D([r.open?s("open"):"",L([M,Y(C,o)]),M,r.close?s("close"):""],{shouldBreak:f});return h?le(c):c}function is(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function Tc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function Ac(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function Oc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if(i?.type==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(P(n),R(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Vt(e.originalText,P(o),{backwards:!0})&&!Re(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?C:T),zt(e.originalText,R(n))&&!Re(n)&&r.push(T))},"nodes"),r}var De=Oc;function Cc(t,e,s){let{node:r}=t;switch(r.type){case"css-root":{let n=De(t,e,s),i=r.raws.after.trim();return i.startsWith(";")&&(i=i.slice(1).trim()),[r.frontMatter?[s("frontMatter"),T,r.nodes.length>0?T:""]:"",n,i?` ${i}`:"",r.nodes.length>0?T:""]}case"css-comment":{let n=r.inline||r.raws.inline,i=e.originalText.slice(P(r),R(r));return n?i.trimEnd():i}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[r.selector?.type==="selector-unknown"&&Le(r.selector.value)?C:r.selector?" ":"","{",r.nodes.length>0?L([T,De(t,e,s)]):"",T,"}",ei(r)?";":""]:";"];case"css-decl":{let n=t.parent,{between:i}=r.raws,o=i.trim(),u=o===":",a=typeof r.value=="string"&&/^ *$/u.test(r.value),l=typeof r.value=="string"?r.value:s("value");return l=ui(r)?an(l):l,!u&&Le(o)&&!t.call(()=>is(t),"value","group","group")&&(l=L([T,le(l)])),[E(0,r.raws.before,/[\s;]/gu,""),n.type==="css-atrule"&&n.variable||Qn(t)?r.prop:Ie(r.prop),o.startsWith("//")?" ":"",o,r.extend||a?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",l,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",L([M,De(t,e,s)]),M,"}"]:oi(r)&&!n.raws.semicolon&&e.originalText[R(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Nt(";"):";"]}case"css-atrule":{let n=t.parent,i=Bt(r)&&!n.raws.semicolon&&e.originalText[R(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",i?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),i?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",L([r.nodes.length>0?M:"",De(t,e,s)]),M,"}"]:"",i?"":";"]}let o=r.name==="import"&&r.params?.ty
Line truncated
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
var bl=Object.create;var Vr=Object.defineProperty;var El=Object.getOwnPropertyDescriptor;var Sl=Object.getOwnPropertyNames;var kl=Object.getPrototypeOf,Tl=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sn=(t,e)=>{for(var s in e)Vr(t,s,{get:e[s],enumerable:!0})},Al=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Sl(e))!Tl.call(t,n)&&n!==s&&Vr(t,n,{get:()=>e[n],enumerable:!(r=El(e,n))||r.enumerable});return t};var Te=(t,e,s)=>(s=t!=null?bl(kl(t)):{},Al(e||!t||!t.__esModule?Vr(s,"default",{value:t,enumerable:!0}):s,t));var Oi=w((ux,os)=>{var x=String,Ai=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};os.exports=Ai();os.exports.createColors=Ai});var as=w(()=>{});var zt=w((fx,Pi)=>{"use strict";var Ci=Oi(),Ni=as(),st=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Ci.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:h,red:c}=Ci.createColors(!0);n=g=>f(c(g)),r=g=>h(g),Ni&&(i=g=>Ni(g))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),l=String(a).length;return o.slice(u,a).map((f,h)=>{let c=u+1+h,g=" "+(" "+c).slice(-l)+" | ";if(c===this.line){if(f.length>160){let d=20,p=Math.max(0,this.column-d),m=Math.max(this.column+d,this.endColumn+d),y=f.slice(p,m),v=r(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return n(">")+r(g)+i(y)+`
|
||||
`+v+n("^")}let b=r(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(g)+i(f)+`
|
||||
`+b+n("^")}return" "+r(g)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};Pi.exports=st;st.default=st});var jt=w((px,Ii)=>{"use strict";var Ri={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Rc(t){return t[0].toUpperCase()+t.slice(1)}var nt=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(s+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let s=e.nodes.length-1;for(;s>0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,s!==n||r)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+s+e.text+r+"*/",e)}decl(e,s){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),s&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Ri[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+Rc(r);this[u]?n=this[u](o,e):o.walk(a=>{if(n=a.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Ri[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ii.exports=nt;nt.default=nt});var it=w((hx,qi)=>{"use strict";var Ic=jt();function us(t,e){new Ic(e).stringify(t)}qi.exports=us;us.default=us});var Ht=w((dx,ls)=>{"use strict";ls.exports.isClean=Symbol("isClean");ls.exports.my=Symbol("my")});var ut=w((mx,Li)=>{"use strict";var qc=zt(),Lc=jt(),Dc=it(),{isClean:ot,my:Mc}=Ht();function cs(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>cs(o,s)):(i==="object"&&n!==null&&(n=cs(n)),s[r]=n)}return s}function ee(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var at=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ot]=!1,this[Mc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=cs(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new qc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[ot]=!0}markDirty(){if(this[ot]){this[ot]=!1;let e=this;for(;e=e.parent;)e[ot]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s=this.source.start;if(e.index)s=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ee(r,this.source.start),ee(r,this.source.end)).indexOf(e.word);i!==-1&&(s=this.positionInside(i))}return s}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=ee(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:ee(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:ee(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(ee(s,this.source.start),ee(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:ee(s,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:ee(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new Lc().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Dc){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Li.exports=at;at.default=at});var Me=w((yx,Di)=>{"use strict";var Bc=ut(),lt=class extends Bc{constructor(e){super(e),this.type="comment"}};Di.exports=lt;lt.default=lt});var ft=w((gx,Mi)=>{"use strict";var Uc=ut(),ct=class extends Uc{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Mi.exports=ct;ct.default=ct});var fe=w((wx,zi)=>{"use strict";var Bi=Me(),Ui=ft(),Fc=ut(),{isClean:Fi,my:$i}=Ht(),fs,Wi,Gi,ps;function Yi(t){return t.map(e=>(e.nodes&&(e.nodes=Yi(e.nodes)),delete e.source,e))}function Vi(t){if(t[Fi]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Vi(e)}var z=class t extends Fc{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=Yi(Wi
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[ms]=s,s}var Be=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!Zi||/^\w+:\/\//.test(s.from)||ys(s.from)?this.file=s.from:this.file=gs(s.from)),Zi&&Hc){let r=new jc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Yc(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,l;if(s&&typeof s=="object"){let h=s,c=r;if(typeof h.offset=="number"){a=h.offset;let g=this.fromOffset(a);s=g.line,r=g.col}else s=h.line,r=h.column,a=this.fromLineAndColumn(s,r);if(typeof c.offset=="number"){u=c.offset;let g=this.fromOffset(u);o=g.line,i=g.col}else o=c.line,i=c.column,u=this.fromLineAndColumn(c.line,c.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let h=this.fromOffset(a);s=h.line,r=h.col}let f=this.origin(s,r,o,i);return f?l=new Ji(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):l=new Ji(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),l.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(Kt&&(l.input.url=Kt(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,s){return eo(this)[e-1]+s-1}fromOffset(e){let s=eo(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:gs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n,line:r}));let a;ys(o.source)?a=Kt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Kt(this.map.mapFile));let l={column:o.column,endColumn:u&&u.column,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Xi)l.file=Xi(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(l.source=f),l}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};to.exports=Be;Be.default=Be;ds&&ds.registerInput&&ds.registerInput(Be)});var Qt=w((kx,so)=>{"use strict";var ro=fe(),Fe=class extends ro{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};so.exports=Fe;Fe.default=Fe;ro.registerAtRule(Fe)});var $e=w((Tx,ao)=>{"use strict";var no=fe(),io,oo,pe=class extends no{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new io(new oo,this,e).stringify()}};pe.registerLazyResult=t=>{io=t};pe.registerProcessor=t=>{oo=t};ao.exports=pe;pe.default=pe;no.registerRoot(pe)});var ws=w((Ax,uo)=>{"use strict";var pt={comma(t){return pt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return pt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",l=!1;for(let f of t)l?l=!1:f==="\\"?l=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};uo.exports=pt;pt.default=pt});var Xt=w((Ox,co)=>{"use strict";var lo=fe(),Kc=ws(),We=class extends lo{get selectors(){return Kc.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};co.exports=We;We.default=We;lo.registerRule(We)});var er=w((Cx,po)=>{"use strict";var Jt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Zt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qc=/.[\r\n"'(/\\]/,fo=/[\da-f]/i;po.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,l,f,h,c,g,b,d=r.length,p=0,m=[],y=[];function v(){return p}function O(W){throw e.error("Unclosed "+W,p)}function q(){return y.length===0&&p>=d}function H(W){if(y.length)return y.pop();if(p>=d)return;let A=W?W.ignoreUnclosed:!1;switch(i=r.charCodeAt(p),i){case 10:case 32:case 9:case 13:case 12:{a=p;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(p,a)],p=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let k=String.fromCharCode(i);f=[k,k,p];break}case 40:{if(b=m.length?m.pop()[1]:"",g=r.charCodeAt(p+1),b==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(n||A){a=p;break}else O("bracket");for(c=a;r.charCodeAt(c-1)===92;)c-=1,h=!h}while(h);f=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||Qc.test(o)?f=["(","(",p]:(f=["brackets",o,p,a],p=a);break}case 39:case 34:{l=i===39?"'":'"',a=p;do{if(h=!1,a=r.indexOf(l,a+1),a===-1)if(n||A){a=p+1;break}else O("string");for(c=a;r.charCodeAt(c-1)===92;)c-=1,h=!h}while(h);f=["string",r.slice(p,a+1),p,a],p=a;break}case 64:{Jt.lastIndex=p+1,Jt.test(r),Jt.lastIndex===0?a=r.length-1:a=Jt.lastIndex-2,f=["at-word",r.slice(p,a+1),p,a],p=a;break}case 92:{for(a=p,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,fo.test(r.charAt(a)))){for(;fo.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(p,a+1),p,a],p=a;break}default:{i===47&&r.charCodeAt(p+1)===42?(a=r.indexOf("*/",p+2)+1,a===0&&(n||A?a=r.length:O("comment")),f=["comment",r.slice(p,a+1),p,a],p=a):(Zt.lastIndex=p+1,Zt.test(r),Zt.lastIndex===0?a=r.length-1:a=Zt.lastIndex-2,f=["word",r.slice(p,a+1),p,a],m.push(f),p=a);break}}return p++,f}function ne(W){y.push(W)}return{back:ne,endOfFile:q,nextToken:H,position:v}}});var tr=w((Nx,yo)=>{"use strict";var Xc=Qt(),Jc=Me(),Zc=ft(),ef=$e(),ho=Xt(),tf=er(),mo={empty:!0,space:!0};function rf(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var vs=class{constructor(e){this.input=e,this.root=new ef,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Xc;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new Jc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=tf(this.input)}decl(e,s){let r=new Zc;this.init(r,e[0][2]);let n=e[e.
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new uf(n),this.tokenizer=af(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),xs.exports.isInlineComment.bind(this)(t)}return!1}}});var xo=w((Ix,vo)=>{vo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var bo=w((qx,_o)=>{var lf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,cf=/\.[0-9]/,ff=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&lf.test(e)===!1&&cf.test(e)===!1};_o.exports={isMixinToken:ff}});var So=w((Lx,Eo)=>{var pf=er(),hf=/^url\((.+)\)/;Eo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=pf({css:s});for(t.filename=s.replace(hf,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Oo=w((Dx,Ao)=>{var ko=/:$/,To=/^:(\s+)?/;Ao.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(ko.test(e)){let[r]=e.match(ko);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(To.test(s)){let[r]=s.match(To);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Po=w((Bx,No)=>{var df=Me(),mf=tr(),{isInlineComment:yf}=wo(),{interpolation:Co}=xo(),{isMixinToken:gf}=bo(),wf=So(),vf=Oo(),xf=/(!\s*important)$/i;No.exports=class extends mf{constructor(...e){super(...e),this.lastNode=null}atrule(e){Co.bind(this)(e)||(super.atrule(e),wf(this.lastNode),vf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new df,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(l=>l[0]==="brackets"),i=e.findIndex(l=>l[0]==="("),o="";if((n<0||n>3)&&i>0){let l=e.reduce((v,O,q)=>O[0]===")"?q:v),h=e.slice(i,l+i).map(v=>v[1]).join(""),[c]=e.slice(i),g=[c[2],c[3]],[b]=e.slice(l,l+1),d=[b[2],b[3]],p=["brackets",h].concat(g,d),m=e.slice(0,i),y=e.slice(l+1);e=m,e.push(p),e=e.concat(y)}let u=[];for(let l of e)if((l[1]==="!"||u.length)&&u.push(l),l[1]==="important")break;if(u.length){let[l]=u,f=e.indexOf(l),h=u[u.length-1],c=[l[2],l[3]],g=[h[4],h[5]],d=["word",u.map(p=>p[1]).join("")].concat(c,g);e.splice(f,u.length,d)}let a=e.findIndex(l=>xf.test(l[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let l of e.reverse())this.tokenizer.back(l);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){yf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),Co.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(gf(s)){this.mixin(e);return}super.unknownWord(e)}}});var Io=w((Fx,Ro)=>{var _f=jt();Ro.exports=class extends _f{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var qo=w(($x,_s)=>{var bf=Ue(),Ef=Po(),Sf=Io();_s.exports={parse(t,e){let s=new bf(t,e),r=new Ef(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Os().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return S([n(a)]).process(o,u)},n};S.stringify=ap;S.parse=ip;S.fromJSON=ep;S.list=sp;S.comment=t=>new ea(t);S.atRule=t=>new Zo(t);S.decl=t=>new ta(t);S.rule=t=>new na(t);S.root=t=>new sa(t);S.document=t=>new ra(t);S.CssSyntaxError=Zf;S.Declaration=ta;S.Container=Jf;S.Processor=Os;S.Document=ra;S.Comment=ea;S.Warning=up;S.AtRule=Zo;S.Result=op;S.Input=tp;S.Rule=na;S.Root=sa;S.Node=np;rp.registerPostcss(S);ia.exports=S;S.default=S});var aa=w((t_,oa)=>{var{Container:lp}=ir(),Cs=class extends lp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};oa.exports=Cs});var ca=w((r_,la)=>{"use strict";var or=/[\t\n\f\r "#'()/;[\\\]{}]/g,ar=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cp=/.[\r\n"'(/\\]/,ua=/[\da-f]/i,ur=/[\n\f\r]/g;la.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,l,f,h,c,g,b=r.length,d=0,p=[],m=[],y;function v(){return d}function O(A){throw e.error("Unclosed "+A,d)}function q(){return m.length===0&&d>=b}function H(){let A=1,k=!1,N=!1;for(;A>0;)o+=1,r.length<=o&&O("interpolation"),i=r.charCodeAt(o),c=r.charCodeAt(o+1),k?!N&&i===k?(k=!1,N=!1):i===92?N=!N:N&&(N=!1):i===39||i===34?k=i:i===125?A-=1:i===35&&c===123&&(A+=1)}function ne(A){if(m.length)return m.pop();if(d>=b)return;let k=A?A.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{o=d;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);g=["space",r.slice(d,o)],d=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let N=String.fromCharCode(i);g=[N,N,d];break}case 44:{g=["word",",",d,d+1];break}case 40:{if(h=p.length?p.pop()[1]:"",c=r.charCodeAt(d+1),h==="url"&&c!==39&&c!==34){for(y=1,f=!1,o=d+1;o<=r.length-1;){if(c=r.charCodeAt(o),c===92)f=!f;else if(c===40)y+=1;else if(c===41&&(y-=1,y===0))break;o+=1}a=r.slice(d,o+1),g=["brackets",a,d,o],d=o}else o=r.indexOf(")",d+1),a=r.slice(d,o+1),o===-1||cp.test(a)?g=["(","(",d]:(g=["brackets",a,d,o],d=o);break}case 39:case 34:{for(u=i,o=d,f=!1;o<b&&(o++,o===b&&O("string"),i=r.charCodeAt(o),c=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&c===123&&H();g=["string",r.slice(d,o+1),d,o],d=o;break}case 64:{or.lastIndex=d+1,or.test(r),or.lastIndex===0?o=r.length-1:o=or.lastIndex-2,g=["at-word",r.slice(d,o+1),d,o],d=o;break}case 92:{for(o=d,l=!0;r.charCodeAt(o+1)===92;)o+=1,l=!l;if(i=r.charCodeAt(o+1),l&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,ua.test(r.charAt(o)))){for(;ua.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}g=["word",r.slice(d,o+1),d,o],d=o;break}default:c=r.charCodeAt(d+1),i===35&&c===123?(o=d,H(),a=r.slice(d,o+1),g=["word",a,d,o],d=o):i===47&&c===42?(o=r.indexOf("*/",d+2)+1,o===0&&(n||k?o=r.length:O("comment")),g=["comment",r.slice(d,o+1),d,o],d=o):i===47&&c===47?(ur.lastIndex=d+1,ur.test(r),ur.lastIndex===0?o=r.length-1:o=ur.lastIndex-2,a=r.slice(d,o+1),g=["comment",a,d,o,"inline"],d=o):(ar.lastIndex=d+1,ar.test(r),ar.lastIndex===0?o=r.length-1:o=ar.lastIndex-2,g=["word",r.slice(d,o+1),d,o],p.push(g),d=o);break}return d++,g}function W(A){m.push(A)}return{back:W,endOfFile:q,nextToken:ne,position:v}}});var pa=w((s_,fa)=>{var{Comment:fp}=ir(),pp=tr(),hp=aa(),dp=ca(),Ns=class extends pp{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new fp;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=dp(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new hp;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let l=this.stringFrom(e,a);l=this.spacesFromEnd(e)+l,l!==" !important"&&(i.raws.important=l);break}else if(u[1]==="important"){let l=e.slice(0),f="";for(let h=a;h>0;h--){let c=l[h][0];if(f.trim().indexOf("!")===0&&c!=="space")break;f=l.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=l)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};fa.exports=Ns});var da=w((n_,ha)=>{var{Input:mp}=ir(),yp=pa();ha.exports=function(e,s){let r=new mp(e,s),n=new yp(r);return n.parse(),n.root}});var Rs=w(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});function vp(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Ps.default=vp});var qs=w(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var xp=Rs(),ya=_p(xp);function _p(t){return t&&t.__esModule?t:{default:t}}function vt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}vt.prototype=Object.create(ya.default.prototype);vt.constructor=ya.default;vt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};vt.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};Is.default=vt});var xa=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.parseMediaFeature=va;xt.parseMediaQuery=Ds;xt.parseMediaList=Sp;var bp=Rs(),ga=wa(bp),Ep=qs(),Ls=wa(Ep);function wa(t){return t&&t.__esModule?t:{default:t}}function va(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,l=t;t[0]==="("&&t[t.length-1]===")"&&(l=t.substring(1,t.length-1),a++);for(var f=0;f<l.length;f++){var h=l[f];if((h==="'"||h==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:h}),n++):s[n].mode==="string"&&s[n].character===h&&l[f-1]!=="\\"&&(s.pop(),n--)),h==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):h==="}"&&(s.pop(),n--),s[n].mode==="normal"&&h===":"){var c=l.substring(f+1);u={type:"value",before:/^(\s*)/.exec(c)[1],after:/(\s*)$/.exec(c)[1],value:c.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=h}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Ds(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=va(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new Ls.default(i):new ga.default(i)),i=o(),n=!1)}for(var l=0;l<s.length;l++)if(i=s[l],l>0&&(s[l-1].after=i.before),i.type===void 0){if(l>0){if(s[l-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[l-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=p+u,h=n-o[u].length):(f=p,h=d),e.push(["comment",a,p,m-d,f,n-h,m]),d=h,p=f,m=n):(Ar.lastIndex=m+1,Ar.test(s),Ar.lastIndex===0?n=s.length-1:n=Ar.lastIndex-2,e.push(["word",s.slice(m,n+1),p,m-d,p,n-d,m]),m=n);break}m++}return e}cu.exports=Or.default});var du=w((Cr,hu)=>{"use strict";Cr.__esModule=!0;var rm=(function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}})(),sm=Us(),nm=I(sm),im=Fs(),js=I(im),om=$s(),am=I(om),um=Pa(),lm=I(um),cm=Ia(),Hs=I(cm),fm=Da(),pm=I(fm),hm=Ba(),dm=I(hm),mm=Fa(),ym=I(mm),gm=Wa(),wm=I(gm),vm=Ya(),xm=I(vm),_m=za(),bm=I(_m),Em=Ha(),Sm=I(Em),km=Qa(),Tm=I(km),Am=Ja(),Om=I(Am),Cm=eu(),Nm=I(Cm),Pm=ru(),Rm=I(Pm),Im=fu(),pu=I(Im),qm=B(),Lm=Dm(qm);function Dm(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function I(t){return t&&t.__esModule?t:{default:t}}function Mm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Bm=(function(){function t(e){Mm(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new lm.default;var s=new Hs.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,pu.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,pu.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new Sm.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),l=a[0].trim();r.value=this.lossy?l:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=l[0]==="'"||l[0]==='"',r.raws.unquoted=r.quoted?l.slice(1,-1):l}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new Om.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new Hs.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new dm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new Nm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===Lm.PSEUDO){var r=new Hs.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var F=w((D_,vu)=>{"use strict";var zm=j(),Ve=class extends zm{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};Ve.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Ve.prototype[e]&&(Ve.prototype[e]=function(s){return this.walkType(t,s)})};vu.exports=Ve});var _u=w((B_,xu)=>{"use strict";var jm=F();xu.exports=class extends jm{constructor(e){super(e),this.type="root"}}});var Eu=w((F_,bu)=>{"use strict";var Hm=F();bu.exports=class extends Hm{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var Tu=w(($_,ku)=>{"use strict";var Su=F(),Pr=class extends Su{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Su.registerWalker(Pr);ku.exports=Pr});var Ou=w((W_,Au)=>{"use strict";var Km=F(),Qm=j(),Rr=class extends Qm{constructor(e){super(e),this.type="colon"}};Km.registerWalker(Rr);Au.exports=Rr});var Nu=w((G_,Cu)=>{"use strict";var Xm=F(),Jm=j(),Ir=class extends Jm{constructor(e){super(e),this.type="comma"}};Xm.registerWalker(Ir);Cu.exports=Ir});var Ru=w((Y_,Pu)=>{"use strict";var Zm=F(),ey=j(),qr=class extends ey{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};Zm.registerWalker(qr);Pu.exports=qr});var Lu=w((V_,qu)=>{"use strict";var Iu=F(),Lr=class extends Iu{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Iu.registerWalker(Lr);qu.exports=Lr});var Mu=w((z_,Du)=>{"use strict";var ty=F(),ry=j(),Dr=class extends ry{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};ty.registerWalker(Dr);Du.exports=Dr});var Uu=w((j_,Bu)=>{"use strict";var sy=F(),ny=j(),Mr=class extends ny{constructor(e){super(e),this.type="operator"}};sy.registerWalker(Mr);Bu.exports=Mr});var $u=w((H_,Fu)=>{"use strict";var iy=F(),oy=j(),Br=class extends oy{constructor(e){super(e),this.type="paren",this.parenType=""}};iy.registerWalker(Br);Fu.exports=Br});var Gu=w((K_,Wu)=>{"use strict";var ay=F(),uy=j(),Ur=class extends uy{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};ay.registerWalker(Ur);Wu.exports=Ur});var Vu=w((Q_,Yu)=>{"use strict";var ly=F(),cy=j(),Fr=class extends cy{constructor(e){super(e),this.type="word"}};ly.registerWalker(Fr);Yu.exports=Fr});var ju=w((X_,zu)=>{"use strict";var fy=F(),py=j(),$r=class extends py{constructor(e){super(e),this.type="unicode-range"}};fy.registerWalker($r);zu.exports=$r});var Ku=w((J_,Hu)=>{"use strict";var Qs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);c=N!==-1?N-1:i}p=n.slice(a,c+1),b=p.split(`
|
||||
`),d=b.length-1,d>0?(y=u+d,v=c-b[d].length):(y=u,v=o),r.push(["comment",p,u,a-o,y,c-v,a]),o=v,u=y,a=c}else if(h===35&&!dy.test(n.slice(a+1,a+2)))c=a+1,r.push(["#",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1;else if((h===117||h===85)&&n.charCodeAt(a+1)===43){c=a+2;do c+=1,h=n.charCodeAt(c);while(c<i&&my.test(n.slice(c,c+1)));r.push(["unicoderange",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1}else if(h===47)c=a+1,r.push(["operator",n.slice(a,c),u,a-o,u,c-o,a]),a=c-1;else{let k=hy;if(h>=48&&h<=57&&(k=ze),k.lastIndex=a+1,k.test(n),k.lastIndex===0?c=n.length-1:c=k.lastIndex-2,k===ze||h===46){let N=n.charCodeAt(c),tn=n.charCodeAt(c+1),rn=n.charCodeAt(c+2);(N===101||N===69)&&(tn===45||tn===43)&&rn>=48&&rn<=57&&(ze.lastIndex=c+2,ze.test(n),ze.lastIndex===0?c=n.length-1:c=ze.lastIndex-2)}r.push(["word",n.slice(a,c+1),u,a-o,u,c-o,a]),a=c}break}a++}return r}});var el=w((eb,Zu)=>{"use strict";var Xs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Zu.exports=Xs});var nl=w((rb,sl)=>{"use strict";var yy=_u(),gy=Eu(),wy=Tu(),vy=Ou(),xy=Nu(),_y=Ru(),by=Lu(),Ey=Mu(),Sy=Uu(),tl=$u(),ky=Gu(),rl=Vu(),Ty=ju(),Ay=Ju(),Oy=Us(),Cy=Fs(),Ny=$s(),Py=el();function Ry(t){return t.sort((e,s)=>e-s)}sl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new yy;let n=new gy;this.root.append(n),this.current=n,this.tokens=Ay(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new vy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new xy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new _y({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new Py(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new Sy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new tl({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new rl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(ue(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=ql([...Ot].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var zr=class extends Error{name="InvalidDocError";constructor(e){super(Ll(e)),this.doc=e}},nn=zr;function Dl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(ue(i)){case He:return e(i.map(r));case ae:return e({...i,parts:i.parts.map(r)});case me:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case oe:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Ae:case ie:case kt:case At:case Oe:return e({...i,contents:r(i.contents)});case je:case Et:case St:case Tt:case X:case Ce:return e(i);default:throw new nn(i)}}}function Ml(t){return t.type===X&&!t.hard?t.soft?"":" ":t.type===me?t.flatContents:t}function on(t){return Dl(t,Ml)}var $=K,ye=K,an=K,un=K;function L(t){return $(t),{type:ie,contents:t}}function Bl(t,e){return un(t),$(e),{type:Ae,contents:e,n:t}}function le(t){return Bl(-1,t)}var Ne={type:Ce};function Pe(t){return an(t),{type:ae,parts:t}}function D(t,e={}){return $(t),ye(e.expandedStates,!0),{type:oe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Ct(t,e="",s={}){return $(t),e!==""&&$(e),{type:me,breakContents:t,flatContents:e,groupId:s.groupId}}function Y(t,e){$(t),ye(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}var C={type:X},M={type:X,soft:!0},Ul={type:X,hard:!0},T=[Ul,Ne];function ln(t){return $(t),{type:Oe,contents:t}}function $l(t){return Array.isArray(t)&&t.length>0}var ce=$l;var cn=Object.freeze({character:"'",codePoint:39}),fn=Object.freeze({character:'"',codePoint:34}),Wl=Object.freeze({preferred:cn,alternate:fn}),Gl=Object.freeze({preferred:fn,alternate:cn});function Yl(t,e){let{preferred:s,alternate:r}=e===!0||e==="'"?Wl:Gl,{length:n}=t,i=0,o=0;for(let u=0;u<n;u++){let a=t.charCodeAt(u);a===s.codePoint?i++:a===r.codePoint&&o++}return(i>o?r:s).character}var pn=Yl;var Vl=/\\(["'\\])|(["'])/gu;function zl(t,e){let s=e==='"'?"'":'"',r=E(0,t,Vl,(n,i,o)=>i?i===s?s:n:o===e?"\\"+o:o);return e+r+e}var hn=zl;function jl(t,e){K(/^(?<quote>["']).*\k<quote>$/su.test(t));let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":pn(s,e.singleQuote);return t.charAt(0)===r?t:hn(s,r)}var Nt=jl;var jr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dn=jr;var Pt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function Hl(t){return!!t?.[Pt]}var Re=Hl;var Ke=3;function Kl(t){let e=t.slice(0,Ke);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,Ke);if(s===-1)return;let r=t.slice(Ke,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+Ke,u=t.charAt(o+1);if(!/\s?/u.test(u))return;let a=t.slice(0,o),l;return{language:i,explicitLanguage:r||null,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-Ke),raw:a,start:{line:1,column:0,index:0},end:{index:a.length,get line(){return l??(l=a.split(`
|
||||
`)),l.length},get column(){return l??(l=a.split(`
|
||||
`)),G(0,l,-1).length}},[Pt]:!0}}function Ql(t){let e=Kl(t);return e?{frontMatter:e,get content(){let{raw:s}=e;return E(0,s,/[^\n]/gu," ")+t.slice(s.length)}}:{content:t}}var ge=Ql;var Xl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function mn(t,e,s){if(t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Re(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||s.type==="css-root"&&G(0,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=Jl(t.value)),t.type==="selector-combinator"&&(e.value=E(0,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=E(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(0,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:r}=e;/\s[a-zA-Z]$/u.test(r)&&(e.__prettier_attribute_selector_flag=G(0,r,-1),r=r.slice(0,-1)),r=r.trim(),r=r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/u,"$<value>"),e.value=r,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=E(0,e.value,/([\d+.e-]+)([a-z]*)/giu,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&(r.value.endsWith("[")||r.value.endsWith("]"))||r.type==="value-word"&&(r.value.startsWith("]")||r.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}mn.ignoredProperties=Xl;function Jl(t){return E(0,E(0,t,"'",'"'),/\\([^\da-f])/giu,"$1")}var yn=mn;function gn(){}gn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var wn=gn;var Qe=null;function Xe(t){if(Qe!==null&&typeof Qe.property){let e=Qe;return Qe=Xe.prototype=null,e}return Qe=Xe.prototype=t??Object.create(null),new Xe}var Zl=10;for(let t=0;t<=Zl;t++)Xe();function Hr(t){return Xe(t)}function ec(t,e="type"){Hr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var vn=ec;var _=[[],["nodes"],["group"]],xn={"css-root":["frontMatter","nodes"],"css-comment":_[0],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":_[1],"media-query":_[1],"media-type":_[0],"media-feature-expression":_[1],"media-feature":_[0],"media-colon":_[0],"media-value":_[0],"media-keyword":_[0],"media-url":_[0],"media-unknown":_[0],"selector-root":_[1],"selector-selector":_[1],"selector-comment":_[0],"selector-string":_[0],"selector-tag":_[0],"selector-id":_[0],"selector-class":_[0],"selector-attribute":_[0],"selector-combinator":_[1],"selector-universal":_[0],"selector-pseudo":_[1],"selector-nesting":_[0],"selector-unknown":_[0],"value-value":_[2],"value-root":_[2],"value-comment":_[0],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":_[2],"value-paren":_[0],"value-number":_[0],"value-operator":_[0],"value-word":_[0],"value-colon":_[0],"value-comma":_[0],"value-string":_[0],"value-atword":_[0],"value-unicode-range":_[0],"value-unknown":_[0]};var tc=vn(xn),_n=tc;function rc(t,e){let s=0;for(let r=0;r<t.line-1;++r)s=e.indexOf(`
|
||||
`,s)+1;return s+t.column}var Kr=rc;function Rt(t){return(e,s,r)=>{let n=!!r?.backwards;if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Bw=Rt(/\s/u),It=Rt(" "),bn=Rt(",; "),qt=Rt(/[^\n\r]/u);function En(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Sn(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?En(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return Kr(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Qr(t,e){if(t.type==="css-comment"&&t.inline)return qt(e,t.source.startOffset);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let s=Kr(t.source.end,e);return t.type==="value-word"?En(t,s):s}if(ce(t.nodes))return Qr(G(0,t.nodes,-1),e)}return null}function Xr(t,e){t.source&&(t.source.startOffset=Sn(t,e),t.source.endOffset=Qr(t,e));for(let s in t){let r=t[s];s==="source"||!r||typeof r!="object"||(r.type==="value-root"||r.type==="value-unknown"?kn(r,sc(t),r.text||r.value):Xr(r,e))}}function kn(t,e,s){t.source&&(t.source.startOffset=Sn(t,s)+e,t.source.endOffset=Qr(t,s)+e);for(let r in t){let n=t[r];r==="source"||!n||typeof n!="object"||kn(n,e,s)}}function sc(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/u)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function Tn(t){let e="initial",s="initial",r,n=!1,i=[];for(let o=0;o<t.length;o++){let u=t[o];switch(e){case"initial":if(u==="'"){e="single-quotes";continue}if(u==='"'){e="double-quotes";continue}if((u==="u"||u==="U")&&t.slice(o,o+4).toLowerCase()==="url("){e="url",o+=3;continue}if(u==="*"&&t[o-1]==="/"){e="comment-block";continue}if(u==="/"&&t[o-1]==="/"){e="comment-inline",r=o-1;continue}continue;case"single-quotes":if(u==="'"&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")"&&(e="initial"),u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":(u==='"'||u==="'"||u==="*")&&(n=!0),(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+E(0,t.slice(o,u),/["'*]/gu," ")+t.slice(u);return t}var P=t=>t.source?.startOffset,R=t=>t.source?.endOffset;var nc=/\*\/$/,ic=/^\/\*\*?/,Nn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,oc=/(^|\s+)\/\/([^\n\r]*)/g,An=/^(\r?\n)+/,ac=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,On=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,uc=/(\r?\n|^) *\* ?/g,Pn=[];function Rn(t){let e=t.match(Nn);return e?e[0].trimStart():""}function In(t){let s=t.match(Nn)?.[0];return s==null?t:t.slice(s.length)}function qn(t){t=E(0,t.replace(ic,"").replace(nc,""),uc,"$1");let s="";for(;s!==t;)s=t,t=E(0,t,ac,`
|
||||
$1 $2
|
||||
`);t=t.replace(An,"").trimEnd();let r=Object.create(null),n=E(0,t,On,"").replace(An,"").trimEnd(),i;for(;i=On.exec(t);){let o=E(0,i[2],oc,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...Pn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Ln({comments:t="",pragmas:e={}}){let o=Object.keys(e),u=o.flatMap(l=>Cn(l,e[l])).map(l=>` * ${l}
|
||||
`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let l=e[o[0]];return`/** ${Cn(o[0],l)[0]} */`}}let a=t.split(`
|
||||
`).map(l=>` * ${l}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(t?a:"")+(t&&o.length>0?` *
|
||||
`:"")+u+" */"}function Cn(t,e){return[...Pn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Dn=["noformat","noprettier"],Mn=["format","prettier"],Bn="format";function lc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var Un=lc;function Jr(t){let e=Un(t);e&&(t=t.slice(e.length+1));let s=Rn(t),{pragmas:r,comments:n}=qn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function Fn(t){let{pragmas:e}=Jr(t);return Mn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function $n(t){let{pragmas:e}=Jr(t);return Dn.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function Wn(t){let{shebang:e,text:s,pragmas:r,comments:n}=Jr(t),i=In(s),o=Ln({pragmas:{[Bn]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var Gn=t=>Fn(ge(t).content),Yn=t=>$n(ge(t).content),Vn=t=>{let{frontMatter:e,content:s}=ge(t);return(e?e.raw+`
|
||||
|
||||
`:"")+Wn(s)};var cc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function zn(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var fc=new Set(["initial","inherit","unset","revert"]);function jn(t){return fc.has(t.toLowerCase())}function Hn(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function Ie(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function qe(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function Kn(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let s=e.raws?.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))})}function we(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Qn(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(s=>s.type==="css-atrule")?.name==="import"}function Xn(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Jn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function Zn(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function ei(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function ti(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function ri(t){return t.type==="value-word"&&t.value==="in"}function Lt(t){return t.type==="value-operator"&&t.value==="*"}function ve(t){return t?.type==="value-operator"&&t.value==="/"}function J(t){return t.type==="value-operator"&&t.value==="+"}function xe(t){return t.type==="value-operator"&&t.value==="-"}function pc(t){return t.type==="value-operator"&&t.value==="%"}function Dt(t){return Lt(t)||ve(t)||J(t)||xe(t)||pc(t)}function si(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function ni(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function Je(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function es(t){return t.raws?.params&&/^\(\s*\)$/u.test(t.raws.params)}function Mt(t){return t.name.startsWith("prettier-placeholder")}function ii(t){return t.prop.startsWith("@prettier-placeholder")}function oi(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function ai(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function ui(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function Z(t){return t?.raws?.before===""}function Bt(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function Zr(t){return t.type==="value-paren_group"&&t.groups?.[0]&&Bt(t.groups[0])}function ts(t,e){if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;return!Zr(s)&&!(r&&Zr(r))?!1:!!(t.findAncestor(i=>i.type==="css-decl")?.prop?.startsWith("$")||Zr(r)||r.type==="value-func")}function Ze(t){return t.type==="value-comment"&&t.inline}function Ut(t){return t.type==="value-word"&&t.value==="#"}function rs(t){return t.type==="value-word"&&t.value==="{"}function Ft(t){return t.type==="value-word"&&t.value==="}"}function et(t){return["value-word","value-atword"].includes(t.type)}function $t(t){return t?.type==="value-colon"}function li(t,e){if(!Bt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:$t(s[r+1])}function ci(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function fi(t){return t.type!=="value-func"?!1:cc.has(t.value.toLowerCase())}function Le(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function tt(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function pi(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,r=e.groups[s];if(r?.type==="value-word"&&r.value==="with")return!0}return!1}function rt(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function hc(t,e,s){let{node:r}=t,n=t.parent,i=t.grandparent,o=zn(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(p=>p.type==="css-atrule"),l=a&&Je(a,e),f=r.groups.some(p=>Ze(p)),h=t.map(s,"groups"),c=[""],g=qe(t,"url"),b=!1,d=!1;for(let p=0;p<r.groups.length;++p){let m=r.groups[p-1],y=r.groups[p],v=r.groups[p+1],O=r.groups[p+2];if(Ze(y)&&!v){c.push([c.pop(),ln([" ",h[p]])]);continue}if(c.push([c.pop(),h[p]]),g){(v&&J(v)||J(y))&&c.
Line truncated
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function vc(t,e,s){let r=!!s?.backwards;if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===`
|
||||
`)return e-2;if(vi(n))return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(vi(n))return e+1}return e}var Gt=vc;function xc(t,e,s={}){let r=It(t,s.backwards?e-1:e,s),n=Gt(t,r,s);return r!==n}var Yt=xc;function _c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var xi=_c;function bc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?qt(t,e):e}var _i=bc;function Ec(t,e){let s=null,r=e;for(;r!==s;)s=r,r=bn(t,r),r=xi(t,r),r=It(t,r);return r=_i(t,r),r=Gt(t,r),r!==!1&&Yt(t,r)}var Vt=Ec;function Sc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(P(t),P(e.close)).trimEnd().endsWith(","))}function kc(t,e){return Jn(t.grandparent)&&Sc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&wi(e)&&t.callParent(()=>ts(t,e))?Ct(","):""}function bi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:g})=>typeof g=="string"?g:s(),"groups");if(n&&Xn(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let g=is(t);ye(i);let b=Ac(Y(",",i),2),d=Y(g?T:C,b);return L(g?[T,d]:D([Tc(t)?M:"",Pe(d)]))}let o=t.map(({node:g,isLast:b,index:d})=>{let p=i[d];Bt(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&g.groups[2]?.type==="value-paren_group"&&ue(p)===oe&&ue(p.contents)===ie&&ue(p.contents.contents)===ae&&(p=D(le(p)));let m=[p,b?kc(t,e):","];if(!b&&g.type==="value-comma_group"&&ce(g.groups)){let y=G(0,g.groups,-1);!y.source&&y.close&&(y=y.close),y.source&&Vt(e.originalText,R(y))&&m.push(T)}return m},"groups"),u=li(r,n),a=pi(r,n),l=ts(t,e),f=a||l&&!u,h=a||u,c=D([r.open?s("open"):"",L([M,Y(C,o)]),M,r.close?s("close"):""],{shouldBreak:f});return h?le(c):c}function is(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function Tc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function Ac(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function Oc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if(i?.type==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(P(n),R(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Yt(e.originalText,P(o),{backwards:!0})&&!Re(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?C:T),Vt(e.originalText,R(n))&&!Re(n)&&r.push(T))},"nodes"),r}var De=Oc;function Cc(t,e,s){let{node:r}=t;switch(r.type){case"css-root":{let n=De(t,e,s),i=r.raws.after.trim();return i.startsWith(";")&&(i=i.slice(1).trim()),[r.frontMatter?[s("frontMatter"),T,r.nodes.length>0?T:""]:"",n,i?` ${i}`:"",r.nodes.length>0?T:""]}case"css-comment":{let n=r.inline||r.raws.inline,i=e.originalText.slice(P(r),R(r));return n?i.trimEnd():i}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[r.selector?.type==="selector-unknown"&&Le(r.selector.value)?C:r.selector?" ":"","{",r.nodes.length>0?L([T,De(t,e,s)]):"",T,"}",Zn(r)?";":""]:";"];case"css-decl":{let n=t.parent,{between:i}=r.raws,o=i.trim(),u=o===":",a=typeof r.value=="string"&&/^ *$/u.test(r.value),l=typeof r.value=="string"?r.value:s("value");return l=ai(r)?on(l):l,!u&&Le(o)&&!t.call(()=>is(t),"value","group","group")&&(l=L([T,le(l)])),[E(0,r.raws.before,/[\s;]/gu,""),n.type==="css-atrule"&&n.variable||Kn(t)?r.prop:Ie(r.prop),o.startsWith("//")?" ":"",o,r.extend||a?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",l,r.raws.important?r.raws.important.replace(/\s*!\s*important/iu," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/iu," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/iu," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",L([M,De(t,e,s)]),M,"}"]:ii(r)&&!n.raws.semicolon&&e.originalText[R(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Ct(";"):";"]}case"css-atrule":{let n=t.parent,i=Mt(r)&&!n.raws.semicolon&&e.originalText[R(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",i?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),i?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",L([r.nodes.length>0?M:"",De(t,e,s)]),M,"}"]:"",i?"":";"]}let o=r.name==="import"&&r.params?.ty
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
typescript: Parser;
|
||||
};
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var gp=Object.defineProperty;var ty=Object.getOwnPropertyDescriptor;var ny=Object.getOwnPropertyNames;var ry=Object.prototype.hasOwnProperty;var yd=(e,t)=>{for(var a in t)gp(e,a,{get:t[a],enumerable:!0})},iy=(e,t,a,_)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of ny(t))!ry.call(e,f)&&f!==a&&gp(e,f,{get:()=>t[f],enumerable:!(_=ty(t,f))||_.enumerable});return e};var ay=e=>iy(gp({},"__esModule",{value:!0}),e);var K4={};yd(K4,{parsers:()=>ud});var ud={};yd(ud,{typescript:()=>Q4});var sy=()=>()=>{},Na=sy;var Ia=(e,t)=>(a,_,...f)=>a|1&&_==null?void 0:(t.call(_)??_[e]).apply(_,f);var _y=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},oy=Ia("replaceAll",function(){if(typeof this=="string")return _y}),Wr=oy;var bm="5.9";var vt=[],cy=new Map;function e_(e){return e!==void 0?e.length:0}function jn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let _=t(e[a],a);if(_)return _}}function ly(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let _=t(e[a],a);if(_!==void 0)return _}}function gd(e,t,a){let _=[];q.assertEqual(e.length,t.length);for(let f=0;f<e.length;f++)_.push(a(e[f],t[f],f));return _}function Yp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function vm(e,t,a){if(e!==void 0)for(let _=a??0;_<e.length;_++){let f=e[_];if(t(f,_))return f}}function bp(e,t,a){if(e===void 0)return-1;for(let _=a??0;_<e.length;_++)if(t(e[_],_))return _;return-1}function uy(e,t,a=$p){if(e!==void 0){for(let _=0;_<e.length;_++)if(a(e[_],t))return!0}return!1}function Hr(e,t){if(e!==void 0){let a=e.length,_=0;for(;_<a&&t(e[_]);)_++;if(_<a){let f=e.slice(0,_);for(_++;_<a;){let h=e[_];t(h)&&f.push(h),_++}return f}}return e}function Np(e,t){let a;if(e!==void 0){a=[];for(let _=0;_<e.length;_++)a.push(t(e[_],_))}return a}function Tm(e){let t=[];for(let a=0;a<e.length;a++){let _=e[a];_&&($r(_)?En(t,_):t.push(_))}return t}function xm(e,t){let a;if(e!==void 0)for(let _=0;_<e.length;_++){let f=t(e[_],_);f&&($r(f)?a=En(a,f):a=wn(a,f))}return a??vt}function py(e,t){let a;if(e!==void 0)for(let _=0;_<e.length;_++){let f=e[_],h=t(f,_);(a||f!==h||$r(h))&&(a||(a=e.slice(0,_)),$r(h)?En(a,h):a.push(h))}return a??e}function fy(e,t){let a=[];if(e!==void 0)for(let _=0;_<e.length;_++){let f=t(e[_],_);f!==void 0&&a.push(f)}return a}function Zt(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Hp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function dy(e,t,a=$p){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let _=0;_<e.length;_++)if(!a(e[_],t[_],_))return!1;return!0}function wn(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function Ip(e,t){return t<0?e.length+t:t}function En(e,t,a,_){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,_);a=a===void 0?0:Ip(t,a),_=_===void 0?t.length:Ip(t,_);for(let f=a;f<_&&f<t.length;f++)t[f]!==void 0&&e.push(t[f]);return e}function my(e,t,a){return uy(e,t,a)?!1:(e.push(t),!0)}function hy(e,t,a){return e!==void 0?(my(e,t,a),e):[t]}function yy(e,t){return e.length===0?vt:e.slice().sort(t)}var i3=Array.prototype.at?(e,t)=>e?.at(t):(e,t)=>{if(e!==void 0&&(t=Ip(e,t),t<e.length))return e[t]};function Xp(e){return e===void 0||e.length===0?void 0:e[0]}function Ba(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function gy(e){return q.assert(e.length!==0),e[e.length-1]}function by(e){return e!==void 0&&e.length===1?e[0]:void 0}function vy(e,t,a,_,f){return Ty(e,a(t),a,_,f)}function Ty(e,t,a,_,f){if(!Zt(e))return-1;let h=f??0,T=e.length-1;for(;h<=T;){let k=h+(T-h>>1),c=a(e[k],k);switch(_(c,t)){case-1:h=k+1;break;case 0:return k;case 1:T=k-1;break}}return~h}function xy(e,t,a,_,f){if(e&&e.length>0){let h=e.length;if(h>0){let T=_===void 0||_<0?0:_,k=f===void 0||T+f>h-1?h-1:T+f,c;for(arguments.length<=2?(c=e[T],T++):c=a;T<=k;)c=t(c,e[T],T),T++;return c}}return a}var Sm=Object.prototype.hasOwnProperty;function Dr(e,t){return Sm.call(e,t)}function Sy(e){let t=[];for(let a in e)Sm.call(e,a)&&t.push(a);return t}function wy(){let e=new Map;return e.add=ky,e.remove=Ey,e}function ky(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function Ey(e,t){let a=this.get(e);a!==void 0&&(Ly(a,t),a.length||this.delete(e))}function $r(e){return Array.isArray(e)}function vp(e){return $r(e)?e:[e]}function Ay(e,t){return e!==void 0&&t(e)?e:void 0}function Er(e,t){return e!==void 0&&t(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(t)}'.`)}function Va(e){}function
Line truncated
|
||||
Node ${Ot(L.kind)} was unexpected.`,fe||G)}e.failBadSyntaxKind=G;function E(L,se,fe,Te){L||(se=se?`False expression: ${se}`:"False expression.",fe&&(se+=`\r
|
||||
Verbose Debug Information: `+(typeof fe=="string"?fe:fe())),y(se,Te||E))}e.assert=E;function D(L,se,fe,Te,He){if(L!==se){let Qe=fe?Te?`${fe} ${Te}`:fe:"";y(`Expected ${L} === ${se}. ${Qe}`,He||D)}}e.assertEqual=D;function R(L,se,fe,Te){L>=se&&y(`Expected ${L} < ${se}. ${fe||""}`,Te||R)}e.assertLessThan=R;function ue(L,se,fe){L>se&&y(`Expected ${L} <= ${se}`,fe||ue)}e.assertLessThanOrEqual=ue;function be(L,se,fe){L<se&&y(`Expected ${L} >= ${se}`,fe||be)}e.assertGreaterThanOrEqual=be;function he(L,se,fe){L==null&&y(se,fe||he)}e.assertIsDefined=he;function de(L,se,fe){return he(L,se,fe||de),L}e.checkDefined=de;function O(L,se,fe){for(let Te of L)he(Te,se,fe||O)}e.assertEachIsDefined=O;function ae(L,se,fe){return O(L,se,fe||ae),L}e.checkEachDefined=ae;function Oe(L,se="Illegal value:",fe){let Te=typeof L=="object"&&Dr(L,"kind")&&Dr(L,"pos")?"SyntaxKind: "+Ot(L.kind):JSON.stringify(L);return y(`${se} ${Te}`,fe||Oe)}e.assertNever=Oe;function V(L,se,fe,Te){W(1,"assertEachNode")&&E(se===void 0||Yp(L,se),fe||"Unexpected node.",()=>`Node array did not pass test '${hn(se)}'.`,Te||V)}e.assertEachNode=V;function oe(L,se,fe,Te){W(1,"assertNode")&&E(L!==void 0&&(se===void 0||se(L)),fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`,Te||oe)}e.assertNode=oe;function Y(L,se,fe,Te){W(1,"assertNotNode")&&E(L===void 0||se===void 0||!se(L),fe||"Unexpected node.",()=>`Node ${Ot(L.kind)} should not have passed test '${hn(se)}'.`,Te||Y)}e.assertNotNode=Y;function ft(L,se,fe,Te){W(1,"assertOptionalNode")&&E(se===void 0||L===void 0||se(L),fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`,Te||ft)}e.assertOptionalNode=ft;function nr(L,se,fe,Te){W(1,"assertOptionalToken")&&E(se===void 0||L===void 0||L.kind===se,fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} was not a '${Ot(se)}' token.`,Te||nr)}e.assertOptionalToken=nr;function mn(L,se,fe){W(1,"assertMissingNode")&&E(L===void 0,se||"Unexpected node.",()=>`Node ${Ot(L.kind)} was unexpected'.`,fe||mn)}e.assertMissingNode=mn;function rr(L){}e.type=rr;function hn(L){if(typeof L!="function")return"";if(Dr(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),fe=/^function\s+([\w$]+)\s*\(/.exec(se);return fe?fe[1]:""}}e.getFunctionName=hn;function Dn(L){return`{ name: ${l_(L.escapedName)}; flags: ${ot(L.flags)}; declarations: ${Np(L.declarations,se=>Ot(se.kind))} }`}e.formatSymbol=Dn;function We(L=0,se,fe){let Te=Ir(se);if(L===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(fe){let He=[],Qe=L;for(let[st,Ct]of Te){if(st>L)break;st!==0&&st&L&&(He.push(Ct),Qe&=~st)}if(Qe===0)return He.join("|")}else for(let[He,Qe]of Te)if(He===L)return Qe;return L.toString()}e.formatEnum=We;let ir=new Map;function Ir(L){let se=ir.get(L);if(se)return se;let fe=[];for(let He in L){let Qe=L[He];typeof Qe=="number"&&fe.push([Qe,He])}let Te=yy(fe,(He,Qe)=>wm(He[0],Qe[0]));return ir.set(L,Te),Te}function Ot(L){return We(L,Ae,!1)}e.formatSyntaxKind=Ot;function Bn(L){return We(L,Dm,!1)}e.formatSnippetKind=Bn;function Pn(L){return We(L,Pr,!1)}e.formatScriptKind=Pn;function Mt(L){return We(L,sn,!0)}e.formatNodeFlags=Mt;function ht(L){return We(L,Em,!0)}e.formatNodeCheckFlags=ht;function $e(L){return We(L,Kp,!0)}e.formatModifierFlags=$e;function qn(L){return We(L,Cm,!0)}e.formatTransformFlags=qn;function $t(L){return We(L,Pm,!0)}e.formatEmitFlags=$t;function ot(L){return We(L,Zp,!0)}e.formatSymbolFlags=ot;function at(L){return We(L,en,!0)}e.formatTypeFlags=at;function Bt(L){return We(L,Am,!0)}e.formatSignatureFlags=Bt;function Lt(L){return We(L,ef,!0)}e.formatObjectFlags=Lt;function ct(L){return We(L,Mp,!0)}e.formatFlowFlags=ct;function ar(L){return We(L,km,!0)}e.formatRelationComparisonResult=ar;function dt(L){return We(L,CheckMode,!0)}e.formatCheckMode=dt;function yn(L){return We(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=yn;function yt(L){return We(L,TypeFacts,!0)}e.formatTypeFacts=yt;let _n=!1,tt;function qt(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",fe=this.flags&-2048;return`${se}${fe?` (${ct(fe)})`:""}`}},__debugFlowFlags:{get(){return We(this.flags,Mp,!0)}},__debugToString:{value(){return yr(this)}}})}function tn(L){return _n&&(typeof Object.setPrototypeOf=="function"?(tt||(tt=Object.create(Object.prototype),qt(tt)),Object.setPrototypeOf(L,tt)):qt(L)),L}e.attachFlowNodeDebugInfo=tn;let sr;function mr(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function hr(L){_n&&(typeof Object.setPrototypeOf=="function"?(sr||
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Oe(this)}}}e.DebugTypeMapper=Or;function Vn(L){return e.isDebugging?Object.setPrototypeOf(L,Or.prototype):L}e.attachDebugPrototypeIfDebug=Vn;function Ce(L){return console.log(yr(L))}e.printControlFlowGraph=Ce;function yr(L){let se=-1;function fe(u){return u.id||(u.id=se,se--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let He;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(He||(He={}));let Qe=2032,st=882,Ct=Object.create(null),Tt=[],lt=[],Mr=Se(L,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),me(u);let gr=Ve(Mr),Nn=Ze(gr);return Ye(Mr,0),on();function Wn(u){return!!(u.flags&128)}function wi(u){return!!(u.flags&12)&&!!u.antecedent}function U(u){return!!(u.flags&Qe)}function K(u){return!!(u.flags&st)}function Z(u){let Ie=[];for(let Me of u.edges)Me.source===u&&Ie.push(Me.target);return Ie}function xe(u){let Ie=[];for(let Me of u.edges)Me.target===u&&Ie.push(Me.source);return Ie}function Se(u,Ie){let Me=fe(u),B=Ct[Me];if(B&&Ie.has(u))return B.circular=!0,B={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(B),B;if(Ie.add(u),!B)if(Ct[Me]=B={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(B),wi(u))for(let Be of u.antecedent)we(B,Be,Ie);else U(u)&&we(B,u.antecedent,Ie);return Ie.delete(u),B}function we(u,Ie,Me){let B=Se(Ie,Me),Be={source:u,target:B};lt.push(Be),u.edges.push(Be),B.edges.push(Be)}function me(u){if(u.level!==-1)return u.level;let Ie=0;for(let Me of xe(u))Ie=Math.max(Ie,me(Me)+1);return u.level=Ie}function Ve(u){let Ie=0;for(let Me of Z(u))Ie=Math.max(Ie,Ve(Me));return Ie+1}function Ze(u){let Ie=M(Array(u),0);for(let Me of Tt)Ie[Me.level]=Math.max(Ie[Me.level],Me.text.length);return Ie}function Ye(u,Ie){if(u.lane===-1){u.lane=Ie,u.endLane=Ie;let Me=Z(u);for(let B=0;B<Me.length;B++){B>0&&Ie++;let Be=Me[B];Ye(Be,Ie),Be.endLane>u.endLane&&(Ie=Be.endLane)}u.endLane=Ie}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function gn(u){let Ie=hi(u);return Md(Ie,u,!1)}function rt(u,Ie){let Me=Ee(u.flags);if(Ie&&(Me=`${Me}#${fe(u)}`),Wn(u)){let B=[],{switchStatement:Be,clauseStart:nn,clauseEnd:ze}=u.node;for(let Xe=nn;Xe<ze;Xe++){let Dt=Be.caseBlock.clauses[Xe];_6(Dt)?B.push("default"):B.push(gn(Dt.expression))}Me+=` (${B.join(", ")})`}else K(u)&&u.node&&(Me+=` (${gn(u.node)})`);return Ie==="circularity"?`Circular(${Me})`:Me}function on(){let u=Nn.length,Ie=Ny(Tt,0,ze=>ze.lane)+1,Me=M(Array(Ie),""),B=Nn.map(()=>Array(Ie)),Be=Nn.map(()=>M(Array(Ie),0));for(let ze of Tt){B[ze.level][ze.lane]=ze;let Xe=Z(ze);for(let wt=0;wt<Xe.length;wt++){let Pt=Xe[wt],Ft=8;Pt.lane===ze.lane&&(Ft|=4),wt>0&&(Ft|=1),wt<Xe.length-1&&(Ft|=2),Be[ze.level][Pt.lane]|=Ft}Xe.length===0&&(Be[ze.level][ze.lane]|=16);let Dt=xe(ze);for(let wt=0;wt<Dt.length;wt++){let Pt=Dt[wt],Ft=4;wt>0&&(Ft|=1),wt<Dt.length-1&&(Ft|=2),Be[ze.level-1][Pt.lane]|=Ft}}for(let ze=0;ze<u;ze++)for(let Xe=0;Xe<Ie;Xe++){let Dt=ze>0?Be[ze-1][Xe]:0,wt=Xe>0?Be[ze][Xe-1]:0,Pt=Be[ze][Xe];Pt||(Dt&8&&(Pt|=12),wt&2&&(Pt|=3),Be[ze][Xe]=Pt)}for(let ze=0;ze<u;ze++)for(let Xe=0;Xe<Me.length;Xe++){let Dt=Be[ze][Xe],wt=Dt&4?"\u2500":" ",Pt=B[ze][Xe];Pt?(nn(Xe,Pt.text),ze<u-1&&(nn(Xe," "),nn(Xe,Ue(wt,Nn[ze]-Pt.text.length)))):ze<u-1&&nn(Xe,Ue(wt,Nn[ze]+1)),nn(Xe,Zr(Dt)),nn(Xe,Dt&8&&ze<u-1&&!B[ze+1][Xe]?"\u2500":" ")}return`
|
||||
${Me.join(`
|
||||
`)}
|
||||
`;function nn(ze,Xe){Me[ze]+=Xe}}function Zr(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function M(u,Ie){if(u.fill)u.fill(Ie);else for(let Me=0;Me<u.length;Me++)u[Me]=Ie;return u}function Ue(u,Ie){if(u.repeat)return Ie>0?u.repeat(Ie):"";let Me="";for(;Me.length<Ie;)Me+=u;return Me}}e.formatControlFlowGraph=yr})(q||(q={}));var a3=Date.now,vd=()=>{},jy=()=>{},ll,Ae=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,Z=c;continue}c++}return q.assert(Se!==void 0),D=xe,Se}function Ot(U){let K=c;if(c++,c>=W)return Y(A.Unexpected_end_of_text),"";let Z=V(c);switch(c++,Z){case 48:if(c>=W||!fi(V(c)))return"\0";case 49:case 50:case 51:c<W&&xp(V(c))&&c++;case 52:case 53:case 54:case 55:if(c<W&&xp(V(c))&&c++,R|=2048,U&6){let we=parseInt(k.substring(K+1,c),8);return U&4&&!(U&32)&&Z!==48?Y(A.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,K,c-K,"\\x"+we.toString(16).padStart(2,"0")):Y(A.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,K,c-K,"\\x"+we.toString(16).padStart(2,"0")),String.fromCharCode(we)}return k.substring(K,c);case 56:case 57:return R|=2048,U&6?(U&4&&!(U&32)?Y(A.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,K,c-K):Y(A.Escape_sequence_0_is_not_allowed,K,c-K,k.substring(K,c)),String.fromCharCode(Z)):k.substring(K,c);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(c<W&&V(c)===123){c-=2;let we=Bn(!!(U&6));return U&17||(R|=2048,U&6&&Y(A.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,K,c-K)),we}for(;c<K+6;c++)if(!(c<W&&Tp(V(c))))return R|=2048,U&6&&Y(A.Hexadecimal_digit_expected),k.substring(K,c);R|=1024;let xe=parseInt(k.substring(K+2,c),16),Se=String.fromCharCode(xe);if(U&16&&xe>=55296&&xe<=56319&&c+6<W&&k.substring(c,c+2)==="\\u"&&V(c+2)!==123){let we=c,me=c+2;for(;me<we+6;me++)if(!Tp(V(me)))return Se;let Ve=parseInt(k.substring(we+2,me),16);if(Ve>=56320&&Ve<=57343)return c=me,Se+String.fromCharCode(Ve)}return Se;case 120:for(;c<K+4;c++)if(!(c<W&&Tp(V(c))))return R|=2048,U&6&&Y(A.Hexadecimal_digit_expected),k.substring(K,c);return R|=4096,String.fromCharCode(parseInt(k.substring(K+2,c),16));case 13:c<W&&V(c)===10&&c++;case 10:case 8232:case 8233:return"";default:return(U&16||U&4&&!(U&8)&&Ar(Z,e))&&Y(A.This_character_cannot_be_escaped_in_a_regular_expression,c-2,2),String.fromCharCode(Z)}}function Bn(U){let K=c;c+=3;let Z=c,xe=Dn(1,!1),Se=xe?parseInt(xe,16):-1,we=!1;return Se<0?(U&&Y(A.Hexadecimal_digit_expected),we=!0):Se>1114111&&(U&&Y(A.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,Z,c-Z),we=!0),c>=W?(U&&Y(A.Unexpected_end_of_text),we=!0):V(c)===125?c++:(U&&Y(A.Unterminated_Unicode_escape_sequence),we=!0),we?(R|=2048,k.substring(K,c)):(R|=8,Ed(Se))}function Pn(){if(c+5<W&&V(c+1)===117){let U=c;c+=2;let K=hn(4,!1);return c=U,K}return-1}function Mt(){if(ae(c+1)===117&&ae(c+2)===123){let U=c;c+=3;let K=Dn(1,!1),Z=K?parseInt(K,16):-1;return c=U,Z}return-1}function ht(){let U="",K=c;for(;c<W;){let Z=ae(c);if(Ar(Z,e))c+=Vt(Z);else if(Z===92){if(Z=Mt(),Z>=0&&Ar(Z,e)){U+=Bn(!0),K=c;continue}if(Z=Pn(),!(Z>=0&&Ar(Z,e)))break;R|=1024,U+=k.substring(K,c),U+=Ed(Z),c+=6,K=c}else break}return U+=k.substring(K,c),U}function $e(){let U=D.length;if(U>=2&&U<=12){let K=D.charCodeAt(0);if(K>=97&&K<=122){let Z=Xy.get(D);if(Z!==void 0)return E=Z}}return E=80}function qn(U){let K="",Z=!1,xe=!1;for(;;){let Se=V(c);if(Se===95){R|=512,Z?(Z=!1,xe=!0):Y(xe?A.Multiple_consecutive_numeric_separators_are_not_permitted:A.Numeric_separators_are_not_allowed_here,c,1),c++;continue}if(Z=!0,!fi(Se)||Se-48>=U)break;K+=k[c],c++,xe=!1}return V(c-1)===95&&Y(A.Numeric_separators_are_not_allowed_here,c-1,1),K}function $t(){return V(c)===110?(D+="n",R&384&&(D=wb(D)+"n"),c++,10):(D=""+(R&128?parseInt(D.slice(2),2):R&256?parseInt(D.slice(2),8):+D),9)}function ot(){for(y=c,R=0;;){if(G=c,c>=W)return E=1;let U=ae(c);if(c===0&&U===35&&zm(k,c)){if(c=Vm(k,c),t)continue;return E=6}switch(U){case 10:case 13:if(R|=1,t){c++;continue}else return U===13&&c+1<W&&V(c+1)===10?c+=2:c++,E=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){c++;continue}else{for(;c<W&&n_(V(c));)c++;return E=5}case 33:return V(c+1)===61?V(c+2)===61?(c+=3,E=38):(c+=2,E=36):(c++,E=54);case 34:case 39:return D=ir(),E=11;case 96:return E=Ir(!1);case 37:return V(c+1)===61?(c+=2,E=70):(c++,E=45);case 38:return V(c+1)===38?V(c+2)===61?(c+=3,E=77):(c+=2,E=56):V(c+1)===61?(c+=2,E=74):(c++,E=51);case 40:return c++,E=21;case 41:return c++,E=22;case 42:if(V(c+1)===61)return c+=2,E=67;if(V(c+1)===42)return V(c+2)===61?(c+=3,E=68):(c+=2,E=43);if(c++,be&&(R&32768)===0&&R&1){R|=32768;continue}return E=42;case 43:return V(c+1)===43?(c+=2,E=46):V(c+1)===61?(c+=2,E=65):(c++,E=40);case 44:return c++,E=28;case 45:return V(c+1)===45?(c+=2,E=47):V(c+1)===61?(c+=2,E=66):(c++,E=41);case 46:return fi(V(c+1))?(nr(),E=9):V(c+1)===46&&V(c+2)===46?(c+=3,E=26):(c++,E=25);case 47:if(V(c+1)===47){for(c+=2;c<W&&!kn(V(c));)c++;if(ue=_n(ue,k.slice(G,c),tg,G),t)continue;return E=2}if(V(c+1)===42){c+=2;let me=V(c)===42&&V(c+1)!==47,Ve=!1,Ze=G;for(;c<W;){let Ye=V(c);if(Ye===42&&V(c+1)===47){c+=2,Ve=!0;break}c++,kn(Ye)&&(Ze=c,R|=1)}if(me&&at()&&(R|=2),ue=_n(ue,k.slice(Ze,c),ng,Ze),Ve||Y(A.Asterisk_Slash_expected),t)continue;return Ve||(R|=4),E=3}return V(c+1)===61?(c+=2,E=69):(c++,E=44);case 48:if(c+2<W&&(V(c+1)===88||V(c+1)===120))return c+=2,D=Dn(1,!0),D||(Y(A.Hexadecimal_digit_expected),D="0"),D="0x"+D,R|=64,E=$t();if(c+2<W&&(V(c+1)===66||V(c+1)===98))return c+=2,D=qn(2),D||(Y(A.Binary_digit_expected),D="0"),D="0b"+D,R|=128,E=$t();if(c+2<W&&(V(c+1)===79||V(c+1)===111))return c+=2,D=qn(8),D||(Y(A.Octal_digit_expected),D="0"),D="0o"+D,R|=256,E=$t();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return E=nr();case 58:return c++,E=59;case 59:return c++,E=27;case 60:if($i(k,c)){if(c=Ma(k,c,Y),t)continue;return E=7}return V(c+1)===60?V(c+2)===61?(c+=3,E=71):(c+=2,E=48):V(c+1)===61?(c+=2,E=33):a===1&&V(c+1)===47&&V(c+2)!==42?(c+=2,E=31):(c++,E=30);case 61:if($i(k,c)){if(c=Ma(k,c,Y),t)continue;return E=7}retu
Line truncated
|
||||
`)),_}function za(e){let t=e.emitNode;return t&&t.flags||0}function f2(e,t,a){q.assertGreaterThanOrEqual(t,0),q.assertGreaterThanOrEqual(a,0),q.assertLessThanOrEqual(t,e.length),q.assertLessThanOrEqual(t+a,e.length)}function pl(e){return e.kind===245&&e.expression.kind===11}function yf(e){return!!(za(e)&2097152)}function Ld(e){return yf(e)&&Rf(e)}function d2(e){return Ke(e.name)&&!e.initializer}function Jd(e){return yf(e)&&Xa(e)&&Yp(e.declarationList.declarations,d2)}function m2(e,t){let a=e.kind===170||e.kind===169||e.kind===219||e.kind===220||e.kind===218||e.kind===261||e.kind===282?Hp(pg(t,e.pos),Jp(t,e.pos)):Jp(t,e.pos);return Hr(a,_=>_.end<=e.end&&t.charCodeAt(_.pos+1)===42&&t.charCodeAt(_.pos+2)===42&&t.charCodeAt(_.pos+3)!==47)}function h2(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function y2(e){return e&&e.kind===242&&hf(e.parent)}function jd(e){let t=e.kind;return(t===212||t===213)&&e.expression.kind===108}function ia(e){return!!e&&!!(e.flags&524288)}function g2(e){return!!e&&!!(e.flags&16777216)}function b2(e){for(;vl(e,!0);)e=e.right;return e}function v2(e){return Ke(e)&&e.escapedText==="exports"}function T2(e){return Ke(e)&&e.escapedText==="module"}function f1(e){return(dr(e)||d1(e))&&T2(e.expression)&&f_(e)==="exports"}function gf(e){let t=S2(e);return t===5||ia(e)?t:0}function x2(e){return e_(e.arguments)===3&&dr(e.expression)&&Ke(e.expression.expression)&&An(e.expression.expression)==="Object"&&An(e.expression.name)==="defineProperty"&&Al(e.arguments[1])&&p_(e.arguments[0],!0)}function d1(e){return Ha(e)&&Al(e.argumentExpression)}function b_(e,t){return dr(e)&&(!t&&e.expression.kind===110||Ke(e.name)&&p_(e.expression,!0))||m1(e,t)}function m1(e,t){return d1(e)&&(!t&&e.expression.kind===110||Sf(e.expression)||b_(e.expression,!0))}function p_(e,t){return Sf(e)||b_(e,t)}function S2(e){if(Mf(e)){if(!x2(e))return 0;let t=e.arguments[0];return v2(t)||f1(t)?8:b_(t)&&f_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!T1(e.left)||w2(b2(e))?0:p_(e.left.expression,!0)&&f_(e.left)==="prototype"&&Of(E2(e))?6:k2(e.left)}function w2(e){return n6(e)&&aa(e.expression)&&e.expression.text==="0"}function bf(e){if(dr(e))return e.name;let t=Tf(e.argumentExpression);return aa(t)||El(t)?t:e}function f_(e){let t=bf(e);if(t){if(Ke(t))return t.escapedText;if(El(t)||aa(t))return La(t.text)}}function k2(e){if(e.expression.kind===110)return 4;if(f1(e))return 2;if(p_(e.expression,!0)){if(tb(e.expression))return 3;let t=e;for(;!Ke(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&f_(t)==="exports")&&b_(e))return 1;if(p_(e,!0)||Ha(e)&&B2(e))return 5}return 0}function E2(e){for(;na(e.right);)e=e.right;return e.right}function A2(e){return Pl(e)&&na(e.expression)&&gf(e.expression)!==0&&na(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function C2(e){switch(e.kind){case 244:let t=Bp(e);return t&&t.initializer;case 173:return e.initializer;case 304:return e.initializer}}function Bp(e){return Xa(e)?Xp(e.declarationList.declarations):void 0}function D2(e){return Ti(e)&&e.body&&e.body.kind===268?e.body:void 0}function vf(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function P2(e,t){let a;h2(e)&&s2(e)&&Ki(e.initializer)&&(a=En(a,Rd(e,e.initializer.jsDoc)));let _=e;for(;_&&_.parent;){if(Ki(_)&&(a=En(a,Rd(e,_.jsDoc))),_.kind===170){a=En(a,(t?wg:Sg)(_));break}if(_.kind===169){a=En(a,(t?Eg:kg)(_));break}_=I2(_)}return a||vt}function Rd(e,t){let a=gy(t);return xm(t,_=>{if(_===a){let f=Hr(_.tags,h=>N2(e,h));return _.tags===f?[_]:f}else return Hr(_.tags,m6)})}function N2(e,t){return!(Vf(t)||b6(t))||!t.parent||!ih(t.parent)||!Dl(t.parent.parent)||t.parent.parent===e}function I2(e){let t=e.parent;if(t.kind===304||t.kind===278||t.kind===173||t.kind===245&&e.kind===212||t.kind===254||D2(t)||vl(e))return t;if(t.parent&&(Bp(t.parent)===e||vl(t)))return t.parent;if(t.parent&&t.parent.parent&&(Bp(t.parent.parent)||C2(t.parent.parent)===e||A2(t.parent.parent)))return t.parent.parent}function Tf(e,t){return Wf(e,t?-2147483647:1)}function O2(e){let t=M2(e);if(t&&ia(e)){let a=Ag(e);if(a)return a.class}return t}function M2(e){let t=xf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function L2(e){if(ia(e))return Cg(e).map(t=>t.c
Line truncated
|
||||
`,te)+1)+4;function ne(Re){X||(X=$),Mn.push(Re),$+=Re.length}for(Be();Gi(5););Gi(4)&&(I=0,$=0);e:for(;;){switch(u()){case 60:mp(Mn),pr||(pr=M()),Fe(n($)),I=0,X=void 0;break;case 4:Mn.push(t.getTokenText()),I=0,$=0;break;case 42:let Re=t.getTokenText();I===1?(I=2,ne(Re)):(q.assert(I===0),I=1,$+=Re.length);break;case 5:q.assert(I!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let ut=t.getTokenText();X!==void 0&&$+ut.length>X&&Mn.push(ut.slice(X-$)),$+=ut.length;break;case 1:break e;case 82:I=2,ne(t.getTokenValue());break;case 19:I=2;let fn=t.getTokenFullStart(),an=t.getTokenEnd()-1,Kt=l(an);if(Kt){ur||zi(Mn),Vr.push(P(y.createJSDocText(Mn.join("")),ur??te,fn)),Vr.push(Kt),Mn=[],ur=t.getTokenEnd();break}default:I=2,ne(t.getTokenText());break}I===2?nn(!1):Be()}let re=Mn.join("").trimEnd();Vr.length&&re.length&&Vr.push(P(y.createJSDocText(re),ur??te,pr)),Vr.length&&De&&q.assertIsDefined(pr,"having parsed tags implies that the end of the comment span should be set");let Ne=De&&At(De,Ht,Nt);return P(y.createJSDocComment(Vr.length?At(Vr,te,pr):re.length?re:void 0,Ne),te,Je)}function zi(I){for(;I.length&&(I[0]===`
|
||||
`||I[0]==="\r");)I.shift()}function mp(I){for(;I.length;){let X=I[I.length-1].trimEnd();if(X==="")I.pop();else if(X.length<I[I.length-1].length){I[I.length-1]=X;break}else break}}function $n(){for(;;){if(Be(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function Tn(){if(!((u()===5||u()===4)&&H($n)))for(;u()===5||u()===4;)Be()}function j(){if((u()===5||u()===4)&&H($n))return"";let I=t.hasPrecedingLineBreak(),X=!1,$="";for(;I&&u()===42||u()===5||u()===4;)$+=t.getTokenText(),u()===4?(I=!0,X=!0,$=""):u()===42&&(I=!1),Be();return X?$:""}function n(I){q.assert(u()===60);let X=t.getTokenStart();Be();let $=li(void 0),ne=j(),re;switch($.escapedText){case"author":re=j0(X,$,I,ne);break;case"implements":re=U0(X,$,I,ne);break;case"augments":case"extends":re=B0(X,$,I,ne);break;case"class":case"constructor":re=Wi(X,y.createJSDocClassTag,$,I,ne);break;case"public":re=Wi(X,y.createJSDocPublicTag,$,I,ne);break;case"private":re=Wi(X,y.createJSDocPrivateTag,$,I,ne);break;case"protected":re=Wi(X,y.createJSDocProtectedTag,$,I,ne);break;case"readonly":re=Wi(X,y.createJSDocReadonlyTag,$,I,ne);break;case"override":re=Wi(X,y.createJSDocOverrideTag,$,I,ne);break;case"deprecated":Vn=!0,re=Wi(X,y.createJSDocDeprecatedTag,$,I,ne);break;case"this":re=dd(X,$,I,ne);break;case"enum":re=V0(X,$,I,ne);break;case"arg":case"argument":case"param":return Vi(X,$,2,I);case"return":case"returns":re=M0(X,$,I,ne);break;case"template":re=hd(X,$,I,ne);break;case"type":re=pd(X,$,I,ne);break;case"typedef":re=W0(X,$,I,ne);break;case"callback":re=Y0(X,$,I,ne);break;case"overload":re=H0(X,$,I,ne);break;case"satisfies":re=q0(X,$,I,ne);break;case"see":re=L0(X,$,I,ne);break;case"exception":case"throws":re=J0(X,$,I,ne);break;case"import":re=F0(X,$,I,ne);break;default:re=pe(X,$,I,ne);break}return re}function i(I,X,$,ne){return ne||($+=X-I),s($,ne.slice($))}function s(I,X){let $=M(),ne=[],re=[],Ne,Re=0,ut;function fn(Qn){ut||(ut=I),ne.push(Qn),I+=Qn.length}X!==void 0&&(X!==""&&fn(X),Re=1);let an=u();e:for(;;){switch(an){case 4:Re=0,ne.push(t.getTokenText()),I=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:q.assert(Re!==2&&Re!==3,"whitespace shouldn't come from the scanner while saving comment text");let Qn=t.getTokenText();ut!==void 0&&I+Qn.length>ut&&(ne.push(Qn.slice(ut-I)),Re=2),I+=Qn.length;break;case 19:Re=2;let tl=t.getTokenFullStart(),Pa=t.getTokenEnd()-1,nl=l(Pa);nl?(re.push(P(y.createJSDocText(ne.join("")),Ne??$,tl)),re.push(nl),ne=[],Ne=t.getTokenEnd()):fn(t.getTokenText());break;case 62:Re===3?Re=2:Re=3,fn(t.getTokenText());break;case 82:Re!==3&&(Re=2),fn(t.getTokenValue());break;case 42:if(Re===0){Re=1,I+=1;break}default:Re!==3&&(Re=2),fn(t.getTokenText());break}Re===2||Re===3?an=nn(Re===3):an=Be()}zi(ne);let Kt=ne.join("").trimEnd();if(re.length)return Kt.length&&re.push(P(y.createJSDocText(Kt),Ne??$)),At(re,$,t.getTokenEnd());if(Kt.length)return Kt}function l(I){let X=le(v);if(!X)return;Be(),Tn();let $=d(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),Be();let re=X==="link"?y.createJSDocLink:X==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return P(re($,ne.join("")),I,t.getTokenEnd())}function d(){if(St(u())){let I=M(),X=jt();for(;Le(25);)X=P(y.createQualifiedName(X,u()===81?Gt(80,!1):jt()),I);for(;u()===81;)Pt(),Be(),X=P(y.createJSDocMemberName(X,gt()),I);return X}}function v(){if(j(),u()===19&&Be()===60&&St(Be())){let I=t.getTokenValue();if(F(I))return I}}function F(I){return I==="link"||I==="linkcode"||I==="linkplain"}function pe(I,X,$,ne){return P(y.createJSDocUnknownTag(X,i(I,M(),$,ne)),I)}function Fe(I){I&&(De?De.push(I):(De=[I],Ht=I.pos),Nt=I.end)}function It(){return j(),u()===19?m():void 0}function fr(){let I=Gi(23);I&&Tn();let X=Gi(62),$=ey();return X&&zl(62),I&&(Tn(),pt(64)&&kt(),J(24)),{name:$,isBracketed:I}}function xn(I){switch(I.kind){case 151:return!0;case 189:return xn(I.elementType);default:return Pf(I)&&Ke(I.typeName)&&I.typeName.escapedText==="Object"&&!I.typeArguments}}function Vi(I,X,$,ne){let re=It(),Ne=!re;j();let{name:Re,isBracketed:ut}=fr(),fn=j();Ne&&!H(v)&&(re=It());let an=i(I,M(),ne,fn),Kt=O0(re,Re,$,ne);Kt&&(re=Kt,Ne=!0);let Qn=$===1?y.createJSDocPropertyTag(X,Re,ut,re,Ne,an):y.createJSDocParameterTag(X,Re,ut,re,Ne,an);return P(Qn,I)}function O0(I,X,$,ne){if(I&&xn(I.type)){let re=M(),Ne,Re;for(;Ne=le(()=>yp($,ne,X));)Ne.kind===342||Ne.kind===349?Re=wn(Re,Ne):Ne.kind===346&&on(Ne.tagName,A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Re){let ut=P(y.createJSDocTypeLiteral(Re,I.type.kind===189),re);return P(y.createJSDocTypeExpression(ut),re)}}}function M0(I,X,$,ne){Zt(De,y6)&&rt(X.pos,t.getTokenStart(),A._0_tag_already_specified,l_(X.escapedText));let re=It();return P(y.createJSDocReturnTag(X,re,i(I,M(),$,ne)),I)}function pd(I,X,$,ne){Zt(De,Vf)&&rt(X.pos,t.getTokenStart(),A._0_tag_already_specified,l_(X.escapedText));let re=m(!0),Ne=$!==void 0&&ne!==void 0?i(I,M(),$,ne):void 0;return P(y.createJSDocTypeTag(X,re,Ne),I)}funct
Line truncated
|
||||
`&&f[_-1]==="\r"?_-1:_}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=wy();return this.forEachChild(f),e;function t(h){let T=_(h);T&&e.add(T,h)}function a(h){let T=e.get(h);return T||e.set(h,T=[]),T}function _(h){let T=uf(h);return T&&(Ef(T)&&dr(T.expression)?T.expression.name.text:i1(T)?getNameFromPropertyName(T):void 0)}function f(h){switch(h.kind){case 263:case 219:case 175:case 174:let T=h,k=_(T);if(k){let y=a(k),G=Ba(y);G&&T.parent===G.parent&&T.symbol===G.symbol?T.body&&!G.body&&(y[y.length-1]=T):y.push(T)}Xt(h,f);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(h),Xt(h,f);break;case 170:if(!v_(h,31))break;case 261:case 209:{let y=h;if(Xg(y.name)){Xt(y.name,f);break}y.initializer&&f(y.initializer)}case 307:case 173:case 172:t(h);break;case 279:let c=h;c.exportClause&&(Q1(c.exportClause)?jn(c.exportClause.elements,f):f(c.exportClause.name));break;case 273:let W=h.importClause;W&&(W.name&&t(W.name),W.namedBindings&&(W.namedBindings.kind===275?t(W.namedBindings):jn(W.namedBindings.elements,f)));break;case 227:gf(h)!==0&&t(h);default:Xt(h,f)}}}},iv=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(_=>_)}getLineAndCharacterOfPosition(e){return qm(this,e)}};function av(){return{getNodeConstructor:()=>Yf,getTokenConstructor:()=>mh,getIdentifierConstructor:()=>hh,getPrivateIdentifierConstructor:()=>yh,getSourceFileConstructor:()=>rv,getSymbolConstructor:()=>ev,getTypeConstructor:()=>tv,getSignatureConstructor:()=>nv,getSourceMapSourceConstructor:()=>iv}}var sv=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],j3=[...sv,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];ub(av());var Ml=new Proxy({},{get:()=>!0});var Th=Ml["4.8"];function Rn(e,t=!1){if(e!=null){if(Th){if(t||Ol(e)){let a=Qm(e);return a?[...a]:void 0}return}return e.modifiers?.filter(a=>!Cl(a))}}function xi(e,t=!1){if(e!=null){if(Th){if(t||Gf(e)){let a=pf(e);return a?[...a]:void 0}return}return e.decorators?.filter(Cl)}}var xh={};var Ll=new Proxy({},{get:(e,t)=>t});var Sh=Ll,wh=Ll;var C=Sh,Rt=wh;var cv=Ml["5.0"],ye=Ae,lv=new Set([ye.AmpersandAmpersandToken,ye.BarBarToken,ye.QuestionQuestionToken]),uv=new Set([Ae.AmpersandAmpersandEqualsToken,Ae.AmpersandEqualsToken,Ae.AsteriskAsteriskEqualsToken,Ae.AsteriskEqualsToken,Ae.BarBarEqualsToken,Ae.BarEqualsToken,Ae.CaretEqualsToken,Ae.EqualsToken,Ae.GreaterThanGreaterThanEqualsToken,Ae.GreaterThanGreaterThanGreaterThanEqualsToken,Ae.LessThanLessThanEqualsToken,Ae.MinusEqualsToken,Ae.PercentEqualsToken,Ae.PlusEqualsToken,Ae.QuestionQuestionEqualsToken,Ae.SlashEqualsToken]),pv=new Set([ye.AmpersandAmpersandToken,ye.AmpersandToken,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.BarBarToken,ye.BarToken,ye.CaretToken,ye.EqualsEqualsEqualsToken,ye.EqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken,ye.GreaterThanEqualsToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanToken,ye.InKeyword,ye.InstanceOfKeyword,ye.LessThanEqualsToken,ye.LessThanLessThanToken,ye.LessThanToken,ye.MinusToken,ye.PercentToken,ye.PlusToken,ye.SlashToken]);function fv(e){return uv.has(e.kind)}function dv(e){return lv.has(e.kind)}function mv(e){return pv.has(e.kind)}function Qr(e){return nt(e)}function kh(e){return e.kind!==ye.SemicolonClassElement}function Ge(e,t){return Rn(t)?.some(_=>_.kind===e)===!0}function Eh(e){let t=Rn(e);return t==null?null:t[t.length-1]??null}function Ah(e){return e.kind===ye.CommaToken}function hv(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}function yv(e){return e.kind===ye.JSDocComment}function Ch(e){if(fv(e))return{type:C.AssignmentExpression,operator:Qr(e.kind)};if(dv(e))return{type:C.LogicalExpression,operator:Qr(e.kind)};if(mv(e))return{type:C.BinaryExpression,operator:Qr(e.kind)};throw new Error(`Unexpected binary operator ${nt(e.kind)}`)}function x_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Kr(e,t){let[a,_]=e.map(f=>x_(f,t));return{end:
Line truncated
|
||||
`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var _d=new WeakMap;function D4(e){return _d.has(e)||_d.set(e,C4(e)),_d.get(e)}var od=D4;function P4(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let _=e[a];if(t&&Un(_)===tr(t)&&od(_)&&od(t)&&(e.splice(a+1,1),_.value+="*//*"+t.value,_.range=[tr(_),Un(t)]),!s0(_)&&!Qa(_))throw new TypeError(`Unknown comment type: "${_.type}".`);t=_}}var o0=P4;function N4(e){return e!==null&&typeof e=="object"}var c0=N4;var E_=null;function A_(e){if(E_!==null&&typeof E_.property){let t=E_;return E_=A_.prototype=null,t}return E_=A_.prototype=e??Object.create(null),new A_}var I4=10;for(let e=0;e<=I4;e++)A_();function cd(e){return A_(e)}function O4(e,t="type"){cd(e);function a(_){let f=_[t],h=e[f];if(!Array.isArray(h))throw Object.assign(new Error(`Missing visitor keys for '${f}'.`),{node:_});return h}return a}var l0=O4;var w=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],u0={AccessorProperty:w[0],AnyTypeAnnotation:w[1],ArgumentPlaceholder:w[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:w[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:w[3],AsExpression:w[4],AssignmentExpression:w[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:w[6],BigIntLiteral:w[1],BigIntLiteralTypeAnnotation:w[1],BigIntTypeAnnotation:w[1],BinaryExpression:w[5],BindExpression:["object","callee"],BlockStatement:w[7],BooleanLiteral:w[1],BooleanLiteralTypeAnnotation:w[1],BooleanTypeAnnotation:w[1],BreakStatement:w[8],CallExpression:w[9],CatchClause:["param","body"],ChainExpression:w[3],ClassAccessorProperty:w[0],ClassBody:w[10],ClassDeclaration:w[11],ClassExpression:w[11],ClassImplements:w[12],ClassMethod:w[13],ClassPrivateMethod:w[13],ClassPrivateProperty:w[14],ClassProperty:w[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:w[15],ConditionalExpression:w[16],ConditionalTypeAnnotation:w[17],ContinueStatement:w[8],DebuggerStatement:w[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:w[18],DeclareEnum:w[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:w[20],DeclareFunction:["id","predicate"],DeclareHook:w[21],DeclareInterface:w[22],DeclareModule:w[19],DeclareModuleExports:w[23],DeclareNamespace:w[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:w[24],DeclareVariable:w[21],Decorator:w[3],Directive:w[18],DirectiveLiteral:w[1],DoExpression:w[10],DoWhileStatement:w[25],EmptyStatement:w[1],EmptyTypeAnnotation:w[1],EnumBigIntBody:w[26],EnumBigIntMember:w[27],EnumBooleanBody:w[26],EnumBooleanMember:w[27],EnumDeclaration:w[19],EnumDefaultedMember:w[21],EnumNumberBody:w[26],EnumNumberMember:w[27],EnumStringBody:w[26],EnumStringMember:w[27],EnumSymbolBody:w[26],ExistsTypeAnnotation:w[1],ExperimentalRestProperty:w[6],ExperimentalSpreadProperty:w[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:w[28],ExportNamedDeclaration:w[20],ExportNamespaceSpecifier:w[28],ExportSpecifier:["local","exported"],ExpressionStatement:w[3],File:["program"],ForInStatement:w[29],ForOfStatement:w[29],ForStatement:["init","test","update","body"],FunctionDeclaration:w[30],FunctionExpression:w[30],FunctionTypeAnnotation:["typeParameters","this","par
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(h0,"").trimEnd();let _=Object.create(null),f=Wr(0,e,y0,"").replace(h0,"").trimEnd(),h;for(;h=y0.exec(e);){let T=Wr(0,h[2],U4,"");if(typeof _[h[1]]=="string"||Array.isArray(_[h[1]])){let k=_[h[1]];_[h[1]]=[...F4,...Array.isArray(k)?k:[k],T]}else _[h[1]]=T}return{comments:f,pragmas:_}}var v0=["noformat","noprettier"],T0=["format","prettier"];function z4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var x0=z4;function S0(e){let t=x0(e);t&&(e=e.slice(t.length+1));let a=g0(e),{pragmas:_,comments:f}=b0(a);return{shebang:t,text:e,pragmas:_,comments:f}}function w0(e){let{pragmas:t}=S0(e);return T0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function k0(e){let{pragmas:t}=S0(e);return v0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function V4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:w0,hasIgnorePragma:k0,locStart:tr,locEnd:Un,...e}}var E0=V4;var A0=/^[^"'`]*<\/|^[^/]{2}.*\/>/mu;function W4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var C0=W4;var D0="module";var P0="commonjs",N0=[D0,P0];function I0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return D0;if(/\.(?:cjs|cts)$/iu.test(e))return P0}}var G4={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function Y4(e){let{message:t,location:a}=e;if(!a)return e;let{start:_,end:f}=a;return n0(t,{loc:{start:{line:_.line,column:_.column+1},end:{line:f.line,column:f.column+1}},cause:e})}var H4=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function X4(e,t){let a=[{...G4,filePath:t}],_=I0(t);if(_?a=a.map(h=>({...h,sourceType:_})):a=N0.flatMap(h=>a.map(T=>({...T,sourceType:h}))),H4(t))return a;let f=A0.test(e);return[f,!f].flatMap(h=>a.map(T=>({...T,jsx:h})))}function $4(e,t){let a=t?.filepath;typeof a!="string"&&(a=void 0);let _=C0(e),f=X4(e,a),h;try{h=r0(f.map(T=>()=>t0(_,T)))}catch({errors:[T]}){throw Y4(T)}return m0(h,{parser:"typescript",text:e})}var Q4=E0($4);return ay(K4);});
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
var ty=Object.defineProperty;var hd=(e,t)=>{for(var a in t)ty(e,a,{get:t[a],enumerable:!0})};var I0={};hd(I0,{parsers:()=>ld});var ld={};hd(ld,{typescript:()=>Y4});var ny=()=>()=>{},Na=ny;var Ia=(e,t)=>(a,_,...f)=>a|1&&_==null?void 0:(t.call(_)??_[e]).apply(_,f);var ry=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},iy=Ia("replaceAll",function(){if(typeof this=="string")return ry}),Wr=iy;var gm="5.9";var vt=[],ay=new Map;function e_(e){return e!==void 0?e.length:0}function jn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let _=t(e[a],a);if(_)return _}}function sy(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let _=t(e[a],a);if(_!==void 0)return _}}function yd(e,t,a){let _=[];q.assertEqual(e.length,t.length);for(let f=0;f<e.length;f++)_.push(a(e[f],t[f],f));return _}function Gp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function bm(e,t,a){if(e!==void 0)for(let _=a??0;_<e.length;_++){let f=e[_];if(t(f,_))return f}}function gp(e,t,a){if(e===void 0)return-1;for(let _=a??0;_<e.length;_++)if(t(e[_],_))return _;return-1}function _y(e,t,a=Xp){if(e!==void 0){for(let _=0;_<e.length;_++)if(a(e[_],t))return!0}return!1}function Hr(e,t){if(e!==void 0){let a=e.length,_=0;for(;_<a&&t(e[_]);)_++;if(_<a){let f=e.slice(0,_);for(_++;_<a;){let h=e[_];t(h)&&f.push(h),_++}return f}}return e}function Pp(e,t){let a;if(e!==void 0){a=[];for(let _=0;_<e.length;_++)a.push(t(e[_],_))}return a}function vm(e){let t=[];for(let a=0;a<e.length;a++){let _=e[a];_&&($r(_)?En(t,_):t.push(_))}return t}function Tm(e,t){let a;if(e!==void 0)for(let _=0;_<e.length;_++){let f=t(e[_],_);f&&($r(f)?a=En(a,f):a=wn(a,f))}return a??vt}function oy(e,t){let a;if(e!==void 0)for(let _=0;_<e.length;_++){let f=e[_],h=t(f,_);(a||f!==h||$r(h))&&(a||(a=e.slice(0,_)),$r(h)?En(a,h):a.push(h))}return a??e}function cy(e,t){let a=[];if(e!==void 0)for(let _=0;_<e.length;_++){let f=t(e[_],_);f!==void 0&&a.push(f)}return a}function Zt(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Yp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function ly(e,t,a=Xp){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let _=0;_<e.length;_++)if(!a(e[_],t[_],_))return!1;return!0}function wn(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function Np(e,t){return t<0?e.length+t:t}function En(e,t,a,_){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,_);a=a===void 0?0:Np(t,a),_=_===void 0?t.length:Np(t,_);for(let f=a;f<_&&f<t.length;f++)t[f]!==void 0&&e.push(t[f]);return e}function uy(e,t,a){return _y(e,t,a)?!1:(e.push(t),!0)}function py(e,t,a){return e!==void 0?(uy(e,t,a),e):[t]}function fy(e,t){return e.length===0?vt:e.slice().sort(t)}var Z4=Array.prototype.at?(e,t)=>e?.at(t):(e,t)=>{if(e!==void 0&&(t=Np(e,t),t<e.length))return e[t]};function Hp(e){return e===void 0||e.length===0?void 0:e[0]}function Ba(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function dy(e){return q.assert(e.length!==0),e[e.length-1]}function my(e){return e!==void 0&&e.length===1?e[0]:void 0}function hy(e,t,a,_,f){return yy(e,a(t),a,_,f)}function yy(e,t,a,_,f){if(!Zt(e))return-1;let h=f??0,T=e.length-1;for(;h<=T;){let k=h+(T-h>>1),c=a(e[k],k);switch(_(c,t)){case-1:h=k+1;break;case 0:return k;case 1:T=k-1;break}}return~h}function gy(e,t,a,_,f){if(e&&e.length>0){let h=e.length;if(h>0){let T=_===void 0||_<0?0:_,k=f===void 0||T+f>h-1?h-1:T+f,c;for(arguments.length<=2?(c=e[T],T++):c=a;T<=k;)c=t(c,e[T],T),T++;return c}}return a}var xm=Object.prototype.hasOwnProperty;function Dr(e,t){return xm.call(e,t)}function by(e){let t=[];for(let a in e)xm.call(e,a)&&t.push(a);return t}function vy(){let e=new Map;return e.add=Ty,e.remove=xy,e}function Ty(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function xy(e,t){let a=this.get(e);a!==void 0&&(Ny(a,t),a.length||this.delete(e))}function $r(e){return Array.isArray(e)}function bp(e){return $r(e)?e:[e]}function Sy(e,t){return e!==void 0&&t(e)?e:void 0}function Er(e,t){return e!==void 0&&t(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(t)}'.`)}function Va(e){}function wy(){return!0}function bt(e){return e}function gd(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Kn(e){let t=new Map;return a=>{let _=`${typeof a}:${a}`,f=t.get(_);return f===void 0&&!t.has(_)&&(f=e(a),t.set(_,f)),f}}function Xp(e,t){return e===t}function $p(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function ky(e,t){return Xp(e,t)}function Ey(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function Sm(e,t){return Ey(e,t)}function Ay(e,t,a){for(let _=0;_<e.length;_++)t=Math.max(t,a(e[_]));return t}function t_(e,t,a){let _=Math.max(2,Math.floor(e.length*.34)),f=Math.floor(e.length*.4)+1,h;for(let T of t){let k=a(T);if(k!==void 0&&Math.abs(k.length-e.length)<=_){Line truncated
|
||||
Node ${Ot(L.kind)} was unexpected.`,fe||G)}e.failBadSyntaxKind=G;function E(L,se,fe,Te){L||(se=se?`False expression: ${se}`:"False expression.",fe&&(se+=`\r
|
||||
Verbose Debug Information: `+(typeof fe=="string"?fe:fe())),y(se,Te||E))}e.assert=E;function D(L,se,fe,Te,He){if(L!==se){let Qe=fe?Te?`${fe} ${Te}`:fe:"";y(`Expected ${L} === ${se}. ${Qe}`,He||D)}}e.assertEqual=D;function R(L,se,fe,Te){L>=se&&y(`Expected ${L} < ${se}. ${fe||""}`,Te||R)}e.assertLessThan=R;function ue(L,se,fe){L>se&&y(`Expected ${L} <= ${se}`,fe||ue)}e.assertLessThanOrEqual=ue;function be(L,se,fe){L<se&&y(`Expected ${L} >= ${se}`,fe||be)}e.assertGreaterThanOrEqual=be;function he(L,se,fe){L==null&&y(se,fe||he)}e.assertIsDefined=he;function de(L,se,fe){return he(L,se,fe||de),L}e.checkDefined=de;function O(L,se,fe){for(let Te of L)he(Te,se,fe||O)}e.assertEachIsDefined=O;function ae(L,se,fe){return O(L,se,fe||ae),L}e.checkEachDefined=ae;function Oe(L,se="Illegal value:",fe){let Te=typeof L=="object"&&Dr(L,"kind")&&Dr(L,"pos")?"SyntaxKind: "+Ot(L.kind):JSON.stringify(L);return y(`${se} ${Te}`,fe||Oe)}e.assertNever=Oe;function V(L,se,fe,Te){W(1,"assertEachNode")&&E(se===void 0||Gp(L,se),fe||"Unexpected node.",()=>`Node array did not pass test '${hn(se)}'.`,Te||V)}e.assertEachNode=V;function oe(L,se,fe,Te){W(1,"assertNode")&&E(L!==void 0&&(se===void 0||se(L)),fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`,Te||oe)}e.assertNode=oe;function Y(L,se,fe,Te){W(1,"assertNotNode")&&E(L===void 0||se===void 0||!se(L),fe||"Unexpected node.",()=>`Node ${Ot(L.kind)} should not have passed test '${hn(se)}'.`,Te||Y)}e.assertNotNode=Y;function ft(L,se,fe,Te){W(1,"assertOptionalNode")&&E(se===void 0||L===void 0||se(L),fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`,Te||ft)}e.assertOptionalNode=ft;function nr(L,se,fe,Te){W(1,"assertOptionalToken")&&E(se===void 0||L===void 0||L.kind===se,fe||"Unexpected node.",()=>`Node ${Ot(L?.kind)} was not a '${Ot(se)}' token.`,Te||nr)}e.assertOptionalToken=nr;function mn(L,se,fe){W(1,"assertMissingNode")&&E(L===void 0,se||"Unexpected node.",()=>`Node ${Ot(L.kind)} was unexpected'.`,fe||mn)}e.assertMissingNode=mn;function rr(L){}e.type=rr;function hn(L){if(typeof L!="function")return"";if(Dr(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),fe=/^function\s+([\w$]+)\s*\(/.exec(se);return fe?fe[1]:""}}e.getFunctionName=hn;function Dn(L){return`{ name: ${l_(L.escapedName)}; flags: ${ot(L.flags)}; declarations: ${Pp(L.declarations,se=>Ot(se.kind))} }`}e.formatSymbol=Dn;function We(L=0,se,fe){let Te=Ir(se);if(L===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(fe){let He=[],Qe=L;for(let[st,Ct]of Te){if(st>L)break;st!==0&&st&L&&(He.push(Ct),Qe&=~st)}if(Qe===0)return He.join("|")}else for(let[He,Qe]of Te)if(He===L)return Qe;return L.toString()}e.formatEnum=We;let ir=new Map;function Ir(L){let se=ir.get(L);if(se)return se;let fe=[];for(let He in L){let Qe=L[He];typeof Qe=="number"&&fe.push([Qe,He])}let Te=fy(fe,(He,Qe)=>Sm(He[0],Qe[0]));return ir.set(L,Te),Te}function Ot(L){return We(L,Ae,!1)}e.formatSyntaxKind=Ot;function Bn(L){return We(L,Cm,!1)}e.formatSnippetKind=Bn;function Pn(L){return We(L,Pr,!1)}e.formatScriptKind=Pn;function Mt(L){return We(L,sn,!0)}e.formatNodeFlags=Mt;function ht(L){return We(L,km,!0)}e.formatNodeCheckFlags=ht;function $e(L){return We(L,Qp,!0)}e.formatModifierFlags=$e;function qn(L){return We(L,Am,!0)}e.formatTransformFlags=qn;function $t(L){return We(L,Dm,!0)}e.formatEmitFlags=$t;function ot(L){return We(L,Kp,!0)}e.formatSymbolFlags=ot;function at(L){return We(L,en,!0)}e.formatTypeFlags=at;function Bt(L){return We(L,Em,!0)}e.formatSignatureFlags=Bt;function Lt(L){return We(L,Zp,!0)}e.formatObjectFlags=Lt;function ct(L){return We(L,Op,!0)}e.formatFlowFlags=ct;function ar(L){return We(L,wm,!0)}e.formatRelationComparisonResult=ar;function dt(L){return We(L,CheckMode,!0)}e.formatCheckMode=dt;function yn(L){return We(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=yn;function yt(L){return We(L,TypeFacts,!0)}e.formatTypeFacts=yt;let _n=!1,tt;function qt(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",fe=this.flags&-2048;return`${se}${fe?` (${ct(fe)})`:""}`}},__debugFlowFlags:{get(){return We(this.flags,Op,!0)}},__debugToString:{value(){return yr(this)}}})}function tn(L){return _n&&(typeof Object.setPrototypeOf=="function"?(tt||(tt=Object.create(Object.prototype),qt(tt)),Object.setPrototypeOf(L,tt)):qt(L)),L}e.attachFlowNodeDebugInfo=tn;let sr;function mr(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function hr(L){_n&&(typeof Object.setPrototypeOf=="function"?(sr||
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Oe(this)}}}e.DebugTypeMapper=Or;function Vn(L){return e.isDebugging?Object.setPrototypeOf(L,Or.prototype):L}e.attachDebugPrototypeIfDebug=Vn;function Ce(L){return console.log(yr(L))}e.printControlFlowGraph=Ce;function yr(L){let se=-1;function fe(u){return u.id||(u.id=se,se--),u.id}let Te;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Te||(Te={}));let He;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})(He||(He={}));let Qe=2032,st=882,Ct=Object.create(null),Tt=[],lt=[],Mr=Se(L,new Set);for(let u of Tt)u.text=rt(u.flowNode,u.circular),me(u);let gr=Ve(Mr),Nn=Ze(gr);return Ye(Mr,0),on();function Wn(u){return!!(u.flags&128)}function wi(u){return!!(u.flags&12)&&!!u.antecedent}function U(u){return!!(u.flags&Qe)}function K(u){return!!(u.flags&st)}function Z(u){let Ie=[];for(let Me of u.edges)Me.source===u&&Ie.push(Me.target);return Ie}function xe(u){let Ie=[];for(let Me of u.edges)Me.target===u&&Ie.push(Me.source);return Ie}function Se(u,Ie){let Me=fe(u),B=Ct[Me];if(B&&Ie.has(u))return B.circular=!0,B={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Tt.push(B),B;if(Ie.add(u),!B)if(Ct[Me]=B={id:Me,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Tt.push(B),wi(u))for(let Be of u.antecedent)we(B,Be,Ie);else U(u)&&we(B,u.antecedent,Ie);return Ie.delete(u),B}function we(u,Ie,Me){let B=Se(Ie,Me),Be={source:u,target:B};lt.push(Be),u.edges.push(Be),B.edges.push(Be)}function me(u){if(u.level!==-1)return u.level;let Ie=0;for(let Me of xe(u))Ie=Math.max(Ie,me(Me)+1);return u.level=Ie}function Ve(u){let Ie=0;for(let Me of Z(u))Ie=Math.max(Ie,Ve(Me));return Ie+1}function Ze(u){let Ie=M(Array(u),0);for(let Me of Tt)Ie[Me.level]=Math.max(Ie[Me.level],Me.text.length);return Ie}function Ye(u,Ie){if(u.lane===-1){u.lane=Ie,u.endLane=Ie;let Me=Z(u);for(let B=0;B<Me.length;B++){B>0&&Ie++;let Be=Me[B];Ye(Be,Ie),Be.endLane>u.endLane&&(Ie=Be.endLane)}u.endLane=Ie}}function Ee(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function gn(u){let Ie=hi(u);return Od(Ie,u,!1)}function rt(u,Ie){let Me=Ee(u.flags);if(Ie&&(Me=`${Me}#${fe(u)}`),Wn(u)){let B=[],{switchStatement:Be,clauseStart:nn,clauseEnd:ze}=u.node;for(let Xe=nn;Xe<ze;Xe++){let Dt=Be.caseBlock.clauses[Xe];r6(Dt)?B.push("default"):B.push(gn(Dt.expression))}Me+=` (${B.join(", ")})`}else K(u)&&u.node&&(Me+=` (${gn(u.node)})`);return Ie==="circularity"?`Circular(${Me})`:Me}function on(){let u=Nn.length,Ie=Ay(Tt,0,ze=>ze.lane)+1,Me=M(Array(Ie),""),B=Nn.map(()=>Array(Ie)),Be=Nn.map(()=>M(Array(Ie),0));for(let ze of Tt){B[ze.level][ze.lane]=ze;let Xe=Z(ze);for(let wt=0;wt<Xe.length;wt++){let Pt=Xe[wt],Ft=8;Pt.lane===ze.lane&&(Ft|=4),wt>0&&(Ft|=1),wt<Xe.length-1&&(Ft|=2),Be[ze.level][Pt.lane]|=Ft}Xe.length===0&&(Be[ze.level][ze.lane]|=16);let Dt=xe(ze);for(let wt=0;wt<Dt.length;wt++){let Pt=Dt[wt],Ft=4;wt>0&&(Ft|=1),wt<Dt.length-1&&(Ft|=2),Be[ze.level-1][Pt.lane]|=Ft}}for(let ze=0;ze<u;ze++)for(let Xe=0;Xe<Ie;Xe++){let Dt=ze>0?Be[ze-1][Xe]:0,wt=Xe>0?Be[ze][Xe-1]:0,Pt=Be[ze][Xe];Pt||(Dt&8&&(Pt|=12),wt&2&&(Pt|=3),Be[ze][Xe]=Pt)}for(let ze=0;ze<u;ze++)for(let Xe=0;Xe<Me.length;Xe++){let Dt=Be[ze][Xe],wt=Dt&4?"\u2500":" ",Pt=B[ze][Xe];Pt?(nn(Xe,Pt.text),ze<u-1&&(nn(Xe," "),nn(Xe,Ue(wt,Nn[ze]-Pt.text.length)))):ze<u-1&&nn(Xe,Ue(wt,Nn[ze]+1)),nn(Xe,Zr(Dt)),nn(Xe,Dt&8&&ze<u-1&&!B[ze+1][Xe]?"\u2500":" ")}return`
|
||||
${Me.join(`
|
||||
`)}
|
||||
`;function nn(ze,Xe){Me[ze]+=Xe}}function Zr(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function M(u,Ie){if(u.fill)u.fill(Ie);else for(let Me=0;Me<u.length;Me++)u[Me]=Ie;return u}function Ue(u,Ie){if(u.repeat)return Ie>0?u.repeat(Ie):"";let Me="";for(;Me.length<Ie;)Me+=u;return Me}}e.formatControlFlowGraph=yr})(q||(q={}));var e3=Date.now,bd=()=>{},Oy=()=>{},ll,Ae=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,Z=c;continue}c++}return q.assert(Se!==void 0),D=xe,Se}function Ot(U){let K=c;if(c++,c>=W)return Y(A.Unexpected_end_of_text),"";let Z=V(c);switch(c++,Z){case 48:if(c>=W||!fi(V(c)))return"\0";case 49:case 50:case 51:c<W&&Tp(V(c))&&c++;case 52:case 53:case 54:case 55:if(c<W&&Tp(V(c))&&c++,R|=2048,U&6){let we=parseInt(k.substring(K+1,c),8);return U&4&&!(U&32)&&Z!==48?Y(A.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,K,c-K,"\\x"+we.toString(16).padStart(2,"0")):Y(A.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,K,c-K,"\\x"+we.toString(16).padStart(2,"0")),String.fromCharCode(we)}return k.substring(K,c);case 56:case 57:return R|=2048,U&6?(U&4&&!(U&32)?Y(A.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,K,c-K):Y(A.Escape_sequence_0_is_not_allowed,K,c-K,k.substring(K,c)),String.fromCharCode(Z)):k.substring(K,c);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(c<W&&V(c)===123){c-=2;let we=Bn(!!(U&6));return U&17||(R|=2048,U&6&&Y(A.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,K,c-K)),we}for(;c<K+6;c++)if(!(c<W&&vp(V(c))))return R|=2048,U&6&&Y(A.Hexadecimal_digit_expected),k.substring(K,c);R|=1024;let xe=parseInt(k.substring(K+2,c),16),Se=String.fromCharCode(xe);if(U&16&&xe>=55296&&xe<=56319&&c+6<W&&k.substring(c,c+2)==="\\u"&&V(c+2)!==123){let we=c,me=c+2;for(;me<we+6;me++)if(!vp(V(me)))return Se;let Ve=parseInt(k.substring(we+2,me),16);if(Ve>=56320&&Ve<=57343)return c=me,Se+String.fromCharCode(Ve)}return Se;case 120:for(;c<K+4;c++)if(!(c<W&&vp(V(c))))return R|=2048,U&6&&Y(A.Hexadecimal_digit_expected),k.substring(K,c);return R|=4096,String.fromCharCode(parseInt(k.substring(K+2,c),16));case 13:c<W&&V(c)===10&&c++;case 10:case 8232:case 8233:return"";default:return(U&16||U&4&&!(U&8)&&Ar(Z,e))&&Y(A.This_character_cannot_be_escaped_in_a_regular_expression,c-2,2),String.fromCharCode(Z)}}function Bn(U){let K=c;c+=3;let Z=c,xe=Dn(1,!1),Se=xe?parseInt(xe,16):-1,we=!1;return Se<0?(U&&Y(A.Hexadecimal_digit_expected),we=!0):Se>1114111&&(U&&Y(A.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,Z,c-Z),we=!0),c>=W?(U&&Y(A.Unexpected_end_of_text),we=!0):V(c)===125?c++:(U&&Y(A.Unterminated_Unicode_escape_sequence),we=!0),we?(R|=2048,k.substring(K,c)):(R|=8,kd(Se))}function Pn(){if(c+5<W&&V(c+1)===117){let U=c;c+=2;let K=hn(4,!1);return c=U,K}return-1}function Mt(){if(ae(c+1)===117&&ae(c+2)===123){let U=c;c+=3;let K=Dn(1,!1),Z=K?parseInt(K,16):-1;return c=U,Z}return-1}function ht(){let U="",K=c;for(;c<W;){let Z=ae(c);if(Ar(Z,e))c+=Vt(Z);else if(Z===92){if(Z=Mt(),Z>=0&&Ar(Z,e)){U+=Bn(!0),K=c;continue}if(Z=Pn(),!(Z>=0&&Ar(Z,e)))break;R|=1024,U+=k.substring(K,c),U+=kd(Z),c+=6,K=c}else break}return U+=k.substring(K,c),U}function $e(){let U=D.length;if(U>=2&&U<=12){let K=D.charCodeAt(0);if(K>=97&&K<=122){let Z=Wy.get(D);if(Z!==void 0)return E=Z}}return E=80}function qn(U){let K="",Z=!1,xe=!1;for(;;){let Se=V(c);if(Se===95){R|=512,Z?(Z=!1,xe=!0):Y(xe?A.Multiple_consecutive_numeric_separators_are_not_permitted:A.Numeric_separators_are_not_allowed_here,c,1),c++;continue}if(Z=!0,!fi(Se)||Se-48>=U)break;K+=k[c],c++,xe=!1}return V(c-1)===95&&Y(A.Numeric_separators_are_not_allowed_here,c-1,1),K}function $t(){return V(c)===110?(D+="n",R&384&&(D=vb(D)+"n"),c++,10):(D=""+(R&128?parseInt(D.slice(2),2):R&256?parseInt(D.slice(2),8):+D),9)}function ot(){for(y=c,R=0;;){if(G=c,c>=W)return E=1;let U=ae(c);if(c===0&&U===35&&Fm(k,c)){if(c=zm(k,c),t)continue;return E=6}switch(U){case 10:case 13:if(R|=1,t){c++;continue}else return U===13&&c+1<W&&V(c+1)===10?c+=2:c++,E=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){c++;continue}else{for(;c<W&&n_(V(c));)c++;return E=5}case 33:return V(c+1)===61?V(c+2)===61?(c+=3,E=38):(c+=2,E=36):(c++,E=54);case 34:case 39:return D=ir(),E=11;case 96:return E=Ir(!1);case 37:return V(c+1)===61?(c+=2,E=70):(c++,E=45);case 38:return V(c+1)===38?V(c+2)===61?(c+=3,E=77):(c+=2,E=56):V(c+1)===61?(c+=2,E=74):(c++,E=51);case 40:return c++,E=21;case 41:return c++,E=22;case 42:if(V(c+1)===61)return c+=2,E=67;if(V(c+1)===42)return V(c+2)===61?(c+=3,E=68):(c+=2,E=43);if(c++,be&&(R&32768)===0&&R&1){R|=32768;continue}return E=42;case 43:return V(c+1)===43?(c+=2,E=46):V(c+1)===61?(c+=2,E=65):(c++,E=40);case 44:return c++,E=28;case 45:return V(c+1)===45?(c+=2,E=47):V(c+1)===61?(c+=2,E=66):(c++,E=41);case 46:return fi(V(c+1))?(nr(),E=9):V(c+1)===46&&V(c+2)===46?(c+=3,E=26):(c++,E=25);case 47:if(V(c+1)===47){for(c+=2;c<W&&!kn(V(c));)c++;if(ue=_n(ue,k.slice(G,c),Qy,G),t)continue;return E=2}if(V(c+1)===42){c+=2;let me=V(c)===42&&V(c+1)!==47,Ve=!1,Ze=G;for(;c<W;){let Ye=V(c);if(Ye===42&&V(c+1)===47){c+=2,Ve=!0;break}c++,kn(Ye)&&(Ze=c,R|=1)}if(me&&at()&&(R|=2),ue=_n(ue,k.slice(Ze,c),Ky,Ze),Ve||Y(A.Asterisk_Slash_expected),t)continue;return Ve||(R|=4),E=3}return V(c+1)===61?(c+=2,E=69):(c++,E=44);case 48:if(c+2<W&&(V(c+1)===88||V(c+1)===120))return c+=2,D=Dn(1,!0),D||(Y(A.Hexadecimal_digit_expected),D="0"),D="0x"+D,R|=64,E=$t();if(c+2<W&&(V(c+1)===66||V(c+1)===98))return c+=2,D=qn(2),D||(Y(A.Binary_digit_expected),D="0"),D="0b"+D,R|=128,E=$t();if(c+2<W&&(V(c+1)===79||V(c+1)===111))return c+=2,D=qn(8),D||(Y(A.Octal_digit_expected),D="0"),D="0o"+D,R|=256,E=$t();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return E=nr();case 58:return c++,E=59;case 59:return c++,E=27;case 60:if($i(k,c)){if(c=Ma(k,c,Y),t)continue;return E=7}return V(c+1)===60?V(c+2)===61?(c+=3,E=71):(c+=2,E=48):V(c+1)===61?(c+=2,E=33):a===1&&V(c+1)===47&&V(c+2)!==42?(c+=2,E=31):(c++,E=30);case 61:if($i(k,c)){if(c=Ma(k,c,Y),t)continue;return E=7}retu
Line truncated
|
||||
`)),_}function za(e){let t=e.emitNode;return t&&t.flags||0}function c2(e,t,a){q.assertGreaterThanOrEqual(t,0),q.assertGreaterThanOrEqual(a,0),q.assertLessThanOrEqual(t,e.length),q.assertLessThanOrEqual(t+a,e.length)}function pl(e){return e.kind===245&&e.expression.kind===11}function hf(e){return!!(za(e)&2097152)}function Md(e){return hf(e)&&jf(e)}function l2(e){return Ke(e.name)&&!e.initializer}function Ld(e){return hf(e)&&Xa(e)&&Gp(e.declarationList.declarations,l2)}function u2(e,t){let a=e.kind===170||e.kind===169||e.kind===219||e.kind===220||e.kind===218||e.kind===261||e.kind===282?Yp(og(t,e.pos),Lp(t,e.pos)):Lp(t,e.pos);return Hr(a,_=>_.end<=e.end&&t.charCodeAt(_.pos+1)===42&&t.charCodeAt(_.pos+2)===42&&t.charCodeAt(_.pos+3)!==47)}function p2(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function f2(e){return e&&e.kind===242&&mf(e.parent)}function Jd(e){let t=e.kind;return(t===212||t===213)&&e.expression.kind===108}function ia(e){return!!e&&!!(e.flags&524288)}function d2(e){return!!e&&!!(e.flags&16777216)}function m2(e){for(;vl(e,!0);)e=e.right;return e}function h2(e){return Ke(e)&&e.escapedText==="exports"}function y2(e){return Ke(e)&&e.escapedText==="module"}function p1(e){return(dr(e)||f1(e))&&y2(e.expression)&&f_(e)==="exports"}function yf(e){let t=b2(e);return t===5||ia(e)?t:0}function g2(e){return e_(e.arguments)===3&&dr(e.expression)&&Ke(e.expression.expression)&&An(e.expression.expression)==="Object"&&An(e.expression.name)==="defineProperty"&&Al(e.arguments[1])&&p_(e.arguments[0],!0)}function f1(e){return Ha(e)&&Al(e.argumentExpression)}function b_(e,t){return dr(e)&&(!t&&e.expression.kind===110||Ke(e.name)&&p_(e.expression,!0))||d1(e,t)}function d1(e,t){return f1(e)&&(!t&&e.expression.kind===110||xf(e.expression)||b_(e.expression,!0))}function p_(e,t){return xf(e)||b_(e,t)}function b2(e){if(Of(e)){if(!g2(e))return 0;let t=e.arguments[0];return h2(t)||p1(t)?8:b_(t)&&f_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!v1(e.left)||v2(m2(e))?0:p_(e.left.expression,!0)&&f_(e.left)==="prototype"&&If(x2(e))?6:T2(e.left)}function v2(e){return Kb(e)&&aa(e.expression)&&e.expression.text==="0"}function gf(e){if(dr(e))return e.name;let t=vf(e.argumentExpression);return aa(t)||El(t)?t:e}function f_(e){let t=gf(e);if(t){if(Ke(t))return t.escapedText;if(El(t)||aa(t))return La(t.text)}}function T2(e){if(e.expression.kind===110)return 4;if(p1(e))return 2;if(p_(e.expression,!0)){if(Q2(e.expression))return 3;let t=e;for(;!Ke(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&f_(t)==="exports")&&b_(e))return 1;if(p_(e,!0)||Ha(e)&&J2(e))return 5}return 0}function x2(e){for(;na(e.right);)e=e.right;return e.right}function S2(e){return Pl(e)&&na(e.expression)&&yf(e.expression)!==0&&na(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function w2(e){switch(e.kind){case 244:let t=Up(e);return t&&t.initializer;case 173:return e.initializer;case 304:return e.initializer}}function Up(e){return Xa(e)?Hp(e.declarationList.declarations):void 0}function k2(e){return Ti(e)&&e.body&&e.body.kind===268?e.body:void 0}function bf(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function E2(e,t){let a;p2(e)&&n2(e)&&Ki(e.initializer)&&(a=En(a,jd(e,e.initializer.jsDoc)));let _=e;for(;_&&_.parent;){if(Ki(_)&&(a=En(a,jd(e,_.jsDoc))),_.kind===170){a=En(a,(t?vg:bg)(_));break}if(_.kind===169){a=En(a,(t?xg:Tg)(_));break}_=C2(_)}return a||vt}function jd(e,t){let a=dy(t);return Tm(t,_=>{if(_===a){let f=Hr(_.tags,h=>A2(e,h));return _.tags===f?[_]:f}else return Hr(_.tags,u6)})}function A2(e,t){return!(zf(t)||m6(t))||!t.parent||!rh(t.parent)||!Dl(t.parent.parent)||t.parent.parent===e}function C2(e){let t=e.parent;if(t.kind===304||t.kind===278||t.kind===173||t.kind===245&&e.kind===212||t.kind===254||k2(t)||vl(e))return t;if(t.parent&&(Up(t.parent)===e||vl(t)))return t.parent;if(t.parent&&t.parent.parent&&(Up(t.parent.parent)||w2(t.parent.parent)===e||S2(t.parent.parent)))return t.parent.parent}function vf(e,t){return Vf(e,t?-2147483647:1)}function D2(e){let t=P2(e);if(t&&ia(e)){let a=Sg(e);if(a)return a.class}return t}function P2(e){let t=Tf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function N2(e){if(ia(e))return wg(e).map(t=>t.c
Line truncated
|
||||
`,te)+1)+4;function ne(Re){X||(X=$),Mn.push(Re),$+=Re.length}for(Be();Gi(5););Gi(4)&&(I=0,$=0);e:for(;;){switch(u()){case 60:mp(Mn),pr||(pr=M()),Fe(n($)),I=0,X=void 0;break;case 4:Mn.push(t.getTokenText()),I=0,$=0;break;case 42:let Re=t.getTokenText();I===1?(I=2,ne(Re)):(q.assert(I===0),I=1,$+=Re.length);break;case 5:q.assert(I!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let ut=t.getTokenText();X!==void 0&&$+ut.length>X&&Mn.push(ut.slice(X-$)),$+=ut.length;break;case 1:break e;case 82:I=2,ne(t.getTokenValue());break;case 19:I=2;let fn=t.getTokenFullStart(),an=t.getTokenEnd()-1,Kt=l(an);if(Kt){ur||zi(Mn),Vr.push(P(y.createJSDocText(Mn.join("")),ur??te,fn)),Vr.push(Kt),Mn=[],ur=t.getTokenEnd();break}default:I=2,ne(t.getTokenText());break}I===2?nn(!1):Be()}let re=Mn.join("").trimEnd();Vr.length&&re.length&&Vr.push(P(y.createJSDocText(re),ur??te,pr)),Vr.length&&De&&q.assertIsDefined(pr,"having parsed tags implies that the end of the comment span should be set");let Ne=De&&At(De,Ht,Nt);return P(y.createJSDocComment(Vr.length?At(Vr,te,pr):re.length?re:void 0,Ne),te,Je)}function zi(I){for(;I.length&&(I[0]===`
|
||||
`||I[0]==="\r");)I.shift()}function mp(I){for(;I.length;){let X=I[I.length-1].trimEnd();if(X==="")I.pop();else if(X.length<I[I.length-1].length){I[I.length-1]=X;break}else break}}function $n(){for(;;){if(Be(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function Tn(){if(!((u()===5||u()===4)&&H($n)))for(;u()===5||u()===4;)Be()}function j(){if((u()===5||u()===4)&&H($n))return"";let I=t.hasPrecedingLineBreak(),X=!1,$="";for(;I&&u()===42||u()===5||u()===4;)$+=t.getTokenText(),u()===4?(I=!0,X=!0,$=""):u()===42&&(I=!1),Be();return X?$:""}function n(I){q.assert(u()===60);let X=t.getTokenStart();Be();let $=li(void 0),ne=j(),re;switch($.escapedText){case"author":re=j0(X,$,I,ne);break;case"implements":re=U0(X,$,I,ne);break;case"augments":case"extends":re=B0(X,$,I,ne);break;case"class":case"constructor":re=Wi(X,y.createJSDocClassTag,$,I,ne);break;case"public":re=Wi(X,y.createJSDocPublicTag,$,I,ne);break;case"private":re=Wi(X,y.createJSDocPrivateTag,$,I,ne);break;case"protected":re=Wi(X,y.createJSDocProtectedTag,$,I,ne);break;case"readonly":re=Wi(X,y.createJSDocReadonlyTag,$,I,ne);break;case"override":re=Wi(X,y.createJSDocOverrideTag,$,I,ne);break;case"deprecated":Vn=!0,re=Wi(X,y.createJSDocDeprecatedTag,$,I,ne);break;case"this":re=fd(X,$,I,ne);break;case"enum":re=V0(X,$,I,ne);break;case"arg":case"argument":case"param":return Vi(X,$,2,I);case"return":case"returns":re=M0(X,$,I,ne);break;case"template":re=md(X,$,I,ne);break;case"type":re=ud(X,$,I,ne);break;case"typedef":re=W0(X,$,I,ne);break;case"callback":re=Y0(X,$,I,ne);break;case"overload":re=H0(X,$,I,ne);break;case"satisfies":re=q0(X,$,I,ne);break;case"see":re=L0(X,$,I,ne);break;case"exception":case"throws":re=J0(X,$,I,ne);break;case"import":re=F0(X,$,I,ne);break;default:re=pe(X,$,I,ne);break}return re}function i(I,X,$,ne){return ne||($+=X-I),s($,ne.slice($))}function s(I,X){let $=M(),ne=[],re=[],Ne,Re=0,ut;function fn(Qn){ut||(ut=I),ne.push(Qn),I+=Qn.length}X!==void 0&&(X!==""&&fn(X),Re=1);let an=u();e:for(;;){switch(an){case 4:Re=0,ne.push(t.getTokenText()),I=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:q.assert(Re!==2&&Re!==3,"whitespace shouldn't come from the scanner while saving comment text");let Qn=t.getTokenText();ut!==void 0&&I+Qn.length>ut&&(ne.push(Qn.slice(ut-I)),Re=2),I+=Qn.length;break;case 19:Re=2;let tl=t.getTokenFullStart(),Pa=t.getTokenEnd()-1,nl=l(Pa);nl?(re.push(P(y.createJSDocText(ne.join("")),Ne??$,tl)),re.push(nl),ne=[],Ne=t.getTokenEnd()):fn(t.getTokenText());break;case 62:Re===3?Re=2:Re=3,fn(t.getTokenText());break;case 82:Re!==3&&(Re=2),fn(t.getTokenValue());break;case 42:if(Re===0){Re=1,I+=1;break}default:Re!==3&&(Re=2),fn(t.getTokenText());break}Re===2||Re===3?an=nn(Re===3):an=Be()}zi(ne);let Kt=ne.join("").trimEnd();if(re.length)return Kt.length&&re.push(P(y.createJSDocText(Kt),Ne??$)),At(re,$,t.getTokenEnd());if(Kt.length)return Kt}function l(I){let X=le(v);if(!X)return;Be(),Tn();let $=d(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),Be();let re=X==="link"?y.createJSDocLink:X==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return P(re($,ne.join("")),I,t.getTokenEnd())}function d(){if(St(u())){let I=M(),X=jt();for(;Le(25);)X=P(y.createQualifiedName(X,u()===81?Gt(80,!1):jt()),I);for(;u()===81;)Pt(),Be(),X=P(y.createJSDocMemberName(X,gt()),I);return X}}function v(){if(j(),u()===19&&Be()===60&&St(Be())){let I=t.getTokenValue();if(F(I))return I}}function F(I){return I==="link"||I==="linkcode"||I==="linkplain"}function pe(I,X,$,ne){return P(y.createJSDocUnknownTag(X,i(I,M(),$,ne)),I)}function Fe(I){I&&(De?De.push(I):(De=[I],Ht=I.pos),Nt=I.end)}function It(){return j(),u()===19?m():void 0}function fr(){let I=Gi(23);I&&Tn();let X=Gi(62),$=ey();return X&&zl(62),I&&(Tn(),pt(64)&&kt(),J(24)),{name:$,isBracketed:I}}function xn(I){switch(I.kind){case 151:return!0;case 189:return xn(I.elementType);default:return Df(I)&&Ke(I.typeName)&&I.typeName.escapedText==="Object"&&!I.typeArguments}}function Vi(I,X,$,ne){let re=It(),Ne=!re;j();let{name:Re,isBracketed:ut}=fr(),fn=j();Ne&&!H(v)&&(re=It());let an=i(I,M(),ne,fn),Kt=O0(re,Re,$,ne);Kt&&(re=Kt,Ne=!0);let Qn=$===1?y.createJSDocPropertyTag(X,Re,ut,re,Ne,an):y.createJSDocParameterTag(X,Re,ut,re,Ne,an);return P(Qn,I)}function O0(I,X,$,ne){if(I&&xn(I.type)){let re=M(),Ne,Re;for(;Ne=le(()=>yp($,ne,X));)Ne.kind===342||Ne.kind===349?Re=wn(Re,Ne):Ne.kind===346&&on(Ne.tagName,A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Re){let ut=P(y.createJSDocTypeLiteral(Re,I.type.kind===189),re);return P(y.createJSDocTypeExpression(ut),re)}}}function M0(I,X,$,ne){Zt(De,f6)&&rt(X.pos,t.getTokenStart(),A._0_tag_already_specified,l_(X.escapedText));let re=It();return P(y.createJSDocReturnTag(X,re,i(I,M(),$,ne)),I)}function ud(I,X,$,ne){Zt(De,zf)&&rt(X.pos,t.getTokenStart(),A._0_tag_already_specified,l_(X.escapedText));let re=m(!0),Ne=$!==void 0&&ne!==void 0?i(I,M(),$,ne):void 0;return P(y.createJSDocTypeTag(X,re,Ne),I)}funct
Line truncated
|
||||
`&&f[_-1]==="\r"?_-1:_}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=vy();return this.forEachChild(f),e;function t(h){let T=_(h);T&&e.add(T,h)}function a(h){let T=e.get(h);return T||e.set(h,T=[]),T}function _(h){let T=lf(h);return T&&(kf(T)&&dr(T.expression)?T.expression.name.text:r1(T)?getNameFromPropertyName(T):void 0)}function f(h){switch(h.kind){case 263:case 219:case 175:case 174:let T=h,k=_(T);if(k){let y=a(k),G=Ba(y);G&&T.parent===G.parent&&T.symbol===G.symbol?T.body&&!G.body&&(y[y.length-1]=T):y.push(T)}Xt(h,f);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(h),Xt(h,f);break;case 170:if(!v_(h,31))break;case 261:case 209:{let y=h;if(Wg(y.name)){Xt(y.name,f);break}y.initializer&&f(y.initializer)}case 307:case 173:case 172:t(h);break;case 279:let c=h;c.exportClause&&($1(c.exportClause)?jn(c.exportClause.elements,f):f(c.exportClause.name));break;case 273:let W=h.importClause;W&&(W.name&&t(W.name),W.namedBindings&&(W.namedBindings.kind===275?t(W.namedBindings):jn(W.namedBindings.elements,f)));break;case 227:yf(h)!==0&&t(h);default:Xt(h,f)}}}},ev=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(_=>_)}getLineAndCharacterOfPosition(e){return Bm(this,e)}};function tv(){return{getNodeConstructor:()=>Gf,getTokenConstructor:()=>dh,getIdentifierConstructor:()=>mh,getPrivateIdentifierConstructor:()=>hh,getSourceFileConstructor:()=>Z6,getSymbolConstructor:()=>$6,getTypeConstructor:()=>Q6,getSignatureConstructor:()=>K6,getSourceMapSourceConstructor:()=>ev}}var nv=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],I3=[...nv,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];_b(tv());var Ml=new Proxy({},{get:()=>!0});var vh=Ml["4.8"];function Rn(e,t=!1){if(e!=null){if(vh){if(t||Ol(e)){let a=$m(e);return a?[...a]:void 0}return}return e.modifiers?.filter(a=>!Cl(a))}}function xi(e,t=!1){if(e!=null){if(vh){if(t||Wf(e)){let a=uf(e);return a?[...a]:void 0}return}return e.decorators?.filter(Cl)}}var Th={};var Ll=new Proxy({},{get:(e,t)=>t});var xh=Ll,Sh=Ll;var C=xh,Rt=Sh;var av=Ml["5.0"],ye=Ae,sv=new Set([ye.AmpersandAmpersandToken,ye.BarBarToken,ye.QuestionQuestionToken]),_v=new Set([Ae.AmpersandAmpersandEqualsToken,Ae.AmpersandEqualsToken,Ae.AsteriskAsteriskEqualsToken,Ae.AsteriskEqualsToken,Ae.BarBarEqualsToken,Ae.BarEqualsToken,Ae.CaretEqualsToken,Ae.EqualsToken,Ae.GreaterThanGreaterThanEqualsToken,Ae.GreaterThanGreaterThanGreaterThanEqualsToken,Ae.LessThanLessThanEqualsToken,Ae.MinusEqualsToken,Ae.PercentEqualsToken,Ae.PlusEqualsToken,Ae.QuestionQuestionEqualsToken,Ae.SlashEqualsToken]),ov=new Set([ye.AmpersandAmpersandToken,ye.AmpersandToken,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.BarBarToken,ye.BarToken,ye.CaretToken,ye.EqualsEqualsEqualsToken,ye.EqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken,ye.GreaterThanEqualsToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanToken,ye.InKeyword,ye.InstanceOfKeyword,ye.LessThanEqualsToken,ye.LessThanLessThanToken,ye.LessThanToken,ye.MinusToken,ye.PercentToken,ye.PlusToken,ye.SlashToken]);function cv(e){return _v.has(e.kind)}function lv(e){return sv.has(e.kind)}function uv(e){return ov.has(e.kind)}function Qr(e){return nt(e)}function wh(e){return e.kind!==ye.SemicolonClassElement}function Ge(e,t){return Rn(t)?.some(_=>_.kind===e)===!0}function kh(e){let t=Rn(e);return t==null?null:t[t.length-1]??null}function Eh(e){return e.kind===ye.CommaToken}function pv(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}function fv(e){return e.kind===ye.JSDocComment}function Ah(e){if(cv(e))return{type:C.AssignmentExpression,operator:Qr(e.kind)};if(lv(e))return{type:C.LogicalExpression,operator:Qr(e.kind)};if(uv(e))return{type:C.BinaryExpression,operator:Qr(e.kind)};throw new Error(`Unexpected binary operator ${nt(e.kind)}`)}function x_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Kr(e,t){let[a,_]=e.map(f=>x_(f,t));return{end:
Line truncated
|
||||
`);return t.length>1&&t.every(a=>a.trimStart()[0]==="*")}var sd=new WeakMap;function k4(e){return sd.has(e)||sd.set(e,w4(e)),sd.get(e)}var _d=k4;function E4(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let _=e[a];if(t&&Un(_)===tr(t)&&_d(_)&&_d(t)&&(e.splice(a+1,1),_.value+="*//*"+t.value,_.range=[tr(_),Un(t)]),!a0(_)&&!Qa(_))throw new TypeError(`Unknown comment type: "${_.type}".`);t=_}}var _0=E4;function A4(e){return e!==null&&typeof e=="object"}var o0=A4;var E_=null;function A_(e){if(E_!==null&&typeof E_.property){let t=E_;return E_=A_.prototype=null,t}return E_=A_.prototype=e??Object.create(null),new A_}var C4=10;for(let e=0;e<=C4;e++)A_();function od(e){return A_(e)}function D4(e,t="type"){od(e);function a(_){let f=_[t],h=e[f];if(!Array.isArray(h))throw Object.assign(new Error(`Missing visitor keys for '${f}'.`),{node:_});return h}return a}var c0=D4;var w=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],l0={AccessorProperty:w[0],AnyTypeAnnotation:w[1],ArgumentPlaceholder:w[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:w[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:w[3],AsExpression:w[4],AssignmentExpression:w[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:w[6],BigIntLiteral:w[1],BigIntLiteralTypeAnnotation:w[1],BigIntTypeAnnotation:w[1],BinaryExpression:w[5],BindExpression:["object","callee"],BlockStatement:w[7],BooleanLiteral:w[1],BooleanLiteralTypeAnnotation:w[1],BooleanTypeAnnotation:w[1],BreakStatement:w[8],CallExpression:w[9],CatchClause:["param","body"],ChainExpression:w[3],ClassAccessorProperty:w[0],ClassBody:w[10],ClassDeclaration:w[11],ClassExpression:w[11],ClassImplements:w[12],ClassMethod:w[13],ClassPrivateMethod:w[13],ClassPrivateProperty:w[14],ClassProperty:w[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:w[15],ConditionalExpression:w[16],ConditionalTypeAnnotation:w[17],ContinueStatement:w[8],DebuggerStatement:w[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:w[18],DeclareEnum:w[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:w[20],DeclareFunction:["id","predicate"],DeclareHook:w[21],DeclareInterface:w[22],DeclareModule:w[19],DeclareModuleExports:w[23],DeclareNamespace:w[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:w[24],DeclareVariable:w[21],Decorator:w[3],Directive:w[18],DirectiveLiteral:w[1],DoExpression:w[10],DoWhileStatement:w[25],EmptyStatement:w[1],EmptyTypeAnnotation:w[1],EnumBigIntBody:w[26],EnumBigIntMember:w[27],EnumBooleanBody:w[26],EnumBooleanMember:w[27],EnumDeclaration:w[19],EnumDefaultedMember:w[21],EnumNumberBody:w[26],EnumNumberMember:w[27],EnumStringBody:w[26],EnumStringMember:w[27],EnumSymbolBody:w[26],ExistsTypeAnnotation:w[1],ExperimentalRestProperty:w[6],ExperimentalSpreadProperty:w[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:w[28],ExportNamedDeclaration:w[20],ExportNamespaceSpecifier:w[28],ExportSpecifier:["local","exported"],ExpressionStatement:w[3],File:["program"],ForInStatement:w[29],ForOfStatement:w[29],ForStatement:["init","test","update","body"],FunctionDeclaration:w[30],FunctionExpression:w[30],FunctionTypeAnnotation:["typeParameters","this","par
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(m0,"").trimEnd();let _=Object.create(null),f=Wr(0,e,h0,"").replace(m0,"").trimEnd(),h;for(;h=h0.exec(e);){let T=Wr(0,h[2],L4,"");if(typeof _[h[1]]=="string"||Array.isArray(_[h[1]])){let k=_[h[1]];_[h[1]]=[...R4,...Array.isArray(k)?k:[k],T]}else _[h[1]]=T}return{comments:f,pragmas:_}}var b0=["noformat","noprettier"],v0=["format","prettier"];function U4(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var T0=U4;function x0(e){let t=T0(e);t&&(e=e.slice(t.length+1));let a=y0(e),{pragmas:_,comments:f}=g0(a);return{shebang:t,text:e,pragmas:_,comments:f}}function S0(e){let{pragmas:t}=x0(e);return v0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function w0(e){let{pragmas:t}=x0(e);return b0.some(a=>Object.prototype.hasOwnProperty.call(t,a))}function B4(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:S0,hasIgnorePragma:w0,locStart:tr,locEnd:Un,...e}}var k0=B4;var E0=/^[^"'`]*<\/|^[^/]{2}.*\/>/mu;function q4(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var A0=q4;var C0="module";var D0="commonjs",P0=[C0,D0];function N0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return C0;if(/\.(?:cjs|cts)$/iu.test(e))return D0}}var F4={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function z4(e){let{message:t,location:a}=e;if(!a)return e;let{start:_,end:f}=a;return t0(t,{loc:{start:{line:_.line,column:_.column+1},end:{line:f.line,column:f.column+1}},cause:e})}var V4=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e);function W4(e,t){let a=[{...F4,filePath:t}],_=N0(t);if(_?a=a.map(h=>({...h,sourceType:_})):a=P0.flatMap(h=>a.map(T=>({...T,sourceType:h}))),V4(t))return a;let f=E0.test(e);return[f,!f].flatMap(h=>a.map(T=>({...T,jsx:h})))}function G4(e,t){let a=t?.filepath;typeof a!="string"&&(a=void 0);let _=A0(e),f=W4(e,a),h;try{h=n0(f.map(T=>()=>e0(_,T)))}catch({errors:[T]}){throw z4(T)}return d0(h,{parser:"typescript",text:e})}var Y4=k0(G4);export{I0 as default,ld as parsers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
yaml: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
yaml: Printer;
|
||||
};
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Mi=Object.create;var mt=Object.defineProperty;var ki=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,Ii=Object.prototype.hasOwnProperty;var ne=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sr=(t,e)=>{for(var n in e)mt(t,n,{get:e[n],enumerable:!0})},ir=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Pi(e))!Ii.call(t,s)&&s!==n&&mt(t,s,{get:()=>e[s],enumerable:!(r=ki(e,s))||r.enumerable});return t};var or=(t,e,n)=>(n=t!=null?Mi(vi(t)):{},ir(e||!t||!t.__esModule?mt(n,"default",{value:t,enumerable:!0}):n,t)),_i=t=>ir(mt({},"__esModule",{value:!0}),t);var ce=ne(B=>{"use strict";var ie={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},st={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},po="tag:yaml.org,2002:",mo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Wr(t){let e=[0],n=t.indexOf(`
|
||||
`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(`
|
||||
`,n);return e}function Kr(t){let e,n;return typeof t=="string"?(e=Wr(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Wr(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function Sn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Kr(e);if(!n||!r||t>r.length)return null;for(let i=0;i<n.length;++i){let o=n[i];if(t<o)return{line:i,col:t-n[i-1]+1};if(t===o)return{line:i+1,col:1}}let s=n.length;return{line:s,col:t-n[s-1]+1}}function ho(t,e){let{lineStarts:n,src:r}=Kr(e);if(!n||!(t>=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===`
|
||||
`;)--i;return r.slice(s,i)}function go({start:t,end:e},n,r=80){let s=ho(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s}
|
||||
${c}${l}${a}`}var xe=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;i<e.length&&!(e[i]>r);)++i;this.origStart=r+i;let o=i;for(;i<e.length&&!(e[i]>=s);)++i;return this.origEnd=s+i,o}},oe=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===`
|
||||
`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===`
|
||||
`?r+`
|
||||
`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==`
|
||||
`)return!1;if(r){if(s!==r)return!1}else if(s!==ie.DIRECTIVES_END&&s!==ie.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===`
|
||||
`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[`
|
||||
`," "," ",">"]:[`
|
||||
`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==`
|
||||
`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===`
|
||||
`)return n;for(;r&&r!==`
|
||||
`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===`
|
||||
`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===`
|
||||
`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==`
|
||||
`&&e[n-1]===`
|
||||
`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===`
|
||||
`;){switch(a){case`
|
||||
`:s=0,n+=1,o+=`
|
||||
`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.ANCHOR,!0);if(n!=null)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,ie.COMMENT,!0);r!=null&&e.push(r)}return e.length>0?e.join(`
|
||||
`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]===ie.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]!==ie.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[st.FLOW_MAP,st.FLOW_SEQ,st.QUOTE_DOUBLE,st.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=Sn(this.range.start,this.context.root);if(!e)return;let n=Sn(this.range.end,this.context.root);return{start:e,end:n}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange;return this.context.src.slice(e,n)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.TAG,!1);if(n!=null){if(n[1]==="<")return{verbatim:n.slice(2,-1)};{let[r,s,i]=n.match(/^(.*!)([^!]*)$/);return{handle:s,suffix:i}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:n}=this.valueRange,{src:r}=this.context;for(let s=e;s<n;++s)if(r[s]===`
|
||||
`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===ie.COMMENT){let r=t.endOfLine(n,e+1),s=new xe(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ge=class extends Error{constructor(e,n,r){if(!r||!(n instanceof oe))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new xe(this.offset,this.offset+1);let n=e&&Sn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&go(this.linePos,e);s&&(this.message+=`:
|
||||
|
||||
${s}
|
||||
`)}delete this.source}},wn=class extends ge{constructor(e,n){super("YAMLReferenceError",e,n)}},it=class extends ge{constructor(e,n){super("YAMLSemanticError",e,n)}},bn=class extends ge{constructor(e,n){super("YAMLSyntaxError",e,n)}},Nn=class extends ge{constructor(e,n){super("YAMLWarning",e,n)}};function yo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var On=class t extends oe{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==`
|
||||
`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===`
|
||||
`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;e<n&&(s===`
|
||||
`||s===" "||s===" ");)s=r[--n-1];let i="";for(let a=e;a<n;++a){let c=r[a];if(c===`
|
||||
`){let{fold:l,offset:f}=oe.foldNewline(r,a,-1);i+=l,a=f}else if(c===" "||c===" "){let l=a,f=r[a+1];for(;a<n&&(f===" "||f===" ");)a+=1,f=r[a+1];f!==`
|
||||
`&&(i+=a>l?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new it(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new it(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===`
|
||||
`&&!oe.atDocumentBoundary(s,i+1);a=s[i]){let c=oe.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===`
|
||||
`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==`
|
||||
`&&(i=t.endOfLine(s,n,r)),this.valueRange=new xe(n,i),i=oe.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};B.Char=ie;B.Node=oe;B.PlainValue=On;B.Range=xe;B.Type=st;B.YAMLError=ge;B.YAMLReferenceError=wn;B.YAMLSemanticError=it;B.YAMLSyntaxError=bn;B.YAMLWarning=Nn;B._defineProperty=yo;B.defaultTagPrefix=po;B.defaultTags=mo});var Qr=ne(jr=>{"use strict";var u=ce(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ot=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],g=null;for(;l===`
|
||||
`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===`
|
||||
`&&m.length===0&&(g=new Ee,o=g.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(g){let h=e.parent.items||e.parent.contents;h&&h.push(g)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function An(t){let e=t;for(;e instanceof ot;)e=e.node;if(!(e instanceof _t))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var _t=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==`
|
||||
`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start<e.context.lineStart){this.props=e.props.slice(0,r+1),e.props=e.props.slice(r+1);let s=e.props[0]||e.valueRange;e.range.start=s.start;break}this.items=[e];let n=An(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===`
|
||||
`||l==="#";){if(f&&l===`
|
||||
`&&!m){let h=new Ee;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c<i+a&&!t.nextContentHasIndent(s,c,a))return c;let h=new ye;if(c=h.parse({indent:a,lineStart:i,src:s},c),this.items.push(h),this.valueRange.end=c,c>=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),d=s[h];(!d||d===`
|
||||
`||d==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(c<i+a){i>n&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===`
|
||||
`||h===" "||h===" "){let d="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,d)}}let g=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!g)return c;if(this.items.push(g),this.valueRange.end=g.valueRange.end,c=u.Node.normalizeOffset(s,g.range.end),l=s[c],f=!1,m=g.includesTrailingLines,l){let h=c-1,d=s[h];for(;d===" "||d===" ";)d=s[--h];d===`
|
||||
`&&(i=h+1,f=!0)}let y=An(g);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o<n.length;++o){let a=n[o],{atLineStart:c,indent:l}=a.context;if(c)for(let f=0;f<l;++f)i+=" ";i+=String(a)}return u.Node.addStringTerminator(e,r.end,i)}},Ln=class extends u.Node{constructor(){super(u.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!==" "&&s!==" ";)s=n[r+=1];return this.name=n.slice(e,r),r}parseParameters(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!=="#";)s=n[r+=1];return this.valueRange=new u.Range(e,r),r}parse(e,n){this.context=e;let r=this.parseName(n+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new u.Range(n,r),r}},Tn=class t extends u.Node{static startCommentOrEndBlankLine(e,n){let r=u.Node.endOfWhiteSpace(e,n),s=e[r];return s==="#"||s===`
|
||||
`?r:n}constructor(){super(u.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){let{src:n}=this.context;this.directives=[];let r=!0,s=!1,i=e;for(;!u.Node.atDocumentBoundary(n,i,u.Char.DIRECTIVES_END);)switch(i=t.startCommentOrEndBlankLine(n,i),n[i]){case`
|
||||
`:if(r){let o=new Ee;i=o.parse({src:n},i),i<n.length&&this.directives.push(o)}else i+=1,r=!0;break;case"#":{let o=new ye;i=o.parse({src:n},i),this.directives.push(o),r=!1}break;case"%":{let o=new Ln;i=o.parse({parent:this,src:n},i),this.directives.push(o),s=!0,r=!1}break;default:return s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case`
|
||||
`:if(o){let a=new Ee;i=a.parse({src:r},i),i<r.length&&this.contents.push(a)}else i+=1,o=!0;s=i;break;case"#":{let a=new ye;i=a.parse({src:r},i),this.contents.push(a),o=!1}break;default:{let a=u.Node.endOfIndent(r,i),l=n({atLineStart:o,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},a);if(!l)return this.valueRange.end=a;this.contents.push(l),i=l.range.end,o=!1;let f=An(l);f&&Array.prototype.push.apply(this.contents,f)}}i=t.startCommentOrEndBlankLine(r,i)}if(this.valueRange.end=i,r[i]&&(this.documentEndMarker=new u.Range(i,i+3),i+=3,r[i])){if(i=u.Node.endOfWhiteSpace(r,i),r[i]==="#"){let a=new ye;i=a.parse({src:r},i),this.contents.push(a)}switch(r[i]){case`
|
||||
`:i+=1;break;case void 0:break;default:this.error=new u.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return i}parse(e,n){e.root=this,this.context=e;let{src:r}=e,s=r.charCodeAt(n)===65279?n+1:n;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.directives.forEach(r=>{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`---
|
||||
`),s+=e.join("")),s[s.length-1]!==`
|
||||
`&&(s+=`
|
||||
`),s}},Cn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},le={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},Mn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=le.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===le.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===`
|
||||
`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===le.KEEP)break;return""}o===`
|
||||
`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===le.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",g="",y=!1;for(let h=e;h<n;++h){for(let w=0;w<c&&s[h]===" ";++w)h+=1;let d=s[h];if(d===`
|
||||
`)g===`
|
||||
`?m+=`
|
||||
`:g=`
|
||||
`;else{let w=u.Node.endOfLine(s,h),P=s.slice(h,w);h=w,l&&(d===" "||d===" ")&&h<a?(g===" "?g=`
|
||||
`:!y&&!f&&g===`
|
||||
`&&(g=`
|
||||
|
||||
`),m+=g+P,g=w<n&&s[w]||"",y=!0):(m+=g+P,g=l&&h<a?" ":`
|
||||
`,y=!1),f&&P!==""&&(f=!1)}}return this.chomping===le.STRIP?m:m+`
|
||||
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,s="";for(;;){let i=n[r];switch(i){case"-":this.chomping=le.STRIP;break;case"+":this.chomping=le.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new u.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,s=!!this.blockIndent,i=e,o=e,a=1;for(let c=r[i];c===`
|
||||
`&&(i+=1,!u.Node.atDocumentBoundary(r,i));c=r[i]){let l=u.Node.endOfBlockIndent(r,n,i);if(l===null)break;let f=r[l],m=l-(i+n);if(this.blockIndent){if(f&&f!==`
|
||||
`&&m<this.blockIndent){if(r[l]==="#")break;if(!this.error){let y=`Block scalars must not be less indented than their ${s?"explicit indentation indicator":"first line"}`;this.error=new u.YAMLSemanticError(this,y)}}}else if(r[l]!==`
|
||||
`){if(m<a){let g="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new u.YAMLSemanticError(this,g)}this.blockIndent=m}else m>a&&(a=m);r[l]===`
|
||||
`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==le.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},kn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case`
|
||||
`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===`
|
||||
`){let f=new Ee;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c<o+i||a!=="]"&&a!=="}")){let f="Insufficient indentation in flow collection";this.error=new u.YAMLSemanticError(this,f)}}break;case",":this.items.push({char:a,offset:c}),c+=1;break;case"#":{let l=new ye;c=l.parse({src:s},c),this.items.push(l)}break;case"?":case":":{let l=s[c+1];if(l===`
|
||||
`||l===" "||l===" "||l===","||a===":"&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:c}),c+=1;break}}default:{let l=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},c);if(!l)return this.valueRange=new u.Range(n,c),c;this.items.push(l),c=u.Node.normalizeOffset(s,l.range.end)}}c=u.Node.endOfWhiteSpace(s,c),a=s[c]}return this.valueRange=new u.Range(n,c+1),a&&(this.items.push({char:a,offset:c}),c=u.Node.endOfWhiteSpace(s,c+1),c=this.parseComment(c)),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;s<e.length&&!(e[s]>r.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===`
|
||||
`&&e[a-1]!==`
|
||||
`&&e[a]===`
|
||||
`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},Pn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(c==="\\")switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="\x07";break;case"b":o+="\b";break;case"e":o+="\x1B";break;case"f":o+="\f";break;case"n":o+=`
|
||||
`;break;case"r":o+="\r";break;case"t":o+=" ";break;case"v":o+="\v";break;case"N":o+="\x85";break;case"_":o+="\xA0";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case" ":o+=" ";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case`
|
||||
`:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},vn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(c==="'")o+=c,a+=1,i[a]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Eo(t,e){switch(t){case u.Type.ALIAS:return new Cn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new Mn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new kn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ot(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Pn(t,e);case u.Type.QUOTE_SINGLE:return new vn(t,e);default:return null}}var In=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:g,valueStart:y}=f.parseProps(l),h=Eo(g,m),d=h.parse(f,y);if(h.range=new u.Range(l,d),d<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=d,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new _t(h);return d=w.parse(new t(f),d),w.range=new u.Range(l,d),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ot)return!0;let i=e.range.end;return s[i]===`
|
||||
`||s[i-1]===`
|
||||
`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===`
|
||||
`;){if(a===`
|
||||
`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===`
|
||||
`);let m=l-(f+this.indent),g=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!g))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function So(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),`
|
||||
`)));let n=[],r=0;do{let s=new Tn,i=new In({src:t});r=s.parse(i,r),n.push(s)}while(r<t.length);return n.setOrigRanges=()=>{if(e.length===0)return!1;for(let i=1;i<e.length;++i)e[i]-=i;let s=0;for(let i=0;i<n.length;++i)s=n[i].setOrigRanges(e,s);return e.splice(0,e.length),!0},n.toString=()=>n.join(`...
|
||||
`),n}jr.parse=So});var De=ne(M=>{"use strict";var p=ce();function wo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)}
|
||||
${e}${t}`:t}function Re(t,e,n){return n?n.indexOf(`
|
||||
`)===-1?`${t} #${n}`:`${t}
|
||||
`+n.replace(/^/gm,`${e||""}#`):t}var j=class{};function fe(t,e,n){if(Array.isArray(t))return t.map((r,s)=>fe(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var x=class extends j{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:fe(this.value,e,n)}toString(){return String(this.value)}};function Gr(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Xr=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,Q=class t extends j{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Xr(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Gr(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof x?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof x&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Gr(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let g=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:i,inFlow:m,type:null});let y=!1,h=!1,d=this.items.reduce((P,A,C)=>{let L;A&&(!y&&A.spaceBefore&&P.push({type:"comment",str:""}),A.commentBefore&&A.commentBefore.match(/^.*$/gm).forEach(Ci=>{P.push({type:"comment",str:`#${Ci}`})}),A.comment&&(L=A.comment),m&&(!y&&A.spaceBefore||A.commentBefore||A.comment||A.key&&(A.key.commentBefore||A.key.comment)||A.value&&(A.value.commentBefore||A.value.comment))&&(h=!0)),y=!1;let R=f(A,e,()=>L=null,()=>y=!0);return m&&!h&&R.includes(`
|
||||
`)&&(h=!0),m&&C<this.items.length-1&&(R+=","),R=Re(R,i,L),y&&(L||m)&&(y=!1),P.push({type:"item",str:R}),P},[]),w;if(d.length===0)w=r.start+r.end;else if(m){let{start:P,end:A}=r,C=d.map(L=>L.str);if(h||C.reduce((L,R)=>L+R.length+2,2)>t.maxFlowStringSingleLineLength){w=P;for(let L of C)w+=L?`
|
||||
${l}${c}${L}`:`
|
||||
`;w+=`
|
||||
${c}${A}`}else w=`${P} ${C.join(" ")} ${A}`}else{let P=d.map(n);w=P.shift();for(let A of P)w+=A?`
|
||||
${c}${A}`:`
|
||||
`}return this.comment?(w+=`
|
||||
`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(Q,"maxFlowStringSingleLineLength",60);function xt(t){let e=t instanceof x?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var ue=class extends Q{add(e){this.items.push(e)}delete(e){let n=xt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=xt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof x?s.value:s}has(e){let n=xt(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=xt(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);this.items[r]=n}toJSON(e,n){let r=[];n&&n.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(fe(i,String(s++),n));return r}toString(e,n,r){return e?super.toString(e,{blockItem:s=>s.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},bo=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof j&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends j{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof j?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new x(null)),this.key instanceof j)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=fe(this.key,"",e);if(n instanceof Map){let s=fe(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=bo(this.key,r,e),i=fe(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof j&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof Q){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let f=!o&&(!a||l||(a instanceof j?a instanceof Q||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:g,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:g+y});let d=!1,w=h(a,e,()=>l=null,()=>d=!0);if(w=Re(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Re(w,e.indent,this.comment),n&&n()):d&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w}
|
||||
${g}:`:`${w}:`,this.comment&&(w=Re(w,e.indent,this.comment),n&&n());let P="",A=null;if(c instanceof j){if(c.spaceBefore&&(P=`
|
||||
`),c.commentBefore){let R=c.commentBefore.replace(/^/gm,`${e.indent}#`);P+=`
|
||||
${R}`}A=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof x&&(e.indentAtStart=w.length+1),d=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof ue&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let C=h(c,e,()=>A=null,()=>d=!0),L=" ";return P||this.comment?L=`${P}
|
||||
${e.indent}`:!f&&c instanceof Q?(!(C[0]==="["||C[0]==="{")||C.includes(`
|
||||
`))&&(L=`
|
||||
${e.indent}`):C[0]===`
|
||||
`&&(L=""),d&&!A&&r&&r(),Re(w+L+C,e.indent,A)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Rt=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof Q){let n=0;for(let r of t.items){let s=Rt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Rt(t.key,e),r=Rt(t.value,e);return Math.max(n,r)}return 1},we=class t extends j{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return fe(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Rt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function at(t,e){let n=e instanceof x?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var ct=class extends Q{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=at(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=at(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=at(this.items,e),s=r&&r.value;return!n&&s instanceof x?s.value:s}has(e){return!!at(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},zr="<<",Yt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof ue||(n=new ue,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new x(zr),new ue);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof ct))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},No={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Oo={trueStr:"true",falseStr:"false"},Ao={asBigInt:!1},Lo={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function xn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof x||(a=new x(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new x(t)}var Zr="flow",_n="block",Dt="quoted",Hr=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==`
|
||||
`);n=t[e+1]}return e};function Bt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let g,y,h=!1,d=-1,w=-1,P=-1;n===_n&&(d=Hr(t,d),d!==-1&&(m=d+c));for(let C;C=t[d+=1];){if(n===Dt&&C==="\\"){switch(w=d,t[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}P=d}if(C===`
|
||||
`)n===_n&&(d=Hr(t,d)),m=d+c,g=void 0;else{if(C===" "&&y&&y!==" "&&y!==`
|
||||
`&&y!==" "){let L=t[d+1];L&&L!==" "&&L!==`
|
||||
`&&L!==" "&&(g=d)}if(d>=m)if(g)l.push(g),m=g+c,g=void 0;else if(n===Dt){for(;y===" "||y===" ";)y=C,C=t[d+=1],h=!0;let L=d>P+1?d-2:w-1;if(f[L])return t;l.push(L),f[L]=!0,m=L+c,g=void 0}else h=!0}y=C}if(h&&a&&a(),l.length===0)return t;o&&o();let A=t.slice(0,l[0]);for(let C=0;C<l.length;++C){let L=l[C],R=l[C+1]||t.length;L===0?A=`
|
||||
${e}${t.slice(0,R)}`:(n===Dt&&f[L]&&(A+=`${t[L]}\\`),A+=`
|
||||
${e}${t.slice(L+1,R)}`)}return A}var Rn=({indentAtStart:t})=>t?Object.assign({indentAtStart:t},be.fold):be.fold,Ft=t=>/^(%|---|\.\.\.)/m.test(t);function To(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
||||
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Ft(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<s)l+=1;else{for(a+=i.slice(c,l)+`
|
||||
|
||||
`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
|
||||
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:Bt(a,o,Dt,Rn(e))}function es(t,e){if(e.implicitKey){if(/\n/.test(t))return Se(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return Se(t,e);let n=e.indent||(Ft(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:Bt(r,n,Zr,Rn(e))}function $t({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Se(n,r);let o=r.indent||(r.forceBlockIndent||Ft(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!To(n,be.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+`
|
||||
`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(`
|
||||
`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a}
|
||||
${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l}
|
||||
${o}${f}${n}${m}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let g=Bt(`${f}${n}${m}`,o,_n,be.fold);return`${l}
|
||||
${o}${g}`}function Co(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(`
|
||||
`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?es(o,e):Se(o,e):$t(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(`
|
||||
`)!==-1)return $t(t,e,n,r);if(l===""&&Ft(o))return e.forceBlockIndent=!0,$t(t,e,n,r);let m=o.replace(/\n+/g,`$&
|
||||
${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof xn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let g=c?m:Bt(m,l,Zr,Rn(e));return s&&!f&&(g.indexOf(`
|
||||
`)!==-1||s.indexOf(`
|
||||
`)!==-1)?(n&&n(),wo(g,l,s)):g}function Mo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return $t(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return es(c,e);case p.Type.PLAIN:return Co(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function ko({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function ts(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function ns(t,e){let n=e.context.src[e.range.start-1];if(n!==`
|
||||
`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function rs(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function ss(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=`
|
||||
`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=`
|
||||
`+s:t.comment=s)}}function Dn(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Po(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function vo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Po(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function Jr(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof Q?a:new x(a)}let i=Dn(t,e);return typeof i=="string"&&s.length>0?xn(i,s,r.scalarFallback):null}function Io({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function _o(t,e,n){try{let r=Jr(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Io(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=Jr(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var xo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Ro(t,e){let n={before:[],after:[]},r=!1,s=!1,i=xo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Do(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=vo(t,e);if(i)return _o(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Dn(t,e);return xn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function pe(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Ro(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Do(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(`
|
||||
`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore}
|
||||
${o}`:o);let a=n.after.join(`
|
||||
`);a&&(i.comment=i.comment?`${i.comment}
|
||||
${a}`:a)}return e.resolved=i}function $o(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?qo(t,e):Fo(t,e),s=new ct;s.items=r,ss(s,n);let i=!1;for(let o=0;o<r.length;++o){let{key:a}=r[o];if(a instanceof Q&&(i=!0),t.schema.merge&&a&&a.value===zr){r[o]=new Yt(r[o]);let c=r[o].value.items,l=null;c.some(f=>{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c<r.length;++c){let{key:l}=r[c];if(a===l||a&&l&&Object.prototype.hasOwnProperty.call(a,"value")&&a.value===l.value){let f=`Map keys must be unique; "${a}" is repeated`;t.errors.push(new p.YAMLSemanticError(e,f));break}}}if(i&&!t.options.mapAsMap){let o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,o))}return e.resolved=s,s}var Yo=({context:{lineStart:t,node:e,src:n},props:r})=>{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i<s;++i)if(n[i]===`
|
||||
`)return!1;return!0};function Bo(t,e){if(!Yo(t))return;let n=t.getPropValue(0,p.Char.COMMENT,!0),r=!1,s=e.value.commentBefore;if(s&&s.startsWith(n))e.value.commentBefore=s.substr(n.length+1),r=!0;else{let i=e.value.comment;!t.node&&i&&i.startsWith(n)&&(e.value.comment=i.substr(n.length+1),r=!0)}r&&(e.comment=n)}function Fo(t,e){let n=[],r=[],s,i=null;for(let o=0;o<e.items.length;++o){let a=e.items[o];switch(a.type){case p.Type.BLANK_LINE:n.push({afterKey:!!s,before:r.length});break;case p.Type.COMMENT:n.push({afterKey:!!s,before:r.length,comment:a.comment});break;case p.Type.MAP_KEY:s!==void 0&&r.push(new T(s)),a.error&&t.errors.push(a.error),s=pe(t,a.node),i=null;break;case p.Type.MAP_VALUE:{if(s===void 0&&(s=null),a.error&&t.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===p.Type.MAP&&!a.node.context.atLineStart){let f="Nested mappings are not allowed in compact mappings";t.errors.push(new p.YAMLSemanticError(a.node,f))}let c=a.node;if(!c&&a.props.length>0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,pe(t,c));Bo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(rs(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=pe(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function qo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;a<e.items.length;++a){let c=e.items[a];if(typeof c.char=="string"){let{char:l,offset:f}=c;if(l==="?"&&s===void 0&&!i){i=!0,o=":";continue}if(l===":"){if(s===void 0&&(s=null),o===":"){o=",";continue}}else if(i&&(s===void 0&&l!==","&&(s=null),i=!1),s!==void 0&&(r.push(new T(s)),s=void 0,l===",")){o=":";continue}if(l==="}"){if(a===e.items.length-1)continue}else if(l===o){o=":";continue}let m=`Flow map contains an unexpected ${l}`,g=new p.YAMLSyntaxError(e,m);g.offset=f,t.errors.push(g)}else c.type===p.Type.BLANK_LINE?n.push({afterKey:!!s,before:r.length}):c.type===p.Type.COMMENT?(ns(t.errors,c),n.push({afterKey:!!s,before:r.length,comment:c.comment})):s===void 0?(o===","&&t.errors.push(new p.YAMLSemanticError(c,"Separator , missing in flow map")),s=pe(t,c)):(o!==","&&t.errors.push(new p.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new T(s,pe(t,c))),s=void 0,i=!1)}return ts(t.errors,e),s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Uo(t,e){if(e.type!==p.Type.SEQ&&e.type!==p.Type.FLOW_SEQ){let i=`A ${e.type} node cannot be resolved as a sequence`;return t.errors.push(new p.YAMLSyntaxError(e,i)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_SEQ?Wo(t,e):Vo(t,e),s=new ue;if(s.items=r,ss(s,n),!t.options.mapAsMap&&r.some(i=>i instanceof T&&i.key instanceof Q)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Vo(t,e){let n=[],r=[];for(let s=0;s<e.items.length;++s){let i=e.items[s];switch(i.type){case p.Type.BLANK_LINE:n.push({before:r.length});break;case p.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case p.Type.SEQ_ITEM:if(i.error&&t.errors.push(i.error),r.push(pe(t,i.node)),i.hasProps){let o="Sequence items cannot have tags or anchors before the - indicator";t.errors.push(new p.YAMLSemanticError(i,o))}break;default:i.error&&t.errors.push(i.error),t.errors.push(new p.YAMLSyntaxError(i,`Unexpected ${i.type} node in sequence`))}}return{comments:n,items:r}}function Wo(t,e){let n=[],r=[],s=!1,i,o=null,a="[",c=null;for(let l=0;l<e.items.length;++l){let f=e.items[l];if(typeof f.char=="string"){let{char:m,offset:g}=f;if(m!==":"&&(s||i!==void 0)&&(s&&i===void 0&&(i=a?r.pop():null),r.push(new T(i)),s=!1,i=void 0,o=null),m===a)a=null;else if(!a&&m==="?")s=!0;else if(a!=="["&&m===":"&&i===void 0){if(a===","){if(i=r.pop(),i instanceof T){let y="Chaining flow sequence pairs is invalid",h=new p.YAMLSemanticError(e,y);h.offset=g,t.errors.push(h)}if(!s&&typeof o=="number"){let y=f.range?f.range.start:f.offset;y>o+1024&&t.errors.push(rs(e,i));let{src:h}=c.context;for(let d=o;d<y;++d)if(h[d]===`
|
||||
`){let w="Implicit keys of flow sequence pairs need to be on a single line";t.errors.push(new p.YAMLSemanticError(c,w));break}}}else i=null;o=null,s=!1,a=null}else if(a==="["||m!=="]"||l<e.items.length-1){let y=`Flow sequence contains an unexpected ${m}`,h=new p.YAMLSyntaxError(e,y);h.offset=g,t.errors.push(h)}}else if(f.type===p.Type.BLANK_LINE)n.push({before:r.length});else if(f.type===p.Type.COMMENT)ns(t.errors,f),n.push({comment:f.comment,before:r.length});else{if(a){let g=`Expected a ${a} in flow sequence`;t.errors.push(new p.YAMLSemanticError(f,g))}let m=pe(t,f);i===void 0?(r.push(m),c=f):(r.push(new T(i,m)),i=void 0),o=f.range.start,a=","}}return ts(t.errors,e),i!==void 0&&r.push(new T(i)),{comments:n,items:r}}M.Alias=we;M.Collection=Q;M.Merge=Yt;M.Node=j;M.Pair=T;M.Scalar=x;M.YAMLMap=ct;M.YAMLSeq=ue;M.addComment=Re;M.binaryOptions=No;M.boolOptions=Oo;M.findPair=at;M.intOptions=Ao;M.isEmptyPath=Xr;M.nullOptions=Lo;M.resolveMap=$o;M.resolveNode=pe;M.resolveSeq=Uo;M.resolveString=Dn;M.strOptions=be;M.stringifyNumber=ko;M.stringifyString=Mo;M.toJSON=fe});var Fn=ne(ee=>{"use strict";var G=ce(),O=De(),Ko={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}else{let r="This environment does not support reading binary tags; either Buffer or atob is required";return t.errors.push(new G.YAMLReferenceError(e,r)),null}},options:O.binaryOptions,stringify:({comment:t,type:e,value:n},r,s,i)=>{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<n.length;++c)a+=String.fromCharCode(n[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.binaryOptions.defaultType),e===G.Type.QUOTE_DOUBLE)n=o;else{let{lineWidth:a}=O.binaryOptions,c=Math.ceil(o.length/a),l=new Array(c);for(let f=0,m=0;f<c;++f,m+=a)l[f]=o.substr(m,a);n=l.join(e===G.Type.BLOCK_LITERAL?`
|
||||
`:" ")}return O.stringifyString({comment:t,type:e,value:n},r,s,i)}};function os(t,e){let n=O.resolveSeq(t,e);for(let r=0;r<n.items.length;++r){let s=n.items[r];if(!(s instanceof O.Pair)){if(s instanceof O.YAMLMap){if(s.items.length>1){let o="Each pair must have its own sequence indicator";throw new G.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore}
|
||||
${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function as(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var jo={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:os,createNode:as},$e=class t extends O.YAMLSeq{constructor(){super(),G._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),G._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),G._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),G._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),G._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};G._defineProperty($e,"tag","tag:yaml.org,2002:omap");function Qo(t,e){let n=os(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new G.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new $e,n)}function Go(t,e,n){let r=as(t,e,n),s=new $e;return s.items=r.items,s}var Ho={identify:t=>t instanceof Map,nodeClass:$e,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Qo,createNode:Go},Ye=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};G._defineProperty(Ye,"tag","tag:yaml.org,2002:set");function Jo(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new G.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ye,n)}function Xo(t,e,n){let r=new Ye;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var zo={identify:t=>t instanceof Set,nodeClass:Ye,default:!1,tag:"tag:yaml.org,2002:set",resolve:Jo,createNode:Xo},$n=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},cs=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},Zo={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>$n(e,n.replace(/_/g,"")),stringify:cs},ea={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>$n(e,n.replace(/_/g,"")),stringify:cs},ta={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=$n(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Yn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Bn(t,e){Yn(!1)&&console.warn(e?`${e}: ${t}`:t)}function na(t){if(Yn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Bn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var is={};function ra(t,e){if(!is[t]&&Yn(!0)){is[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Bn(n,"DeprecationWarning")}}ee.binary=Ko;ee.floatTime=ea;ee.intTime=Zo;ee.omap=Ho;ee.pairs=jo;ee.set=zo;ee.timestamp=ta;ee.warn=Bn;ee.warnFileDeprecation=na;ee.war
Line truncated
|
||||
${e.indent}${c}`:c}var Kn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Qt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Qt(r,e))):t instanceof S.Pair?(Qt(t.key,e),Qt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Sa=t=>Object.keys(Qt(t,{}));function wa(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(`
|
||||
`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(`
|
||||
`)||null;else{let i=n.before.join(`
|
||||
`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i}
|
||||
${o.commentBefore}`:i}t.comment=n.after.join(`
|
||||
`)||null}}function ba({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Na(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!As[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Oa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(ba(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Na(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(`
|
||||
`)||null}function Be(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Gt=class t{constructor(e){this.anchors=new Kn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Be(this.contents),this.contents.add(e)}addIn(e,n){Be(this.contents),this.contents.addIn(e,n)}delete(e){return Be(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Be(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Be(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Be(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new Ns.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Oa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],wa(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Sa(this.contents).filter(e=>e.indexOf(Ns.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:jt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:jt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=jt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(jt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(`
|
||||
`)+`
|
||||
`}};Y._defineProperty(Gt,"defaults",As);Ht.Document=Gt;Ht.defaultOptions=da;Ht.scalarOptions=ga});var Ms=ne(Cs=>{"use strict";var jn=Qr(),Ne=Ls(),Aa=Wn(),La=ce(),Ta=Fn();De();function Ca(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new Aa.Schema(r).createNode(t,e,n)}var Fe=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ma(t,e){let n=[],r;for(let s of jn.parse(t)){let i=new Fe(e);i.parse(s,r),n.push(i),r=i}return n}function Ts(t,e){let n=jn.parse(t),r=new Fe(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new La.YAMLSemanticError(n[1],s))}return r}function ka(t,e){let n=Ts(t,e);if(n.warnings.forEach(r=>Ta.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Pa(t,e){let n=new Fe(e);return n.contents=t,String(n)}var va={createNode:Ca,defaultOptions:Ne.defaultOptions,Document:Fe,parse:ka,parseAllDocuments:Ma,parseCST:jn.parse,parseDocument:Ts,scalarOptions:Ne.scalarOptions,stringify:Pa};Cs.YAML=va});var Ps=ne((Af,ks)=>{ks.exports=Ms().YAML});var vs=ne(H=>{"use strict";var qe=De(),Ue=ce();H.findPair=qe.findPair;H.parseMap=qe.resolveMap;H.parseSeq=qe.resolveSeq;H.stringifyNumber=qe.stringifyNumber;H.stringifyString=qe.stringifyString;H.toJSON=qe.toJSON;H.Type=Ue.Type;H.YAMLError=Ue.YAMLError;H.YAMLReferenceError=Ue.YAMLReferenceError;H.YAMLSemanticError=Ue.YAMLSemanticError;H.YAMLSyntaxError=Ue.YAMLSyntaxError;H.YAMLWarning=Ue.YAMLWarning});var Ja={};sr(Ja,{languages:()=>Ur,options:()=>Vr,parsers:()=>rr,printers:()=>Ha});var ht=(t,e)=>(n,r,...s)=>n|1&&r==null?void 0:(e.call(r)??r[t]).apply(r,s);function xi(t){return this[t<0?this.length+t:t]}var Ri=ht("at",function(){if(Array.isArray(this)||typeof this=="string")return xi}),D=Ri;var Di=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},$i=ht("replaceAll",function(){if(typeof this=="string")return Di}),dt=$i;var Yi=()=>{},je=Yi;var Qe="string",Ge="array",gt="cursor",yt="indent",Ae="align",Et="trim",Le="group",Te="fill",Ce="if-break",St="indent-if-break",Me="line-suffix",wt="line-suffix-boundary",re="line",bt="label",ke="break-parent",Nt=new Set([gt,yt,Ae,Et,Le,Te,Ce,St,Me,wt,re,bt,ke]);function Bi(t){if(typeof t=="string")return Qe;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(Nt.has(e))return e}var Ot=Bi;var Fi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function qi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(Ot(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Fi([...Nt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var on=class extends Error{name="InvalidDocError";constructor(e){super(qi(e)),this.doc=e}},ar=on;function Ui(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(Ot(i)){case Ge:return e(i.map(r));case Te:return e({...i,parts:i.parts.map(r)});case Ce:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Le:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ae:case yt:case St:case bt:case Me:return e({...i,contents:r(i.contents)});case Qe:case gt:case Et:case wt:case re:case ke:return e(i);default:throw new ar(i)}}}function cr(t,e=He){return Ui(t,n=>typeof n=="string"?v(e,n.split(`
|
||||
`)):n)}var Z=je,At=je,lr=je,fr=je;function Je(t,e){return fr(t),Z(e),{type:Ae,contents:e,n:t}}function an(t){return Je(Number.NEGATIVE_INFINITY,t)}function ur(t){return Je({type:"root"},t)}function pr(t){return Je(-1,t)}var Xe={type:ke};function Lt(t){return lr(t),{type:Te,parts:t}}function Pe(t,e={}){return Z(t),At(e.expandedStates,!0),{type:Le,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function cn(t,e){return Pe(t[0],{...e,expandedStates:t})}function ze(t,e="",n={}){return Z(t),e!==""&&Z(e),{type:Ce,breakContents:t,flatContents:e,groupId:n.groupId}}function v(t,e){Z(t),At(e);let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}var se={type:re},Tt={type:re,soft:!0},Vi={type:re,hard:!0},N=[Vi,Xe],Wi={type:re,hard:!0,literal:!0},He=[Wi,Xe];function mr(t){return Z(t),{type:Me,contents:t}}function Ct(t){return(e,n,r)=>{let s=!!r?.backwards;if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;s?o--:o++}return o===-1||o===i?o:!1}}var rl=Ct(/\s/u),ln=Ct(" "),sl=Ct(",; "),il=Ct(/[^\n\r]/u);var hr=t=>t===`
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function Ki(t,e,n){let r=!!n?.backwards;if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===`
|
||||
`)return e-2;if(hr(s))return e-1}else{if(s==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(hr(s))return e+1}return e}var fn=Ki;function ji(t,e){let n=e-1;n=ln(t,n,{backwards:!0}),n=fn(t,n,{backwards:!0}),n=ln(t,n,{backwards:!0});let r=fn(t,n,{backwards:!0});return n!==r}var un=ji;var pn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dr=pn;var gr="format";var yr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Er=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Sr=/^\s*@(?:format|prettier)\s*$/u;var wr=t=>Sr.test(t),br=t=>Er.test(t),Nr=t=>yr.test(t),Or=t=>`# @${gr}
|
||||
|
||||
${t}`;function Ar(t,e){switch(t.type){case"comment":if(wr(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break}}Ar.ignoredProperties=new Set(["position"]);var Lr=Ar;function Tr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}Tr.getVisitorKeys=()=>[];var Cr=Tr;var Ze=null;function et(t){if(Ze!==null&&typeof Ze.property){let e=Ze;return Ze=et.prototype=null,e}return Ze=et.prototype=t??Object.create(null),new et}var Qi=10;for(let t=0;t<=Qi;t++)et();function mn(t){return et(t)}function Gi(t,e="type"){mn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Mr=Gi;var k=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],kr={root:k[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:k[0],documentBody:k[0],directive:k[1],alias:k[1],blockLiteral:k[1],blockFolded:k[0],plain:k[0],quoteSingle:k[1],quoteDouble:k[1],mapping:k[0],mappingItem:k[2],mappingKey:k[3],mappingValue:k[3],sequence:k[0],sequenceItem:k[3],flowMapping:k[0],flowMappingItem:k[2],flowSequence:k[0],flowSequenceItem:k[3],comment:k[1],tag:k[4],anchor:k[4]};var Hi=Mr(kr),Pr=Hi;var tt=t=>t.position.start.offset,vr=t=>t.position.end.offset;function Ji(t){return Array.isArray(t)&&t.length>0}var ve=Ji;function W(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function hn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>hn(r,e,t))}:t,n)}function Ie(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function _r(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;s<r;s++){let i=e[s];if(i===`
|
||||
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function Mt(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let r=1;r<n;r++){let s=t.stack[r],i=t.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function kt(t){return ve(t.children)?kt(D(0,t.children,-1)):t}function Ir(t){return t.value.trim()==="prettier-ignore"}function xr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return I(n)&&Ir(D(0,n.endComments,-1))}return te(e)&&Ir(D(0,e.leadingComments,-1))}function _e(t){return!ve(t.children)&&!Xi(t)}function Xi(t){return te(t)||ae(t)||dn(t)||K(t)||I(t)}function te(t){return ve(t?.leadingComments)}function ae(t){return ve(t?.middleComments)}function dn(t){return t?.indicatorComment}function K(t){return t?.trailingComment}function I(t){return ve(t?.endComments)}function Rr(t){return t?t.split(/(?<!^| ) (?! |$)/u):[]}function Dr(t,e,n){let r=e.split(`
|
||||
`).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return r.map(i=>i?[i]:[]);let s=[];for(let[i,o]of r.entries()){let a=Rr(o);i>0&&r[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&D(0,D(0,s,-1),-1).endsWith("\\"))?s[s.length-1]=[...D(0,s,-1),...a]:s.push(a)}return n.proseWrap==="never"?s.map(i=>[i.join(" ")]):s}function $r(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let l=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=l?l.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(`
|
||||
`).map(l=>l.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return c(o.map(l=>l?[l]:[]));let a=[];for(let[l,f]of o.entries()){let m=Rr(f);l>0&&m.length>0&&o[l-1].length>0&&!/^\s/u.test(m[0])&&!/^\s|\s$/u.test(D(0,a,-1))?a[a.length-1]=[...D(0,a,-1),...m]:a.push(m)}return a=a.map(l=>{let f=[];for(let m of l)f.length>0&&/\s$/u.test(D(0,f,-1))?f[f.length-1]+=" "+m:f.push(m);return f}),r.proseWrap==="never"&&(a=a.map(l=>[l.join(" ")])),c(a);function c(l){if(t.chomping==="keep")return D(0,l,-1).length===0?l.slice(0,-1):l;let f=0;for(let m=l.length-1;m>=0&&l[m].length===0;m--)f++;return f===0?l:f>=2&&!n?l.slice(0,-(f-1)):l.slice(0,-f)}}function nt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var gn=new WeakMap;function Pt(t,e){let{node:n,root:r}=t,s;return gn.has(r)?s=gn.get(r):(s=new Set,gn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),_r(n,e)&&!yn(t.parent))?Tt:""}function yn(t){return I(t)&&!W(t,["documentHead","documentBody","flowMapping","flowSequence"])}function _(t,e){return Je(" ".repeat(t),e)}function zi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Mt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),dn(r)&&o.push(" ",n("indicatorComment"));let a=$r(r,{parentIndent:s,isLastDescendant:i,options:e}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(Lt(v(se,f))),l!==a.length-1?c.push(f.length===0?N:ur(He)):r.chomping==="keep"&&i&&c.push(an(f.length===0?N:He));return r.indent===null?o.push(pr(_(e.tabWidth,c))):o.push(an(_(r.indent-1+s,c))),o}var Yr=zi;function vt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Tt;s&&r.children.length>0&&e.bracketSpacing&&(a=se);let c=D(0,r.children,-1),l=c?.type==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,_(e.tabWidth,[a,Zi(t,e,n),e.trailingComma==="none"?"":ze(","),I(r)?[N,v(N,t.map(n,"endComments"))]:""]),l?"":a,o]}function Zi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",se,s.position.start.line!==i.position.start.line?Pt(t,e.originalText):""]],"children")}function eo(t,e,n){let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=n("key"),f=to(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&En(i.content,e)&&!K(i.content)&&s.tag?.value!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",_(2,l)];let m=n("value");if(a)return[": ",_(2,m)];if(te(o)||!nt(i.content))return["? ",_(2,l),N,...t.map(()=>[n(),N],"value","leadingComments"),": ",_(2,m)];if(no(i.content)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)&&!te(o.content)&&!ae(o.content)&&!I(o)&&En(o.content,e))return[l,f,": ",m];let g=Symbol("mappingKey"),y=Pe([ze("? "),Pe(_(2,l),{id:g})]),h=[N,": ",_(2,m)],d=[f,":"];I(o)&&o.content&&W(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?d.push(" "):te(o.content)||I(o)&&o.content&&!W(o.content,["mapping","sequence"])||s.type==="mapping"&&K(i.content)&&nt(o.content)||W(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?d.push(N):o.content?d.push(se):K(o)&&d.push(" "),d.push(m);let w=_(e.tabWidth,d);return En(i.content,e)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)?cn([[l,w]]):cn([[y,ze(h,w,{groupId:g})]])}function En(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function to(t){return t.key.content?.type==="alias"}function no(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Br=eo;function ro(t){return hn(t,so)}function so(t){switch(t.type){case"document":Ie(t,"head",()=>t.children[0]),Ie(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Ie(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Ie(t,"key",()=>t.children[0]),Ie(t,"value",()=>t.children[1]);break}return t}var Fr=ro;function io(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&te(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return W(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Mt(t)&&(a=Pt(t,e.originalText)),(i||o)&&(W(r,["sequence","mapping"])&&!ae(r)?s.push(N):s.push(" ")),ae(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),xr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Pe(oo(t,e,n))),K(r)&&!W(r,["document","documentHead"])&&s.push(mr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&nt(r)?"":Xe,n("trailingComment")])),yn(r)&&s.push(_(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[un(e.originalText,tt(c))?N:"",n()],"endComments"))])),s.push(a),s}function oo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=kt(r),i=!(W(s,["blockLiteral","blockFolded"])&&s.chomping==="keep"),o=[];return t.each(({node:a,isFirst:c})=>{c||o.push(N),o.push(n()),co(t)&&(i&&o.push(N),o.push("..."),K(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(N),o}case"document":{let s=[];return lo(t)&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),K(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),ao(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=kt(r);if(W(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[N,N]);else{let c=D(0,s,-1);o=W(c,["mapping"])&&un(e.originalText,tt(i[0]))?[N,N]:N}}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return rt(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?'"':"'";return[c,rt(r.type,o,e),c]}if(o.includes('"'))return["'",rt(r.type,r.type==="quoteDouble"?dt(0,dt(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',rt(r.type,r.type==="quoteSingle"?dt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,rt(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Yr(t,e,n);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",_(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Br(t,e,n);case"flowMapping":return vt(t,e,n);case"flowSequence":return vt(t,e,n);case"flowSequenceItem":return n("content");default:throw new dr(r,"YAML")}}function ao(t){return t.body.children.length>0||I(t.body)}function co(t){let e=t.node;if(e.documentEndMarker||K(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||I(n.head)}function lo(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||I(e.head)||K(e.head)}function rt(t,e,n){let r=Dr(t,e,n);return v(N,r.map(s=>Lt(v(se,s))))}var fo={preprocess:Fr,embed:Cr,print:io,massageAstNode:Lr,insertPragma:Or,getVisitorKeys:Pr},qr=fo;var Ur=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var It={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces b
Line truncated
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
var ki=Object.create;var sn=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var Ii=Object.getPrototypeOf,_i=Object.prototype.hasOwnProperty;var ne=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),or=(t,e)=>{for(var n in e)sn(t,n,{get:e[n],enumerable:!0})},xi=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of vi(e))!_i.call(t,s)&&s!==n&&sn(t,s,{get:()=>e[s],enumerable:!(r=Pi(e,s))||r.enumerable});return t};var on=(t,e,n)=>(n=t!=null?ki(Ii(t)):{},xi(e||!t||!t.__esModule?sn(n,"default",{value:t,enumerable:!0}):n,t));var ce=ne(B=>{"use strict";var ie={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},st={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},mo="tag:yaml.org,2002:",ho={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Wr(t){let e=[0],n=t.indexOf(`
|
||||
`);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(`
|
||||
`,n);return e}function Kr(t){let e,n;return typeof t=="string"?(e=Wr(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Wr(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function wn(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Kr(e);if(!n||!r||t>r.length)return null;for(let i=0;i<n.length;++i){let o=n[i];if(t<o)return{line:i,col:t-n[i-1]+1};if(t===o)return{line:i+1,col:1}}let s=n.length;return{line:s,col:t-n[s-1]+1}}function go(t,e){let{lineStarts:n,src:r}=Kr(e);if(!n||!(t>=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===`
|
||||
`;)--i;return r.slice(s,i)}function yo({start:t,end:e},n,r=80){let s=go(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s}
|
||||
${c}${l}${a}`}var xe=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;i<e.length&&!(e[i]>r);)++i;this.origStart=r+i;let o=i;for(;i<e.length&&!(e[i]>=s);)++i;return this.origEnd=s+i,o}},oe=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===`
|
||||
`)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===`
|
||||
`?r+`
|
||||
`:r}static atDocumentBoundary(e,n,r){let s=e[n];if(!s)return!0;let i=e[n-1];if(i&&i!==`
|
||||
`)return!1;if(r){if(s!==r)return!1}else if(s!==ie.DIRECTIVES_END&&s!==ie.DOCUMENT_END)return!1;let o=e[n+1],a=e[n+2];if(o!==s||a!==s)return!1;let c=e[n+3];return!c||c===`
|
||||
`||c===" "||c===" "}static endOfIdentifier(e,n){let r=e[n],s=r==="<",i=s?[`
|
||||
`," "," ",">"]:[`
|
||||
`," "," ","[","]","{","}",","];for(;r&&i.indexOf(r)===-1;)r=e[n+=1];return s&&r===">"&&(n+=1),n}static endOfIndent(e,n){let r=e[n];for(;r===" ";)r=e[n+=1];return n}static endOfLine(e,n){let r=e[n];for(;r&&r!==`
|
||||
`;)r=e[n+=1];return n}static endOfWhiteSpace(e,n){let r=e[n];for(;r===" "||r===" ";)r=e[n+=1];return n}static startOfLine(e,n){let r=e[n-1];if(r===`
|
||||
`)return n;for(;r&&r!==`
|
||||
`;)r=e[n-=1];return n+1}static endOfBlockIndent(e,n,r){let s=t.endOfIndent(e,r);if(s>r+n)return s;{let i=t.endOfWhiteSpace(e,s),o=e[i];if(!o||o===`
|
||||
`)return i}return null}static atBlank(e,n,r){let s=e[n];return s===`
|
||||
`||s===" "||s===" "||r&&!s}static nextNodeIsIndented(e,n,r){return!e||n<0?!1:n>0?!0:r&&e==="-"}static normalizeOffset(e,n){let r=e[n];return r?r!==`
|
||||
`&&e[n-1]===`
|
||||
`?n-1:t.endOfWhiteSpace(e,n):n}static foldNewline(e,n,r){let s=0,i=!1,o="",a=e[n+1];for(;a===" "||a===" "||a===`
|
||||
`;){switch(a){case`
|
||||
`:s=0,n+=1,o+=`
|
||||
`;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.ANCHOR,!0);if(n!=null)return n}return null}get comment(){let e=[];for(let n=0;n<this.props.length;++n){let r=this.getPropValue(n,ie.COMMENT,!0);r!=null&&e.push(r)}return e.length>0?e.join(`
|
||||
`):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]===ie.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:e}=this.context;for(let n=0;n<this.props.length;++n)if(e[this.props[n].start]!==ie.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[st.FLOW_MAP,st.FLOW_SEQ,st.QUOTE_DOUBLE,st.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let e=wn(this.range.start,this.context.root);if(!e)return;let n=wn(this.range.end,this.context.root);return{start:e,end:n}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange;return this.context.src.slice(e,n)}get tag(){for(let e=0;e<this.props.length;++e){let n=this.getPropValue(e,ie.TAG,!1);if(n!=null){if(n[1]==="<")return{verbatim:n.slice(2,-1)};{let[r,s,i]=n.match(/^(.*!)([^!]*)$/);return{handle:s,suffix:i}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:e,end:n}=this.valueRange,{src:r}=this.context;for(let s=e;s<n;++s)if(r[s]===`
|
||||
`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===ie.COMMENT){let r=t.endOfLine(n,e+1),s=new xe(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},ge=class extends Error{constructor(e,n,r){if(!r||!(n instanceof oe))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new xe(this.offset,this.offset+1);let n=e&&wn(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&yo(this.linePos,e);s&&(this.message+=`:
|
||||
|
||||
${s}
|
||||
`)}delete this.source}},bn=class extends ge{constructor(e,n){super("YAMLReferenceError",e,n)}},it=class extends ge{constructor(e,n){super("YAMLSemanticError",e,n)}},Nn=class extends ge{constructor(e,n){super("YAMLSyntaxError",e,n)}},On=class extends ge{constructor(e,n){super("YAMLWarning",e,n)}};function Eo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var An=class t extends oe{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==`
|
||||
`&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===`
|
||||
`||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;e<n&&(s===`
|
||||
`||s===" "||s===" ");)s=r[--n-1];let i="";for(let a=e;a<n;++a){let c=r[a];if(c===`
|
||||
`){let{fold:l,offset:f}=oe.foldNewline(r,a,-1);i+=l,a=f}else if(c===" "||c===" "){let l=a,f=r[a+1];for(;a<n&&(f===" "||f===" ");)a+=1,f=r[a+1];f!==`
|
||||
`&&(i+=a>l?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new it(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new it(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===`
|
||||
`&&!oe.atDocumentBoundary(s,i+1);a=s[i]){let c=oe.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===`
|
||||
`?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==`
|
||||
`&&(i=t.endOfLine(s,n,r)),this.valueRange=new xe(n,i),i=oe.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};B.Char=ie;B.Node=oe;B.PlainValue=An;B.Range=xe;B.Type=st;B.YAMLError=ge;B.YAMLReferenceError=bn;B.YAMLSemanticError=it;B.YAMLSyntaxError=Nn;B.YAMLWarning=On;B._defineProperty=Eo;B.defaultTagPrefix=mo;B.defaultTags=ho});var Qr=ne(jr=>{"use strict";var u=ce(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ot=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],g=null;for(;l===`
|
||||
`||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===`
|
||||
`&&m.length===0&&(g=new Ee,o=g.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(g){let h=e.parent.items||e.parent.contents;h&&h.push(g)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function Ln(t){let e=t;for(;e instanceof ot;)e=e.node;if(!(e instanceof It))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var It=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==`
|
||||
`?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start<e.context.lineStart){this.props=e.props.slice(0,r+1),e.props=e.props.slice(r+1);let s=e.props[0]||e.valueRange;e.range.start=s.start;break}this.items=[e];let n=Ln(e);n&&Array.prototype.push.apply(this.items,n)}get includesTrailingLines(){return this.items.length>0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===`
|
||||
`||l==="#";){if(f&&l===`
|
||||
`&&!m){let h=new Ee;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c<i+a&&!t.nextContentHasIndent(s,c,a))return c;let h=new ye;if(c=h.parse({indent:a,lineStart:i,src:s},c),this.items.push(h),this.valueRange.end=c,c>=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),d=s[h];(!d||d===`
|
||||
`||d==="#")&&(c=h)}l=s[c],f=!0}if(!l)break;if(c!==i+a&&(f||l!==":")){if(c<i+a){i>n&&(c=i);break}else if(!this.error){let h="All collection items must start at the same column";this.error=new u.YAMLSyntaxError(this,h)}}if(o.type===u.Type.SEQ_ITEM){if(l!=="-"){i>n&&(c=i);break}}else if(l==="-"&&!this.error){let h=s[c+1];if(!h||h===`
|
||||
`||h===" "||h===" "){let d="A collection cannot be both a mapping and a sequence";this.error=new u.YAMLSyntaxError(this,d)}}let g=r({atLineStart:f,inCollection:!0,indent:a,lineStart:i,parent:this},c);if(!g)return c;if(this.items.push(g),this.valueRange.end=g.valueRange.end,c=u.Node.normalizeOffset(s,g.range.end),l=s[c],f=!1,m=g.includesTrailingLines,l){let h=c-1,d=s[h];for(;d===" "||d===" ";)d=s[--h];d===`
|
||||
`&&(i=h+1,f=!0)}let y=Ln(g);y&&Array.prototype.push.apply(this.items,y)}return c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{n=r.setOrigRanges(e,n)}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=e.slice(r.start,n[0].range.start)+String(n[0]);for(let o=1;o<n.length;++o){let a=n[o],{atLineStart:c,indent:l}=a.context;if(c)for(let f=0;f<l;++f)i+=" ";i+=String(a)}return u.Node.addStringTerminator(e,r.end,i)}},Tn=class extends u.Node{constructor(){super(u.Type.DIRECTIVE),this.name=null}get parameters(){let e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}parseName(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!==" "&&s!==" ";)s=n[r+=1];return this.name=n.slice(e,r),r}parseParameters(e){let{src:n}=this.context,r=e,s=n[r];for(;s&&s!==`
|
||||
`&&s!=="#";)s=n[r+=1];return this.valueRange=new u.Range(e,r),r}parse(e,n){this.context=e;let r=this.parseName(n+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new u.Range(n,r),r}},Cn=class t extends u.Node{static startCommentOrEndBlankLine(e,n){let r=u.Node.endOfWhiteSpace(e,n),s=e[r];return s==="#"||s===`
|
||||
`?r:n}constructor(){super(u.Type.DOCUMENT),this.directives=null,this.contents=null,this.directivesEndMarker=null,this.documentEndMarker=null}parseDirectives(e){let{src:n}=this.context;this.directives=[];let r=!0,s=!1,i=e;for(;!u.Node.atDocumentBoundary(n,i,u.Char.DIRECTIVES_END);)switch(i=t.startCommentOrEndBlankLine(n,i),n[i]){case`
|
||||
`:if(r){let o=new Ee;i=o.parse({src:n},i),i<n.length&&this.directives.push(o)}else i+=1,r=!0;break;case"#":{let o=new ye;i=o.parse({src:n},i),this.directives.push(o),r=!1}break;case"%":{let o=new Tn;i=o.parse({parent:this,src:n},i),this.directives.push(o),s=!0,r=!1}break;default:return s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return n[i]?(this.directivesEndMarker=new u.Range(i,i+3),i+3):(s?this.error=new u.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}parseContents(e){let{parseNode:n,src:r}=this.context;this.contents||(this.contents=[]);let s=e;for(;r[s-1]==="-";)s-=1;let i=u.Node.endOfWhiteSpace(r,e),o=s===e;for(this.valueRange=new u.Range(i);!u.Node.atDocumentBoundary(r,i,u.Char.DOCUMENT_END);){switch(r[i]){case`
|
||||
`:if(o){let a=new Ee;i=a.parse({src:r},i),i<r.length&&this.contents.push(a)}else i+=1,o=!0;s=i;break;case"#":{let a=new ye;i=a.parse({src:r},i),this.contents.push(a),o=!1}break;default:{let a=u.Node.endOfIndent(r,i),l=n({atLineStart:o,indent:-1,inFlow:!1,inCollection:!1,lineStart:s,parent:this},a);if(!l)return this.valueRange.end=a;this.contents.push(l),i=l.range.end,o=!1;let f=Ln(l);f&&Array.prototype.push.apply(this.contents,f)}}i=t.startCommentOrEndBlankLine(r,i)}if(this.valueRange.end=i,r[i]&&(this.documentEndMarker=new u.Range(i,i+3),i+=3,r[i])){if(i=u.Node.endOfWhiteSpace(r,i),r[i]==="#"){let a=new ye;i=a.parse({src:r},i),this.contents.push(a)}switch(r[i]){case`
|
||||
`:i+=1;break;case void 0:break;default:this.error=new u.YAMLSyntaxError(this,"Document end marker line cannot have a non-comment suffix")}}return i}parse(e,n){e.root=this,this.context=e;let{src:r}=e,s=r.charCodeAt(n)===65279?n+1:n;return s=this.parseDirectives(s),s=this.parseContents(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.directives.forEach(r=>{n=r.setOrigRanges(e,n)}),this.directivesEndMarker&&(n=this.directivesEndMarker.setOrigRange(e,n)),this.contents.forEach(r=>{n=r.setOrigRanges(e,n)}),this.documentEndMarker&&(n=this.documentEndMarker.setOrigRange(e,n)),n}toString(){let{contents:e,directives:n,value:r}=this;if(r!=null)return r;let s=n.join("");return e.length>0&&((n.length>0||e[0].type===u.Type.COMMENT)&&(s+=`---
|
||||
`),s+=e.join("")),s[s.length-1]!==`
|
||||
`&&(s+=`
|
||||
`),s}},Mn=class extends u.Node{parse(e,n){this.context=e;let{src:r}=e,s=u.Node.endOfIdentifier(r,n+1);return this.valueRange=new u.Range(n+1,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},le={CLIP:"CLIP",KEEP:"KEEP",STRIP:"STRIP"},kn=class extends u.Node{constructor(e,n){super(e,n),this.blockIndent=null,this.chomping=le.CLIP,this.header=null}get includesTrailingLines(){return this.chomping===le.KEEP}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{indent:r,src:s}=this.context;if(this.valueRange.isEmpty())return"";let i=null,o=s[n-1];for(;o===`
|
||||
`||o===" "||o===" ";){if(n-=1,n<=e){if(this.chomping===le.KEEP)break;return""}o===`
|
||||
`&&(i=n),o=s[n-1]}let a=n+1;i&&(this.chomping===le.KEEP?(a=i,n=this.valueRange.end):n=i);let c=r+this.blockIndent,l=this.type===u.Type.BLOCK_FOLDED,f=!0,m="",g="",y=!1;for(let h=e;h<n;++h){for(let w=0;w<c&&s[h]===" ";++w)h+=1;let d=s[h];if(d===`
|
||||
`)g===`
|
||||
`?m+=`
|
||||
`:g=`
|
||||
`;else{let w=u.Node.endOfLine(s,h),P=s.slice(h,w);h=w,l&&(d===" "||d===" ")&&h<a?(g===" "?g=`
|
||||
`:!y&&!f&&g===`
|
||||
`&&(g=`
|
||||
|
||||
`),m+=g+P,g=w<n&&s[w]||"",y=!0):(m+=g+P,g=l&&h<a?" ":`
|
||||
`,y=!1),f&&P!==""&&(f=!1)}}return this.chomping===le.STRIP?m:m+`
|
||||
`}parseBlockHeader(e){let{src:n}=this.context,r=e+1,s="";for(;;){let i=n[r];switch(i){case"-":this.chomping=le.STRIP;break;case"+":this.chomping=le.KEEP;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s+=i;break;default:return this.blockIndent=Number(s)||null,this.header=new u.Range(e,r),r}r+=1}}parseBlockValue(e){let{indent:n,src:r}=this.context,s=!!this.blockIndent,i=e,o=e,a=1;for(let c=r[i];c===`
|
||||
`&&(i+=1,!u.Node.atDocumentBoundary(r,i));c=r[i]){let l=u.Node.endOfBlockIndent(r,n,i);if(l===null)break;let f=r[l],m=l-(i+n);if(this.blockIndent){if(f&&f!==`
|
||||
`&&m<this.blockIndent){if(r[l]==="#")break;if(!this.error){let y=`Block scalars must not be less indented than their ${s?"explicit indentation indicator":"first line"}`;this.error=new u.YAMLSemanticError(this,y)}}}else if(r[l]!==`
|
||||
`){if(m<a){let g="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";this.error=new u.YAMLSemanticError(this,g)}this.blockIndent=m}else m>a&&(a=m);r[l]===`
|
||||
`?i=l:i=o=u.Node.endOfLine(r,l)}return this.chomping!==le.KEEP&&(i=r[o]?o+1:o),this.valueRange=new u.Range(e+1,i),i}parse(e,n){this.context=e;let{src:r}=e,s=this.parseBlockHeader(n);return s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s=this.parseBlockValue(s),s}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.header?this.header.setOrigRange(e,n):n}},Pn=class extends u.Node{constructor(e,n){super(e,n),this.items=null}prevNodeIsJsonLike(e=this.items.length){let n=this.items[e-1];return!!n&&(n.jsonLike||n.type===u.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{indent:i,lineStart:o}=e,a=s[n];this.items=[{char:a,offset:n}];let c=u.Node.endOfWhiteSpace(s,n+1);for(a=s[c];a&&a!=="]"&&a!=="}";){switch(a){case`
|
||||
`:{o=c+1;let l=u.Node.endOfWhiteSpace(s,o);if(s[l]===`
|
||||
`){let f=new Ee;o=f.parse({src:s},o),this.items.push(f)}if(c=u.Node.endOfIndent(s,o),c<=o+i&&(a=s[c],c<o+i||a!=="]"&&a!=="}")){let f="Insufficient indentation in flow collection";this.error=new u.YAMLSemanticError(this,f)}}break;case",":this.items.push({char:a,offset:c}),c+=1;break;case"#":{let l=new ye;c=l.parse({src:s},c),this.items.push(l)}break;case"?":case":":{let l=s[c+1];if(l===`
|
||||
`||l===" "||l===" "||l===","||a===":"&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:c}),c+=1;break}}default:{let l=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:o,parent:this},c);if(!l)return this.valueRange=new u.Range(n,c),c;this.items.push(l),c=u.Node.normalizeOffset(s,l.range.end)}}c=u.Node.endOfWhiteSpace(s,c),a=s[c]}return this.valueRange=new u.Range(n,c+1),a&&(this.items.push({char:a,offset:c}),c=u.Node.endOfWhiteSpace(s,c+1),c=this.parseComment(c)),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.items.forEach(r=>{if(r instanceof u.Node)n=r.setOrigRanges(e,n);else if(e.length===0)r.origOffset=r.offset;else{let s=n;for(;s<e.length&&!(e[s]>r.offset);)++s;r.origOffset=r.offset+s,n=s}}),n}toString(){let{context:{src:e},items:n,range:r,value:s}=this;if(s!=null)return s;let i=n.filter(c=>c instanceof u.Node),o="",a=r.start;return i.forEach(c=>{let l=e.slice(a,c.range.start);a=c.range.end,o+=l+String(c),o[o.length-1]===`
|
||||
`&&e[a-1]!==`
|
||||
`&&e[a]===`
|
||||
`&&(a+=1)}),o+=e.slice(a,r.end),u.Node.addStringTerminator(e,r.end,o)}},vn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r&&r!=='"';)n+=r==="\\"?2:1,r=e[n];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=='"'&&e.push(new u.YAMLSyntaxError(this,'Missing closing "quote'));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if(c==="\\")switch(a+=1,i[a]){case"0":o+="\0";break;case"a":o+="\x07";break;case"b":o+="\b";break;case"e":o+="\x1B";break;case"f":o+="\f";break;case"n":o+=`
|
||||
`;break;case"r":o+="\r";break;case"t":o+=" ";break;case"v":o+="\v";break;case"N":o+="\x85";break;case"_":o+="\xA0";break;case"L":o+="\u2028";break;case"P":o+="\u2029";break;case" ":o+=" ";break;case'"':o+='"';break;case"/":o+="/";break;case"\\":o+="\\";break;case" ":o+=" ";break;case"x":o+=this.parseCharCode(a+1,2,e),a+=2;break;case"u":o+=this.parseCharCode(a+1,4,e),a+=4;break;case"U":o+=this.parseCharCode(a+1,8,e),a+=8;break;case`
|
||||
`:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},In=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;a<r-1;++a){let c=i[a];if(c===`
|
||||
`){u.Node.atDocumentBoundary(i,a+1)&&e.push(new u.YAMLSemanticError(this,"Document boundary indicators are not allowed within string values"));let{fold:l,offset:f,error:m}=u.Node.foldNewline(i,a,s);o+=l,a=f,m&&e.push(new u.YAMLSemanticError(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if(c==="'")o+=c,a+=1,i[a]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Unescaped single quote? This should not happen."));else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==`
|
||||
`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function So(t,e){switch(t){case u.Type.ALIAS:return new Mn(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new kn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Pn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ot(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new vn(t,e);case u.Type.QUOTE_SINGLE:return new In(t,e);default:return null}}var _n=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:g,valueStart:y}=f.parseProps(l),h=So(g,m),d=h.parse(f,y);if(h.range=new u.Range(l,d),d<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=d,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new It(h);return d=w.parse(new t(f),d),w.range=new u.Range(l,d),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ot)return!0;let i=e.range.end;return s[i]===`
|
||||
`||s[i-1]===`
|
||||
`?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===`
|
||||
`;){if(a===`
|
||||
`){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===`
|
||||
`);let m=l-(f+this.indent),g=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!g))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function wo(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),`
|
||||
`)));let n=[],r=0;do{let s=new Cn,i=new _n({src:t});r=s.parse(i,r),n.push(s)}while(r<t.length);return n.setOrigRanges=()=>{if(e.length===0)return!1;for(let i=1;i<e.length;++i)e[i]-=i;let s=0;for(let i=0;i<n.length;++i)s=n[i].setOrigRanges(e,s);return e.splice(0,e.length),!0},n.toString=()=>n.join(`...
|
||||
`),n}jr.parse=wo});var De=ne(M=>{"use strict";var p=ce();function bo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)}
|
||||
${e}${t}`:t}function Re(t,e,n){return n?n.indexOf(`
|
||||
`)===-1?`${t} #${n}`:`${t}
|
||||
`+n.replace(/^/gm,`${e||""}#`):t}var j=class{};function fe(t,e,n){if(Array.isArray(t))return t.map((r,s)=>fe(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var x=class extends j{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:fe(this.value,e,n)}toString(){return String(this.value)}};function Gr(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Xr=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,Q=class t extends j{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Xr(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Gr(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof x?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof x&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Gr(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let g=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:i,inFlow:m,type:null});let y=!1,h=!1,d=this.items.reduce((P,A,C)=>{let L;A&&(!y&&A.spaceBefore&&P.push({type:"comment",str:""}),A.commentBefore&&A.commentBefore.match(/^.*$/gm).forEach(Mi=>{P.push({type:"comment",str:`#${Mi}`})}),A.comment&&(L=A.comment),m&&(!y&&A.spaceBefore||A.commentBefore||A.comment||A.key&&(A.key.commentBefore||A.key.comment)||A.value&&(A.value.commentBefore||A.value.comment))&&(h=!0)),y=!1;let R=f(A,e,()=>L=null,()=>y=!0);return m&&!h&&R.includes(`
|
||||
`)&&(h=!0),m&&C<this.items.length-1&&(R+=","),R=Re(R,i,L),y&&(L||m)&&(y=!1),P.push({type:"item",str:R}),P},[]),w;if(d.length===0)w=r.start+r.end;else if(m){let{start:P,end:A}=r,C=d.map(L=>L.str);if(h||C.reduce((L,R)=>L+R.length+2,2)>t.maxFlowStringSingleLineLength){w=P;for(let L of C)w+=L?`
|
||||
${l}${c}${L}`:`
|
||||
`;w+=`
|
||||
${c}${A}`}else w=`${P} ${C.join(" ")} ${A}`}else{let P=d.map(n);w=P.shift();for(let A of P)w+=A?`
|
||||
${c}${A}`:`
|
||||
`}return this.comment?(w+=`
|
||||
`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(Q,"maxFlowStringSingleLineLength",60);function _t(t){let e=t instanceof x?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var ue=class extends Q{add(e){this.items.push(e)}delete(e){let n=_t(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=_t(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof x?s.value:s}has(e){let n=_t(e);return typeof n=="number"&&n<this.items.length}set(e,n){let r=_t(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);this.items[r]=n}toJSON(e,n){let r=[];n&&n.onCreate&&n.onCreate(r);let s=0;for(let i of this.items)r.push(fe(i,String(s++),n));return r}toString(e,n,r){return e?super.toString(e,{blockItem:s=>s.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},No=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof j&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends j{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof j?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new x(null)),this.key instanceof j)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=fe(this.key,"",e);if(n instanceof Map){let s=fe(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=No(this.key,r,e),i=fe(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof j&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof Q){let R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let f=!o&&(!a||l||(a instanceof j?a instanceof Q||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:g,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:g+y});let d=!1,w=h(a,e,()=>l=null,()=>d=!0);if(w=Re(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Re(w,e.indent,this.comment),n&&n()):d&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w}
|
||||
${g}:`:`${w}:`,this.comment&&(w=Re(w,e.indent,this.comment),n&&n());let P="",A=null;if(c instanceof j){if(c.spaceBefore&&(P=`
|
||||
`),c.commentBefore){let R=c.commentBefore.replace(/^/gm,`${e.indent}#`);P+=`
|
||||
${R}`}A=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof x&&(e.indentAtStart=w.length+1),d=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof ue&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let C=h(c,e,()=>A=null,()=>d=!0),L=" ";return P||this.comment?L=`${P}
|
||||
${e.indent}`:!f&&c instanceof Q?(!(C[0]==="["||C[0]==="{")||C.includes(`
|
||||
`))&&(L=`
|
||||
${e.indent}`):C[0]===`
|
||||
`&&(L=""),d&&!A&&r&&r(),Re(w+L+C,e.indent,A)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var xt=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof Q){let n=0;for(let r of t.items){let s=xt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=xt(t.key,e),r=xt(t.value,e);return Math.max(n,r)}return 1},we=class t extends j{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return fe(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=xt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function at(t,e){let n=e instanceof x?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var ct=class extends Q{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=at(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=at(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=at(this.items,e),s=r&&r.value;return!n&&s instanceof x?s.value:s}has(e){return!!at(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},zr="<<",$t=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof ue||(n=new ue,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new x(zr),new ue);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof ct))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Oo={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Ao={trueStr:"true",falseStr:"false"},Lo={asBigInt:!1},To={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Rn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof x||(a=new x(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new x(t)}var Zr="flow",xn="block",Rt="quoted",Hr=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==`
|
||||
`);n=t[e+1]}return e};function Yt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let g,y,h=!1,d=-1,w=-1,P=-1;n===xn&&(d=Hr(t,d),d!==-1&&(m=d+c));for(let C;C=t[d+=1];){if(n===Rt&&C==="\\"){switch(w=d,t[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}P=d}if(C===`
|
||||
`)n===xn&&(d=Hr(t,d)),m=d+c,g=void 0;else{if(C===" "&&y&&y!==" "&&y!==`
|
||||
`&&y!==" "){let L=t[d+1];L&&L!==" "&&L!==`
|
||||
`&&L!==" "&&(g=d)}if(d>=m)if(g)l.push(g),m=g+c,g=void 0;else if(n===Rt){for(;y===" "||y===" ";)y=C,C=t[d+=1],h=!0;let L=d>P+1?d-2:w-1;if(f[L])return t;l.push(L),f[L]=!0,m=L+c,g=void 0}else h=!0}y=C}if(h&&a&&a(),l.length===0)return t;o&&o();let A=t.slice(0,l[0]);for(let C=0;C<l.length;++C){let L=l[C],R=l[C+1]||t.length;L===0?A=`
|
||||
${e}${t.slice(0,R)}`:(n===Rt&&f[L]&&(A+=`${t[L]}\\`),A+=`
|
||||
${e}${t.slice(L+1,R)}`)}return A}var Dn=({indentAtStart:t})=>t?Object.assign({indentAtStart:t},be.fold):be.fold,Bt=t=>/^(%|---|\.\.\.)/m.test(t);function Co(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
||||
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Bt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<s)l+=1;else{for(a+=i.slice(c,l)+`
|
||||
|
||||
`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
|
||||
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:Yt(a,o,Rt,Dn(e))}function es(t,e){if(e.implicitKey){if(/\n/.test(t))return Se(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return Se(t,e);let n=e.indent||(Bt(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:Yt(r,n,Zr,Dn(e))}function Dt({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Se(n,r);let o=r.indent||(r.forceBlockIndent||Bt(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!Co(n,be.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+`
|
||||
`;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(`
|
||||
`);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a}
|
||||
${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l}
|
||||
${o}${f}${n}${m}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let g=Yt(`${f}${n}${m}`,o,xn,be.fold);return`${l}
|
||||
${o}${g}`}function Mo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(`
|
||||
`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?es(o,e):Se(o,e):Dt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(`
|
||||
`)!==-1)return Dt(t,e,n,r);if(l===""&&Bt(o))return e.forceBlockIndent=!0,Dt(t,e,n,r);let m=o.replace(/\n+/g,`$&
|
||||
${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Rn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let g=c?m:Yt(m,l,Zr,Dn(e));return s&&!f&&(g.indexOf(`
|
||||
`)!==-1||s.indexOf(`
|
||||
`)!==-1)?(n&&n(),bo(g,l,s)):g}function ko(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Dt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return es(c,e);case p.Type.PLAIN:return Mo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function Po({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function ts(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function ns(t,e){let n=e.context.src[e.range.start-1];if(n!==`
|
||||
`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function rs(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function ss(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=`
|
||||
`+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=`
|
||||
`+s:t.comment=s)}}function $n(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function vo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Io(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return vo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function Jr(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof Q?a:new x(a)}let i=$n(t,e);return typeof i=="string"&&s.length>0?Rn(i,s,r.scalarFallback):null}function _o({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function xo(t,e,n){try{let r=Jr(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=_o(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=Jr(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Ro=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Do(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Ro(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function $o(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=Io(t,e);if(i)return xo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=$n(t,e);return Rn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function pe(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Do(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=$o(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(`
|
||||
`);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore}
|
||||
${o}`:o);let a=n.after.join(`
|
||||
`);a&&(i.comment=i.comment?`${i.comment}
|
||||
${a}`:a)}return e.resolved=i}function Yo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Uo(t,e):qo(t,e),s=new ct;s.items=r,ss(s,n);let i=!1;for(let o=0;o<r.length;++o){let{key:a}=r[o];if(a instanceof Q&&(i=!0),t.schema.merge&&a&&a.value===zr){r[o]=new $t(r[o]);let c=r[o].value.items,l=null;c.some(f=>{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c<r.length;++c){let{key:l}=r[c];if(a===l||a&&l&&Object.prototype.hasOwnProperty.call(a,"value")&&a.value===l.value){let f=`Map keys must be unique; "${a}" is repeated`;t.errors.push(new p.YAMLSemanticError(e,f));break}}}if(i&&!t.options.mapAsMap){let o="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,o))}return e.resolved=s,s}var Bo=({context:{lineStart:t,node:e,src:n},props:r})=>{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i<s;++i)if(n[i]===`
|
||||
`)return!1;return!0};function Fo(t,e){if(!Bo(t))return;let n=t.getPropValue(0,p.Char.COMMENT,!0),r=!1,s=e.value.commentBefore;if(s&&s.startsWith(n))e.value.commentBefore=s.substr(n.length+1),r=!0;else{let i=e.value.comment;!t.node&&i&&i.startsWith(n)&&(e.value.comment=i.substr(n.length+1),r=!0)}r&&(e.comment=n)}function qo(t,e){let n=[],r=[],s,i=null;for(let o=0;o<e.items.length;++o){let a=e.items[o];switch(a.type){case p.Type.BLANK_LINE:n.push({afterKey:!!s,before:r.length});break;case p.Type.COMMENT:n.push({afterKey:!!s,before:r.length,comment:a.comment});break;case p.Type.MAP_KEY:s!==void 0&&r.push(new T(s)),a.error&&t.errors.push(a.error),s=pe(t,a.node),i=null;break;case p.Type.MAP_VALUE:{if(s===void 0&&(s=null),a.error&&t.errors.push(a.error),!a.context.atLineStart&&a.node&&a.node.type===p.Type.MAP&&!a.node.context.atLineStart){let f="Nested mappings are not allowed in compact mappings";t.errors.push(new p.YAMLSemanticError(a.node,f))}let c=a.node;if(!c&&a.props.length>0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,pe(t,c));Fo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(rs(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=pe(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Uo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;a<e.items.length;++a){let c=e.items[a];if(typeof c.char=="string"){let{char:l,offset:f}=c;if(l==="?"&&s===void 0&&!i){i=!0,o=":";continue}if(l===":"){if(s===void 0&&(s=null),o===":"){o=",";continue}}else if(i&&(s===void 0&&l!==","&&(s=null),i=!1),s!==void 0&&(r.push(new T(s)),s=void 0,l===",")){o=":";continue}if(l==="}"){if(a===e.items.length-1)continue}else if(l===o){o=":";continue}let m=`Flow map contains an unexpected ${l}`,g=new p.YAMLSyntaxError(e,m);g.offset=f,t.errors.push(g)}else c.type===p.Type.BLANK_LINE?n.push({afterKey:!!s,before:r.length}):c.type===p.Type.COMMENT?(ns(t.errors,c),n.push({afterKey:!!s,before:r.length,comment:c.comment})):s===void 0?(o===","&&t.errors.push(new p.YAMLSemanticError(c,"Separator , missing in flow map")),s=pe(t,c)):(o!==","&&t.errors.push(new p.YAMLSemanticError(c,"Indicator : missing in flow map entry")),r.push(new T(s,pe(t,c))),s=void 0,i=!1)}return ts(t.errors,e),s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Vo(t,e){if(e.type!==p.Type.SEQ&&e.type!==p.Type.FLOW_SEQ){let i=`A ${e.type} node cannot be resolved as a sequence`;return t.errors.push(new p.YAMLSyntaxError(e,i)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_SEQ?Ko(t,e):Wo(t,e),s=new ue;if(s.items=r,ss(s,n),!t.options.mapAsMap&&r.some(i=>i instanceof T&&i.key instanceof Q)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Wo(t,e){let n=[],r=[];for(let s=0;s<e.items.length;++s){let i=e.items[s];switch(i.type){case p.Type.BLANK_LINE:n.push({before:r.length});break;case p.Type.COMMENT:n.push({comment:i.comment,before:r.length});break;case p.Type.SEQ_ITEM:if(i.error&&t.errors.push(i.error),r.push(pe(t,i.node)),i.hasProps){let o="Sequence items cannot have tags or anchors before the - indicator";t.errors.push(new p.YAMLSemanticError(i,o))}break;default:i.error&&t.errors.push(i.error),t.errors.push(new p.YAMLSyntaxError(i,`Unexpected ${i.type} node in sequence`))}}return{comments:n,items:r}}function Ko(t,e){let n=[],r=[],s=!1,i,o=null,a="[",c=null;for(let l=0;l<e.items.length;++l){let f=e.items[l];if(typeof f.char=="string"){let{char:m,offset:g}=f;if(m!==":"&&(s||i!==void 0)&&(s&&i===void 0&&(i=a?r.pop():null),r.push(new T(i)),s=!1,i=void 0,o=null),m===a)a=null;else if(!a&&m==="?")s=!0;else if(a!=="["&&m===":"&&i===void 0){if(a===","){if(i=r.pop(),i instanceof T){let y="Chaining flow sequence pairs is invalid",h=new p.YAMLSemanticError(e,y);h.offset=g,t.errors.push(h)}if(!s&&typeof o=="number"){let y=f.range?f.range.start:f.offset;y>o+1024&&t.errors.push(rs(e,i));let{src:h}=c.context;for(let d=o;d<y;++d)if(h[d]===`
|
||||
`){let w="Implicit keys of flow sequence pairs need to be on a single line";t.errors.push(new p.YAMLSemanticError(c,w));break}}}else i=null;o=null,s=!1,a=null}else if(a==="["||m!=="]"||l<e.items.length-1){let y=`Flow sequence contains an unexpected ${m}`,h=new p.YAMLSyntaxError(e,y);h.offset=g,t.errors.push(h)}}else if(f.type===p.Type.BLANK_LINE)n.push({before:r.length});else if(f.type===p.Type.COMMENT)ns(t.errors,f),n.push({comment:f.comment,before:r.length});else{if(a){let g=`Expected a ${a} in flow sequence`;t.errors.push(new p.YAMLSemanticError(f,g))}let m=pe(t,f);i===void 0?(r.push(m),c=f):(r.push(new T(i,m)),i=void 0),o=f.range.start,a=","}}return ts(t.errors,e),i!==void 0&&r.push(new T(i)),{comments:n,items:r}}M.Alias=we;M.Collection=Q;M.Merge=$t;M.Node=j;M.Pair=T;M.Scalar=x;M.YAMLMap=ct;M.YAMLSeq=ue;M.addComment=Re;M.binaryOptions=Oo;M.boolOptions=Ao;M.findPair=at;M.intOptions=Lo;M.isEmptyPath=Xr;M.nullOptions=To;M.resolveMap=Yo;M.resolveNode=pe;M.resolveSeq=Vo;M.resolveString=$n;M.strOptions=be;M.stringifyNumber=Po;M.stringifyString=ko;M.toJSON=fe});var qn=ne(ee=>{"use strict";var G=ce(),O=De(),jo={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}else{let r="This environment does not support reading binary tags; either Buffer or atob is required";return t.errors.push(new G.YAMLReferenceError(e,r)),null}},options:O.binaryOptions,stringify:({comment:t,type:e,value:n},r,s,i)=>{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<n.length;++c)a+=String.fromCharCode(n[c]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.binaryOptions.defaultType),e===G.Type.QUOTE_DOUBLE)n=o;else{let{lineWidth:a}=O.binaryOptions,c=Math.ceil(o.length/a),l=new Array(c);for(let f=0,m=0;f<c;++f,m+=a)l[f]=o.substr(m,a);n=l.join(e===G.Type.BLOCK_LITERAL?`
|
||||
`:" ")}return O.stringifyString({comment:t,type:e,value:n},r,s,i)}};function os(t,e){let n=O.resolveSeq(t,e);for(let r=0;r<n.items.length;++r){let s=n.items[r];if(!(s instanceof O.Pair)){if(s instanceof O.YAMLMap){if(s.items.length>1){let o="Each pair must have its own sequence indicator";throw new G.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore}
|
||||
${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function as(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var Qo={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:os,createNode:as},$e=class t extends O.YAMLSeq{constructor(){super(),G._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),G._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),G._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),G._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),G._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};G._defineProperty($e,"tag","tag:yaml.org,2002:omap");function Go(t,e){let n=os(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new G.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new $e,n)}function Ho(t,e,n){let r=as(t,e,n),s=new $e;return s.items=r.items,s}var Jo={identify:t=>t instanceof Map,nodeClass:$e,default:!1,tag:"tag:yaml.org,2002:omap",resolve:Go,createNode:Ho},Ye=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};G._defineProperty(Ye,"tag","tag:yaml.org,2002:set");function Xo(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new G.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new Ye,n)}function zo(t,e,n){let r=new Ye;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var Zo={identify:t=>t instanceof Set,nodeClass:Ye,default:!1,tag:"tag:yaml.org,2002:set",resolve:Xo,createNode:zo},Yn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},cs=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},ea={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Yn(e,n.replace(/_/g,"")),stringify:cs},ta={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Yn(e,n.replace(/_/g,"")),stringify:cs},na={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Yn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Bn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Fn(t,e){Bn(!1)&&console.warn(e?`${e}: ${t}`:t)}function ra(t){if(Bn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Fn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var is={};function sa(t,e){if(!is[t]&&Bn(!0)){is[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Fn(n,"DeprecationWarning")}}ee.binary=jo;ee.floatTime=ta;ee.intTime=ea;ee.omap=Jo;ee.pairs=Qo;ee.set=Zo;ee.timestamp=na;ee.warn=Fn;ee.warnFileDeprecation=ra;ee.war
Line truncated
|
||||
${e.indent}${c}`:c}var jn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},jt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>jt(r,e))):t instanceof S.Pair?(jt(t.key,e),jt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},wa=t=>Object.keys(jt(t,{}));function ba(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(`
|
||||
`),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(`
|
||||
`)||null;else{let i=n.before.join(`
|
||||
`);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i}
|
||||
${o.commentBefore}`:i}t.comment=n.after.join(`
|
||||
`)||null}}function Na({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Oa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!As[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Aa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(Na(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Oa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(`
|
||||
`)||null}function Be(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Qt=class t{constructor(e){this.anchors=new jn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Be(this.contents),this.contents.add(e)}addIn(e,n){Be(this.contents),this.contents.addIn(e,n)}delete(e){return Be(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Be(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Be(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Be(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new Ns.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Aa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],ba(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return wa(this.contents).filter(e=>e.indexOf(Ns.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Kt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Kt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Kt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Kt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(`
|
||||
`)+`
|
||||
`}};Y._defineProperty(Qt,"defaults",As);Gt.Document=Qt;Gt.defaultOptions=ga;Gt.scalarOptions=ya});var Ms=ne(Cs=>{"use strict";var Qn=Qr(),Ne=Ls(),La=Kn(),Ta=ce(),Ca=qn();De();function Ma(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new La.Schema(r).createNode(t,e,n)}var Fe=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function ka(t,e){let n=[],r;for(let s of Qn.parse(t)){let i=new Fe(e);i.parse(s,r),n.push(i),r=i}return n}function Ts(t,e){let n=Qn.parse(t),r=new Fe(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ta.YAMLSemanticError(n[1],s))}return r}function Pa(t,e){let n=Ts(t,e);if(n.warnings.forEach(r=>Ca.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function va(t,e){let n=new Fe(e);return n.contents=t,String(n)}var Ia={createNode:Ma,defaultOptions:Ne.defaultOptions,Document:Fe,parse:Pa,parseAllDocuments:ka,parseCST:Qn.parse,parseDocument:Ts,scalarOptions:Ne.scalarOptions,stringify:va};Cs.YAML=Ia});var Gn=ne((Lf,ks)=>{ks.exports=Ms().YAML});var Ps=ne(H=>{"use strict";var qe=De(),Ue=ce();H.findPair=qe.findPair;H.parseMap=qe.resolveMap;H.parseSeq=qe.resolveSeq;H.stringifyNumber=qe.stringifyNumber;H.stringifyString=qe.stringifyString;H.toJSON=qe.toJSON;H.Type=Ue.Type;H.YAMLError=Ue.YAMLError;H.YAMLReferenceError=Ue.YAMLReferenceError;H.YAMLSemanticError=Ue.YAMLSemanticError;H.YAMLSyntaxError=Ue.YAMLSyntaxError;H.YAMLWarning=Ue.YAMLWarning});var Ci={};or(Ci,{__parsePrettierYamlConfig:()=>Xa,languages:()=>Ur,options:()=>Vr,parsers:()=>ir,printers:()=>Ja});var mt=(t,e)=>(n,r,...s)=>n|1&&r==null?void 0:(e.call(r)??r[t]).apply(r,s);function Ri(t){return this[t<0?this.length+t:t]}var Di=mt("at",function(){if(Array.isArray(this)||typeof this=="string")return Ri}),D=Di;var $i=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},Yi=mt("replaceAll",function(){if(typeof this=="string")return $i}),ht=Yi;var Bi=()=>{},je=Bi;var Qe="string",Ge="array",dt="cursor",gt="indent",Ae="align",yt="trim",Le="group",Te="fill",Ce="if-break",Et="indent-if-break",Me="line-suffix",St="line-suffix-boundary",re="line",wt="label",ke="break-parent",bt=new Set([dt,gt,Ae,yt,Le,Te,Ce,Et,Me,St,re,wt,ke]);function Fi(t){if(typeof t=="string")return Qe;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(bt.has(e))return e}var Nt=Fi;var qi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Ui(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(Nt(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=qi([...bt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var an=class extends Error{name="InvalidDocError";constructor(e){super(Ui(e)),this.doc=e}},ar=an;function Vi(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(Nt(i)){case Ge:return e(i.map(r));case Te:return e({...i,parts:i.parts.map(r)});case Ce:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Le:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Ae:case gt:case Et:case wt:case Me:return e({...i,contents:r(i.contents)});case Qe:case dt:case yt:case St:case re:case ke:return e(i);default:throw new ar(i)}}}function cr(t,e=He){return Vi(t,n=>typeof n=="string"?v(e,n.split(`
|
||||
`)):n)}var Z=je,Ot=je,lr=je,fr=je;function Je(t,e){return fr(t),Z(e),{type:Ae,contents:e,n:t}}function cn(t){return Je(Number.NEGATIVE_INFINITY,t)}function ur(t){return Je({type:"root"},t)}function pr(t){return Je(-1,t)}var Xe={type:ke};function At(t){return lr(t),{type:Te,parts:t}}function Pe(t,e={}){return Z(t),Ot(e.expandedStates,!0),{type:Le,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function ln(t,e){return Pe(t[0],{...e,expandedStates:t})}function ze(t,e="",n={}){return Z(t),e!==""&&Z(e),{type:Ce,breakContents:t,flatContents:e,groupId:n.groupId}}function v(t,e){Z(t),Ot(e);let n=[];for(let r=0;r<e.length;r++)r!==0&&n.push(t),n.push(e[r]);return n}var se={type:re},Lt={type:re,soft:!0},Wi={type:re,hard:!0},N=[Wi,Xe],Ki={type:re,hard:!0,literal:!0},He=[Ki,Xe];function mr(t){return Z(t),{type:Me,contents:t}}function Tt(t){return(e,n,r)=>{let s=!!r?.backwards;if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;s?o--:o++}return o===-1||o===i?o:!1}}var sl=Tt(/\s/u),fn=Tt(" "),il=Tt(",; "),ol=Tt(/[^\n\r]/u);var hr=t=>t===`
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function ji(t,e,n){let r=!!n?.backwards;if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===`
|
||||
`)return e-2;if(hr(s))return e-1}else{if(s==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(hr(s))return e+1}return e}var un=ji;function Qi(t,e){let n=e-1;n=fn(t,n,{backwards:!0}),n=un(t,n,{backwards:!0}),n=fn(t,n,{backwards:!0});let r=un(t,n,{backwards:!0});return n!==r}var pn=Qi;var mn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},dr=mn;var gr="format";var yr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u,Er=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u,Sr=/^\s*@(?:format|prettier)\s*$/u;var wr=t=>Sr.test(t),br=t=>Er.test(t),Nr=t=>yr.test(t),Or=t=>`# @${gr}
|
||||
|
||||
${t}`;function Ar(t,e){switch(t.type){case"comment":if(wr(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break}}Ar.ignoredProperties=new Set(["position"]);var Lr=Ar;function Tr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}Tr.getVisitorKeys=()=>[];var Cr=Tr;var Ze=null;function et(t){if(Ze!==null&&typeof Ze.property){let e=Ze;return Ze=et.prototype=null,e}return Ze=et.prototype=t??Object.create(null),new et}var Gi=10;for(let t=0;t<=Gi;t++)et();function hn(t){return et(t)}function Hi(t,e="type"){hn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Mr=Hi;var k=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],kr={root:k[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:k[0],documentBody:k[0],directive:k[1],alias:k[1],blockLiteral:k[1],blockFolded:k[0],plain:k[0],quoteSingle:k[1],quoteDouble:k[1],mapping:k[0],mappingItem:k[2],mappingKey:k[3],mappingValue:k[3],sequence:k[0],sequenceItem:k[3],flowMapping:k[0],flowMappingItem:k[2],flowSequence:k[0],flowSequenceItem:k[3],comment:k[1],tag:k[4],anchor:k[4]};var Ji=Mr(kr),Pr=Ji;var tt=t=>t.position.start.offset,vr=t=>t.position.end.offset;function Xi(t){return Array.isArray(t)&&t.length>0}var ve=Xi;function W(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function dn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>dn(r,e,t))}:t,n)}function Ie(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function _r(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;s<r;s++){let i=e[s];if(i===`
|
||||
`&&n++,n===1&&/\S/u.test(i))return!1;if(n===2)return!0}return!1}function Ct(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let r=1;r<n;r++){let s=t.stack[r],i=t.stack[r-1];if(Array.isArray(i)&&typeof s=="number"&&s!==i.length-1)return!1}return!0}function Mt(t){return ve(t.children)?Mt(D(0,t.children,-1)):t}function Ir(t){return t.value.trim()==="prettier-ignore"}function xr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return I(n)&&Ir(D(0,n.endComments,-1))}return te(e)&&Ir(D(0,e.leadingComments,-1))}function _e(t){return!ve(t.children)&&!zi(t)}function zi(t){return te(t)||ae(t)||gn(t)||K(t)||I(t)}function te(t){return ve(t?.leadingComments)}function ae(t){return ve(t?.middleComments)}function gn(t){return t?.indicatorComment}function K(t){return t?.trailingComment}function I(t){return ve(t?.endComments)}function Rr(t){return t?t.split(/(?<!^| ) (?! |$)/u):[]}function Dr(t,e,n){let r=e.split(`
|
||||
`).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return r.map(i=>i?[i]:[]);let s=[];for(let[i,o]of r.entries()){let a=Rr(o);i>0&&r[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&D(0,D(0,s,-1),-1).endsWith("\\"))?s[s.length-1]=[...D(0,s,-1),...a]:s.push(a)}return n.proseWrap==="never"?s.map(i=>[i.join(" ")]):s}function $r(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1],i;if(t.indent===null){let l=s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);i=l?l.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(`
|
||||
`).map(l=>l.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return c(o.map(l=>l?[l]:[]));let a=[];for(let[l,f]of o.entries()){let m=Rr(f);l>0&&m.length>0&&o[l-1].length>0&&!/^\s/u.test(m[0])&&!/^\s|\s$/u.test(D(0,a,-1))?a[a.length-1]=[...D(0,a,-1),...m]:a.push(m)}return a=a.map(l=>{let f=[];for(let m of l)f.length>0&&/\s$/u.test(D(0,f,-1))?f[f.length-1]+=" "+m:f.push(m);return f}),r.proseWrap==="never"&&(a=a.map(l=>[l.join(" ")])),c(a);function c(l){if(t.chomping==="keep")return D(0,l,-1).length===0?l.slice(0,-1):l;let f=0;for(let m=l.length-1;m>=0&&l[m].length===0;m--)f++;return f===0?l:f>=2&&!n?l.slice(0,-(f-1)):l.slice(0,-f)}}function nt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var yn=new WeakMap;function kt(t,e){let{node:n,root:r}=t,s;return yn.has(r)?s=yn.get(r):(s=new Set,yn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),_r(n,e)&&!En(t.parent))?Lt:""}function En(t){return I(t)&&!W(t,["documentHead","documentBody","flowMapping","flowSequence"])}function _(t,e){return Je(" ".repeat(t),e)}function Zi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Ct(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),gn(r)&&o.push(" ",n("indicatorComment"));let a=$r(r,{parentIndent:s,isLastDescendant:i,options:e}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(At(v(se,f))),l!==a.length-1?c.push(f.length===0?N:ur(He)):r.chomping==="keep"&&i&&c.push(cn(f.length===0?N:He));return r.indent===null?o.push(pr(_(e.tabWidth,c))):o.push(cn(_(r.indent-1+s,c))),o}var Yr=Zi;function Pt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Lt;s&&r.children.length>0&&e.bracketSpacing&&(a=se);let c=D(0,r.children,-1),l=c?.type==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,_(e.tabWidth,[a,eo(t,e,n),e.trailingComma==="none"?"":ze(","),I(r)?[N,v(N,t.map(n,"endComments"))]:""]),l?"":a,o]}function eo(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[n(),r?"":[",",se,s.position.start.line!==i.position.start.line?kt(t,e.originalText):""]],"children")}function to(t,e,n){let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=n("key"),f=no(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&Sn(i.content,e)&&!K(i.content)&&s.tag?.value!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",_(2,l)];let m=n("value");if(a)return[": ",_(2,m)];if(te(o)||!nt(i.content))return["? ",_(2,l),N,...t.map(()=>[n(),N],"value","leadingComments"),": ",_(2,m)];if(ro(i.content)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)&&!te(o.content)&&!ae(o.content)&&!I(o)&&Sn(o.content,e))return[l,f,": ",m];let g=Symbol("mappingKey"),y=Pe([ze("? "),Pe(_(2,l),{id:g})]),h=[N,": ",_(2,m)],d=[f,":"];I(o)&&o.content&&W(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?d.push(" "):te(o.content)||I(o)&&o.content&&!W(o.content,["mapping","sequence"])||s.type==="mapping"&&K(i.content)&&nt(o.content)||W(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?d.push(N):o.content?d.push(se):K(o)&&d.push(" "),d.push(m);let w=_(e.tabWidth,d);return Sn(i.content,e)&&!te(i.content)&&!ae(i.content)&&!K(i.content)&&!I(i)?ln([[l,w]]):ln([[y,ze(h,w,{groupId:g})]])}function Sn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/mu.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/u.test(t.value);default:return!1}}function no(t){return t.key.content?.type==="alias"}function ro(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Br=to;function so(t){return dn(t,io)}function io(t){switch(t.type){case"document":Ie(t,"head",()=>t.children[0]),Ie(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Ie(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Ie(t,"key",()=>t.children[0]),Ie(t,"value",()=>t.children[1]);break}return t}var Fr=so;function oo(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&te(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return W(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Ct(t)&&(a=kt(t,e.originalText)),(i||o)&&(W(r,["sequence","mapping"])&&!ae(r)?s.push(N):s.push(" ")),ae(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),xr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(Pe(ao(t,e,n))),K(r)&&!W(r,["document","documentHead"])&&s.push(mr([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&nt(r)?"":Xe,n("trailingComment")])),En(r)&&s.push(_(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[pn(e.originalText,tt(c))?N:"",n()],"endComments"))])),s.push(a),s}function ao(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=Mt(r),i=!(W(s,["blockLiteral","blockFolded"])&&s.chomping==="keep"),o=[];return t.each(({node:a,isFirst:c})=>{c||o.push(N),o.push(n()),lo(t)&&(i&&o.push(N),o.push("..."),K(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(N),o}case"document":{let s=[];return fo(t)&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),K(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),co(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=Mt(r);if(W(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[N,N]);else{let c=D(0,s,-1);o=W(c,["mapping"])&&pn(e.originalText,tt(i[0]))?[N,N]:N}}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return rt(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/u.test(o)){let c=r.type==="quoteDouble"?'"':"'";return[c,rt(r.type,o,e),c]}if(o.includes('"'))return["'",rt(r.type,r.type==="quoteDouble"?ht(0,ht(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',rt(r.type,r.type==="quoteSingle"?ht(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,rt(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Yr(t,e,n);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",_(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Br(t,e,n);case"flowMapping":return Pt(t,e,n);case"flowSequence":return Pt(t,e,n);case"flowSequenceItem":return n("content");default:throw new dr(r,"YAML")}}function co(t){return t.body.children.length>0||I(t.body)}function lo(t){let e=t.node;if(e.documentEndMarker||K(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||I(n.head)}function fo(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||I(e.head)||K(e.head)}function rt(t,e,n){let r=Dr(t,e,n);return v(N,r.map(s=>At(v(se,s))))}var uo={preprocess:Fr,embed:Cr,print:oo,massageAstNode:Lr,insertPragma:Or,getVisitorKeys:Pr},qr=uo;var Ur=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var vt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces b
Line truncated
|
||||
Reference in new issue
Block a user