1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63730],{68762:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessage=void 0;let n=s(r(47981)),i=s(r(61153)),o=` 2sign-in-with-ethereum = 3 domain %s" wants you to sign in with your Ethereum account:" LF 4 address LF 5 LF 6 [ statement LF ] 7 LF 8 %s"URI: " URI LF 9 %s"Version: " version LF 10 %s"Chain ID: " chain-id LF 11 %s"Nonce: " nonce LF 12 %s"Issued At: " issued-at 13 [ LF %s"Expiration Time: " expiration-time ] 14 [ LF %s"Not Before: " not-before ] 15 [ LF %s"Request ID: " request-id ] 16 [ LF %s"Resources:" 17 resources ] 18 19domain = authority 20 21address = "0x" 40*40HEXDIG 22 ; Must also conform to captilization 23 ; checksum encoding specified in EIP-55 24 ; where applicable (EOAs). 25 26statement = 1*( reserved / unreserved / " " ) 27 ; The purpose is to exclude LF (line breaks). 28 29version = "1" 30 31nonce = 8*( ALPHA / DIGIT ) 32 33issued-at = date-time 34expiration-time = date-time 35not-before = date-time 36 37request-id = *pchar 38 39chain-id = 1*DIGIT 40 ; See EIP-155 for valid CHAIN_IDs. 41 42resources = *( LF resource ) 43 44resource = "- " URI 45 46; ------------------------------------------------------------------------------ 47; RFC 3986 48 49URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] 50 51hier-part = "//" authority path-abempty 52 / path-absolute 53 / path-rootless 54 / path-empty 55 56scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) 57 58authority = [ userinfo "@" ] host [ ":" port ] 59userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) 60host = IP-literal / IPv4address / reg-name 61port = *DIGIT 62 63IP-literal = "[" ( IPv6address / IPvFuture ) "]" 64 65IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) 66 67IPv6address = 6( h16 ":" ) ls32 68 / "::" 5( h16 ":" ) ls32 69 / [ h16 ] "::" 4( h16 ":" ) ls32 70 / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 71 / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 72 / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 73 / [ *4( h16 ":" ) h16 ] "::" ls32 74 / [ *5( h16 ":" ) h16 ] "::" h16 75 / [ *6( h16 ":" ) h16 ] "::" 76 77h16 = 1*4HEXDIG 78ls32 = ( h16 ":" h16 ) / IPv4address 79IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet 80dec-octet = DIGIT ; 0-9 81 / %x31-39 DIGIT ; 10-99 82 / "1" 2DIGIT ; 100-199 83 / "2" %x30-34 DIGIT ; 200-249 84 / "25" %x30-35 ; 250-255 85 86reg-name = *( unreserved / pct-encoded / sub-delims ) 87 88path-abempty = *( "/" segment ) 89path-absolute = "/" [ segment-nz *( "/" segment ) ] 90path-rootless = segment-nz *( "/" segment ) 91path-empty = 0pchar 92 93segment = *pchar 94segment-nz = 1*pchar 95 96pchar = unreserved / pct-encoded / sub-delims / ":" / "@" 97 98query = *( pchar / "/" / "?" ) 99 100fragment = *( pchar / "/" / "?" ) 101 102pct-encoded = "%" HEXDIG HEXDIG 103 104unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" 105reserved = gen-delims / sub-delims 106gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" 107sub-delims = "!" / "$" / "&" / "'" / "(" / ")" 108 / "*" / "+" / "," / ";" / "=" 109 110; ------------------------------------------------------------------------------ 111; RFC 3339 112 113date-fullyear = 4DIGIT 114date-month = 2DIGIT ; 01-12 115date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on 116 ; month/year 117time-hour = 2DIGIT ; 00-23 118time-minute = 2DIGIT ; 00-59 119time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second 120 ; rules 121time-secfrac = "." 1*DIGIT 122time-numoffset = ("+" / "-") time-hour ":" time-minute 123time-offset = "Z" / time-numoffset 124 125partial-time = time-hour ":" time-minute ":" time-second 126 [time-secfrac] 127full-date = date-fullyear "-" date-month "-" date-mday 128full-time = partial-time time-offset 129 130date-time = full-date "T" full-time 131 132; ------------------------------------------------------------------------------ 133; RFC 5234 134 135ALPHA = %x41-5A / %x61-7A ; A-Z / a-z 136LF = %x0A 137 ; linefeed 138DIGIT = %x30-39 139 ; 0-9 140HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" 141`;class a{constructor(e){let t=new n.default(o);if(t.generate(),t.errors.length)throw console.error(t.errorsToAscii()),console.error(t.linesToAscii()),console.log(t.displayAttributeErrors()),Error("ABNF grammar has errors");let r=t.toObject(),s=new i.default.parser;s.ast=new i.default.ast;let a=i.default.ids;s.ast.callbacks.domain=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.domain=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks.address=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.address=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks.statement=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.statement=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks.uri=function(e,t,r,s,n){let o=a.SEM_OK;return e!==a.SEM_PRE||n.uri||(n.uri=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks.version=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.version=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks["chain-id"]=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.chainId=parseInt(i.default.utils.charsToString(t,r,s))),o},s.ast.callbacks.nonce=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.nonce=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks["issued-at"]=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.issuedAt=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks["expiration-time"]=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.expirationTime=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks["not-before"]=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.notBefore=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks["request-id"]=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.requestId=i.default.utils.charsToString(t,r,s)),o},s.ast.callbacks.resources=function(e,t,r,s,n){let o=a.SEM_OK;return e===a.SEM_PRE&&(n.resources=i.default.utils.charsToString(t,r,s).slice(3).split("\n- ")),o};let l=s.parse(r,"sign-in-with-ethereum",e);if(!l.success)throw Error(`Invalid message: ${JSON.stringify(l)}`);let c={};
141for(let[e,t]of(s.ast.translate(c),Object.entries(c)))this[e]=t}}t.ParsedMessage=a},35398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessageRegExp=t.ParsedMessage=void 0;let s=r(68762);Object.defineProperty(t,"ParsedMessage",{enumerable:!0,get:function(){return s.ParsedMessage}});let n=r(6306);Object.defineProperty(t,"ParsedMessageRegExp",{enumerable:!0,get:function(){return n.ParsedMessage}})},6306:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessage=void 0;let r="(([^:?#]+):)?(([^?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))",s=`\\nURI: (?<uri>${r}?)`,n="([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))",i=`\\nIssued At: (?<issuedAt>${n})`,o=`(\\nExpiration Time: (?<expirationTime>${n}))?`,a=`(\\nNot Before: (?<notBefore>${n}))?`,l=`(\\nResources:(?<resources>(\\n- ${r}?)+))?`,c=`^(?<domain>([^?#]*)) wants you to sign in with your Ethereum account:\\n(?<address>0x[a-zA-Z0-9]{40})\\n\\n((?<statement>[^\\n]+)\\n)?${s}\\nVersion: (?<version>1)\\nChain ID: (?<chainId>[0-9]+)\\nNonce: (?<nonce>[a-zA-Z0-9]{8,})${i}${o}${a}(\\nRequest ID: (?<requestId>[-._~!$&'()*+,;=:@%a-zA-Z0-9]*))?${l}$`;class h{constructor(e){var t,r,s,n,i,o,a,l,h,p,u,d,f;let g=RegExp(c,"g").exec(e);
141if(!g)throw Error("Message did not match the regular expression.");this.match=g,this.domain=null===(t=null==g?void 0:g.groups)||void 0===t?void 0:t.domain,this.address=null===(r=null==g?void 0:g.groups)||void 0===r?void 0:r.address,this.statement=null===(s=null==g?void 0:g.groups)||void 0===s?void 0:s.statement,this.uri=null===(n=null==g?void 0:g.groups)||void 0===n?void 0:n.uri,this.version=null===(i=null==g?void 0:g.groups)||void 0===i?void 0:i.version,this.nonce=null===(o=null==g?void 0:g.groups)||void 0===o?void 0:o.nonce,this.chainId=parseInt(null===(a=null==g?void 0:g.groups)||void 0===a?void 0:a.chainId),this.issuedAt=null===(l=null==g?void 0:g.groups)||void 0===l?void 0:l.issuedAt,this.expirationTime=null===(h=null==g?void 0:g.groups)||void 0===h?void 0:h.expirationTime,this.notBefore=null===(p=null==g?void 0:g.groups)||void 0===p?void 0:p.notBefore,this.requestId=null===(u=null==g?void 0:g.groups)||void 0===u?void 0:u.requestId,this.resources=null===(f=null===(d=null==g?void 0:g.groups)||void 0===d?void 0:d.resources)||void 0===f?void 0:f.split("\n- ").slice(1)}}t.ParsedMessage=h},47981:function(e,t,r){e.exports=function(e){let t;let{Buffer:s}=r(15313),n="api.js: ",i=this,o=r(61153),a=r(70402),l=r(86959),c=new(r(86711)),{attributes:h,showAttributes:p,showAttributeErrors:u,showRuleDependencies:d}=r(94934),f=r(30654),g=function(e,t,r){let s;let n=`<span class="${o.style.CLASS_CTRLCHAR}">`,i="</span>",a=`<span class="${o.style.CLASS_NOMATCH}">`,l="</span>",c="";for(;Array.isArray(e)&&0!==e.length;){if("number"!=typeof t)throw Error("abnfToHtml: beg must be type number");if(t>=e.length)break;s="number"!=typeof r||t+r>=e.length?e.length:t+r;let h=0;for(let r=t;r<s;r+=1){let t=e[r];if(t>=32&&t<=126)switch(1===h?(c+=i,h=0):2===h&&(c+=l,h=0),t){case 32:c+=" ";break;case 60:c+="<";break;case 62:c+=">";break;case 38:c+="&";break;case 34:c+=""";break;case 39:c+="'";break;case 92:c+="\";break;default:c+=String.fromCharCode(t)}else 9===t||10===t||13===t?(0===h?(c+=n,h=1):2===h&&(c+=l+n,h=1),9===t&&(c+="TAB"),10===t&&(c+="LF"),13===t&&(c+="CR")):(0===h?(c+=a,h=2):1===h&&(c+=i+a,h=2),c+=`\\x${o.utils.charToHex(t)}`)}2===h&&(c+=l),1===h&&(c+=i);break}return c},m=function(e,t,r){let s="";for(let n=t;n<t+r;n+=1){let t=e[n];if(t>=32&&t<=126)s+=String.fromCharCode(t);else switch(t){case 9:s+="\\t";break;case 10:s+="\\n";break;case 13:s+="\\r";break;default:s+="\\unknown"}}return s},b=function(e){let t="Annotated Input Grammar";return e.forEach(e=>{t+=` 142line no: ${e.lineNo} : char index: ${e.beginChar} : length: ${e.length} : abnf: ${m(i.chars,e.beginChar,e.length)}`}),t+="\n"},y=function(e){let t="";return t+=`<table class="${o.style.CLASS_GRAMMAR}"> 143<caption>Annotated Input Grammar</caption> 144<tr><th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th></tr> 145`,e.forEach(e=>{t+=`<tr><td>${e.lineNo}</td><td>${e.beginChar}</td><td>${e.length}</td><td>${g(i.chars,e.beginChar,e.length)}</td></tr> 146`}),t+="</table>\n"},T=function(e,t,r,s){let[n]=o,i="",a=`<span class="${n.CLASS_NOMATCH}">»</span>`;return i+=`<p><table class="${n.CLASS_GRAMMAR}"> 147`,s&&"string"==typeof s&&(i+=`<caption>${s}</caption> 148`),i+="<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>\n",e.forEach(e=>{let s,n,l,c,h;let p="",u="";0===t.length?(h=a,n=0):(l=(s=t[e.line]).beginChar,e.char>l&&(p=g(r,l,e.char-l)),(l=e.char)<(c=s.beginChar+s.length)&&(u=g(r,l,c-l)),h=p+a+u,n=e.char-s.beginChar,i+=`<tr><td>${e.line}</td><td>${s.beginChar}</td><td>${n}</td><td>${h}</td></tr> 149<tr><td colspan="3"></td><td>↑: ${o.utils.stringToAsciiHtml(e.msg)}</td></tr> 150`)}),i+="</table></p>\n"},E=function(e,t,r){let s,n,i,o;return s="",e.forEach(e=>{n=t[e.line],s+=`${n.lineNo}: ${n.beginChar}: ${e.char-n.beginChar}: `,i=n.beginChar,o=e.char-n.beginChar,s+=m(r,i,o)+" >> ",i=e.char,o=n.beginChar+n.length-e.char,s+=m(r,i,o)+"\n"+`${n.lineNo}: `+`${n.beginChar}: `+`${e.char-n.beginChar}: `+"error: "+e.msg+"\n"}),s},x=!1,A=!1,k=!1,C=!1,S=0;if(this.errors=[],s.isBuffer(e))this.chars=a.decode("BINARY",e);else if(Array.isArray(e))this.chars=e.slice();else if("string"==typeof e)this.chars=a.decode("STRING",e);else throw Error(`${n}input source is not a string, byte Buffer or character array`);this.sabnf=a.encode("STRING",this.chars),this.scan=function(e,t){this.lines=l(this.chars,this.errors,e,t),x=!0},this.parse=function(e,t,r){if(!x)throw Error(`${n}grammar not scanned`);c.syntax(this.chars,this.lines,this.errors,e,t,r),A=!0},this.translate=function(){if(!A)throw Error(`${n}grammar not scanned and parsed`);let e=c.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=e.rules,this.udts=e.udts,t=e.lineMap,k=!0)},this.attributes=function(){if(!k)throw Error(`${n}grammar not scanned, parsed and translated`);return S=h(this.rules,this.udts,t,this.errors),C=!0,S},this.generate=function(e){if(this.lines=l(this.chars,this.errors,e),this.errors.length||(c.syntax(this.chars,this.lines,this.errors,e),this.errors.length))return;let r=c.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=r.rules,this.udts=r.udts,t=r.lineMap,S=h(this.rules,this.udts,t,this.errors),C=!0)},this.displayRules=function(e="index"){if(!k)throw Error(`${n}grammar not scanned, parsed and translated`);return f(this.rules,this.udts,e)},this.displayRuleDependencies=function(e="index"){if(!C)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return d(e)},this.displayAttributes=function(e="index"){if(!C)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return S&&u(e),p(e)},this.displayAttributeErrors=function(){if(!C)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return u()},this.toSource=function(e){if(!C)throw Error(`${n}can't generate parser source - must be preceeded by call to attributes()`);if(S)throw Error(`${n}can't generate parser source - attributes have ${S} errors`);return c.generateSource(this.chars,this.lines,this.rules,this.udts,e)},this.toObject=function(){if(!C)throw Error(`${n}can't generate parser source - must be preceeded by call to attributes()`);if(S)throw Error(`${n}can't generate parser source - attributes have ${S} errors`);return c.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return E(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return T(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return b(this.lines)},this.linesToHtml=function(){return y(this.lines)}}},94934:function(e,t,r){e.exports=function(){let e=r(20621),{ruleAttributes:t,showAttributes:s,showAttributeErrors:n}=r(89964),{ruleDependencies:i,showRuleDependencies:o}=r(49230);class a{constructor(e,t){this.rules=e,this.udts=t,this.ruleCount=e.length,this.udtCount=t.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let t=0;t<this.ruleCount;t+=1)this.attrs.push(this.attrGen(this.rules[t])),this.attrsWorking.push(this.attrGen(this.rules[t])),this.ruleDeps.push(this.rdGen(e[t],this.ruleCount,this.udtCount));this.compRulesAlpha=this.compRulesAlpha.bind(this),this.compUdtsAlpha=this.compUdtsAlpha.bind(this),this.compRulesType=this.compRulesType.bind(this),this.compRulesGroup=this.compRulesGroup.bind(this)}attrGen(e){return{left:!1,nested:!1,right:!1,empty:!1,finite:!1,cyclic:!1,leaf:!1,isOpen:!1,isComplete:!1,rule:e}}attrInit(e){e.left=!1,e.nested=!1,e.right=!1,e.empty=!1,e.finite=!1,e.cyclic=!1,e.leaf=!1,e.isOpen=!1,e.isComplete=!1}attrCopy(e,t){e.left=t.left,e.nested=t.nested,e.right=t.right,e.empty=t.empty,e.finite=t.finite,e.cyclic=t.cyclic,e.leaf=t.leaf,e.isOpen=t.
150isOpen,e.isComplete=t.isComplete,e.rule=t.rule}rdGen(t,r,s){return{rule:t,recursiveType:e.ATTR_N,groupNumber:-1,refersTo:this.falseArray(r),refersToUdt:this.falseArray(s),referencedBy:this.falseArray(r)}}typeToString(t){switch(t){case e.ATTR_N:return" N";case e.ATTR_R:return" R";case e.ATTR_MR:return"MR";default:return"UNKNOWN"}}falseArray(e){let t=[];if(e>0)for(let r=0;r<e;r+=1)t.push(!1);return t}falsifyArray(e){for(let t=0;t<e.length;t+=1)e[t]=!1}indexArray(e){let t=[];if(e>0)for(let r=0;r<e;r+=1)t.push(r);return t}compRulesAlpha(e,t){return this.rules[e].lower<this.rules[t].lower?-1:this.rules[e].lower>this.rules[t].lower?1:0}compUdtsAlpha(e,t){return this.udts[e].lower<this.udts[t].lower?-1:this.udts[e].lower>this.udts[t].lower?1:0}compRulesType(e,t){return this.ruleDeps[e].recursiveType<this.ruleDeps[t].recursiveType?-1:this.ruleDeps[e].recursiveType>this.ruleDeps[t].recursiveType?1:0}compRulesGroup(t,r){if(this.ruleDeps[t].recursiveType===e.ATTR_MR&&this.ruleDeps[r].recursiveType===e.ATTR_MR){if(this.ruleDeps[t].groupNumber<this.ruleDeps[r].groupNumber)return -1;if(this.ruleDeps[t].groupNumber>this.ruleDeps[r].groupNumber)return 1}return 0}}return{attributes:function(e=[],r=[],s=[],n=[]){let o=new a(e,r);return i(o),t(o),o.attrsErrorCount&&n.push({line:0,char:0,msg:`${o.attrsErrorCount} attribute errors`}),o.attrsErrorCount},showAttributes:s,showAttributeErrors:n,showRuleDependencies:o}}()},86711:function(e,t,r){e.exports=function(){let e=r(61153),t=e.ids,s=new(r(98336)),n=new(r(95259)),i=new(r(91104)),o=new e.parser;o.ast=new e.ast,o.callbacks=s.callbacks,o.ast.callbacks=n.callbacks;let a=function(e,t,r){if(t<0||t>=r)return -1;for(let r=0;r<e.length;r+=1)if(t>=e[r].beginChar&&t<e[r].beginChar+e[r].length)return r;return -1},l=function(e,t){let r=-1;if(t<e.length){for(let s=t;s<e.length;s+=1)if(null!==e[s]){r=e[s];break}}return r},c=function(e){e.forEach(e=>{let r=[],s=[],n=0;e.opcodes.forEach(e=>{e.type===t.ALT&&1===e.children.length?s.push(null):e.type===t.CAT&&1===e.children.length?s.push(null):e.type===t.REP&&1===e.min&&1===e.max?s.push(null):(s.push(n),r.push(e),n+=1)}),s.push(n),r.forEach(e=>{if(e.type===t.ALT||e.type===t.CAT)for(let t=0;t<e.children.length;t+=1)e.children[t]=l(s,e.children[t])}),e.opcodes=r})};this.syntax=function(e,t,r,s,n,l){if(l){if("traceObject"!==l.traceObject)throw TypeError("parser: trace argument is not a trace object");o.trace=l}let c={};c.errors=r,c.strict=!!s,c.lite=!!n,c.lines=t,c.findLine=a,c.charsLength=e.length,c.ruleCount=0,o.parse(i,"file",e,c).success||r.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},this.semantic=function(e,t,r){let s={};return(s.errors=r,s.lines=t,s.findLine=a,s.charsLength=e.length,o.ast.translate(s),r.length)?null:(c(s.rules),{rules:s.rules,udts:s.udts,lineMap:s.rulesLineMap})},this.generateSource=function(e,r,s,n,i){let o,a,l,c,h="",p=!1,u=!1;i&&(i.typescript?(p=!0,u=!1):i.lite&&(p=!1,u=!0));let d=0,f=1/0,g=0,m=[],b=[],y=0,T=0,E=0,x=0,A=0,k=0,C=0,S=0,M=0,w=0,$=0,O=0,L=0,N=0,R=0;return s.forEach(e=>{m.push(e.lower),d+=e.opcodes.length,e.opcodes.forEach(e=>{switch(e.type){case t.ALT:y+=1;break;case t.CAT:T+=1;break;case t.RNM:E+=1;break;case t.UDT:x+=1;break;case t.REP:A+=1;break;case t.AND:k+=1;break;case t.NOT:C+=1;break;case t.BKA:O+=1;break;case t.BKN:L+=1;break;case t.BKR:$+=1;break;case t.ABG:N+=1;break;case t.AEN:R+=1;break;case t.TLS:for(S+=1,o=0;o<e.string.length;o+=1)e.string[o]<f&&(f=e.string[o]),e.string[o]>g&&(g=e.string[o]);break;case t.TBS:for(M+=1,o=0;o<e.string.length;o+=1)e.string[o]<f&&(f=e.string[o]),e.string[o]>g&&(g=e.string[o]);break;case t.TRG:w+=1,e.min<f&&(f=e.min),e.max>g&&(g=e.max);break;default:throw Error("generateSource: unrecognized opcode")}})}),m.sort(),n.length>0&&(n.forEach(e=>{b.push(e.lower)}),b.sort()),h+="// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\n",i?i.funcName?h+=`const ${i.funcName} = function grammar(){ 151`:p?h+="export function grammar(){\n":u?h+="export default function grammar(){\n":h+=`module.exports = function grammar(){ 152`:h+=`module.exports = function grammar(){ 153`,h+=` // \`\`\` 154 // SUMMARY 155 // rules = ${s.length} 156 // udts = ${n.length} 157 // opcodes = ${d} 158 // --- ABNF original opcodes 159 // ALT = ${y} 160 // CAT = ${T} 161 // REP = ${A} 162 // RNM = ${E} 163 // TLS = ${S}
164 // TBS = ${M} 165 // TRG = ${w} 166 // --- SABNF superset opcodes 167 // UDT = ${x} 168 // AND = ${k} 169 // NOT = ${C} 170`,u||(h+=` // BKA = ${O} 171 // BKN = ${L} 172 // BKR = ${$} 173 // ABG = ${N} 174 // AEN = ${R} 175`),h+=" // characters = [",S+M+w===0?h+=" none defined ]":h+=`${f} - ${g}]`,x>0&&(h+=" + user defined"),h+="\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n",s.forEach((e,t)=>{let r=" this.rules[";r+=t+"] = { name: '"+e.name+"', lower: '"+e.lower+"', index: "+e.index+", isBkr: "+e.isBkr+" };\n",h+=r}),h+="\n /* UDTS */\n this.udts = [];\n",n.length>0&&n.forEach((e,t)=>{let r=" this.udts[";r+=t+"] = { name: '"+e.name+"', lower: '"+e.lower+"', index: "+e.index+", empty: "+e.empty+", isBkr: "+e.isBkr+" };\n",h+=r}),h+="\n /* OPCODES */\n",s.forEach((e,r)=>{r>0&&(h+="\n"),h+=` /* ${e.name} */ 176 this.rules[${r}].opcodes = []; 177`,e.opcodes.forEach((e,i)=>{let o;switch(e.type){case t.ALT:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, children: [${e.children.toString()}] };// ALT 178`;break;case t.CAT:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, children: [${e.children.toString()}] };// CAT 179`;break;case t.RNM:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, index: ${e.index} };// RNM(${s[e.index].name}) 180`;break;case t.BKR:e.index>
180=s.length?(a=n[e.index-s.length].name,l=n[e.index-s.length].lower):(a=s[e.index].name,l=s[e.index].lower),o="%i",e.bkrCase===t.BKR_MODE_CS&&(o="%s"),e.bkrMode===t.BKR_MODE_UM?o+="%u":o+="%p",a=o+a,h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, index: ${e.index}, lower: '${l}', bkrCase: ${e.bkrCase}, bkrMode: ${e.bkrMode} };// BKR(\\${a}) 181`;break;case t.UDT:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, empty: ${e.empty}, index: ${e.index} };// UDT(${n[e.index].name}) 182`;break;case t.REP:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// REP 183`;break;case t.AND:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// AND 184`;break;case t.NOT:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// NOT 185`;break;case t.ABG:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// ABG(%^) 186`;break;case t.AEN:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// AEN(%$) 187`;break;case t.BKA:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// BKA 188`;break;case t.BKN:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type} };// BKN 189`;break;case t.TLS:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, string: [${e.string.toString()}] };// TLS 190`;break;case t.TBS:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, string: [${e.string.toString()}] };// TBS 191`;break;case t.TRG:h+=` this.rules[${r}].opcodes[${i}] = { type: ${e.type}, min: ${e.min}, max: ${e.max} };// TRG 192`;break;default:throw Error("parser.js: ~143: unrecognized opcode")}})}),h+='\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString(){\n let str = "";\n',r.forEach(t=>{let r=t.beginChar+t.length;c="",h+=' str += "';for(let s=t.beginChar;s<r;s+=1){switch(e[s]){case 9:c=" ";break;case 10:c="\\n";break;case 13:c="\\r";break;case 34:c='\\"';break;case 92:c="\\\\";break;default:c=String.fromCharCode(e[s])}h+=c}h+='";\n'}),h+=" return str;\n }\n}\n"},this.generateObject=function(e,t,r){let s={},n=[],i=[],o=e.slice(0);return s.grammarObject="grammarObject",t.forEach(e=>{n.push(e.lower)}),n.sort(),r.length>0&&(r.forEach(e=>{i.push(e.lower)}),i.sort()),s.callbacks=[],n.forEach(e=>{s.callbacks[e]=!1}),r.length>0&&i.forEach(e=>{s.callbacks[e]=!1}),s.rules=t,s.udts=r,s.toString=function(){return o},s}}},89964:function(e,t,r){e.exports=function(){let e=r(20621),t=null;function s(e){return!e.left&&!e.nested&&!e.right&&!e.cyclic&&e.empty}function n(e){return!!e.left||!!e.nested||!!e.right||!!e.cyclic}let i=e=>e?"t":"f",o=e=>e?"e":"f",a=e=>e?"t":"e",l=(r,s,n,l)=>`${r}:${s}:`+(`${o(n.left)} ${i(n.nested)} ${i(n.right)} ${o(n.cyclic)} ${a(n.finite)} ${i(n.empty)}:${t.typeToString(l.recursiveType)}:`+(l.recursiveType===e.ATTR_MR?l.groupNumber:"-"))+`:${n.rule.name} 193`,c=()=>"LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n",h=e=>{let r=0,s=0,n=null,i=null,o="",{ruleIndexes:a}=t;
193for(97===e?a=t.ruleAlphaIndexes:116===e&&(a=t.ruleTypeIndexes),r=0;r<t.ruleCount;r+=1)s=a[r],n=t.attrs[s],i=t.ruleDeps[s],o+=l(r,s,n,i);return o};return{ruleAttributes:r=>{let i=0,o=0,a=(t=r).attrGen();for(i=0;i<t.ruleCount;i+=1){for(o=0;o<t.ruleCount;o+=1)t.attrInit(t.attrsWorking[o]);t.startRule=i,function t(r,i,o){let a=r.attrsWorking[i];a.isComplete?r.attrCopy(o,a):a.isOpen?i===r.startRule?i===r.startRule&&(o.left=!0,o.right=!0,o.cyclic=!0,o.leaf=!0):o.finite=!0:(a.isOpen=!0,function r(i,o,a,l){i.attrInit(l);let c=o[a];switch(c.type){case e.ALT:!function(e,t,s,n){let i=0,o=t[s],a=o.children.length,l=[];for(i=0;i<a;i+=1)l.push(e.attrGen());for(i=0;i<a;i+=1)r(e,t,o.children[i],l[i]);for(i=0,n.left=!1,n.right=!1,n.nested=!1,n.empty=!1,n.finite=!1,n.cyclic=!1;i<a;i+=1)l[i].left&&(n.left=!0),l[i].nested&&(n.nested=!0),l[i].right&&(n.right=!0),l[i].empty&&(n.empty=!0),l[i].finite&&(n.finite=!0),l[i].cyclic&&(n.cyclic=!0)}(i,o,a,l);break;case e.CAT:!function(e,t,i,o){let a=0,l=t[i],c=l.children.length,h=[];for(a=0;a<c;a+=1)h.push(e.attrGen());for(a=0;a<c;a+=1)r(e,t,l.children[a],h[a]);o.left=function(e,t){for(let r=0;r<t;r+=1){if(e[r].left)return!0;if(!e[r].empty)break}return!1}(h,c),o.right=function(e,t){for(let r=t-1;r>=0;r-=1){if(e[r].right)return!0;if(!e[r].empty)break}return!1}(h,c),o.nested=function(e,t){let r=0,i=0,o=0;for(r=0;r<t;r+=1)if(e[r].nested)return!0;for(r=0;r<t;r+=1)if(e[r].right&&!e[r].leaf){for(i=r+1;i<t;i+=1)if(!s(e[i]))return!0}for(r=t-1;r>=0;r-=1)if(e[r].left&&!e[r].leaf){for(i=r-1;i>=0;i-=1)if(!s(e[i]))return!0}for(r=0;r<t;r+=1)if(!e[r].empty&&!n(e[r])){for(i=r+1;i<t;i+=1)if(n(e[i])){for(o=i+1;o<t;o+=1)if(!e[o].empty&&!n(e[o]))return!0}}return!1}(h,c),o.empty=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].empty)return!1;return!0}(h,c),o.finite=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].finite)return!1;return!0}(h,c),o.cyclic=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].cyclic)return!1;return!0}(h,c)}(i,o,a,l);break;case e.REP:r(i,o,a+1,l),0===c.min&&(l.empty=!0,l.finite=!0);break;case e.RNM:t(i,o[a].index,l);break;case e.BKR:!function(e,r,s,n){let i=r[s];i.index>=e.ruleCount?(n.empty=e.udts[i.index-e.ruleCount].empty,n.finite=!0):(t(e,i.index,n),n.left=!1,n.nested=!1,n.right=!1,n.cyclic=!1)}(i,o,a,l);break;case e.AND:case e.NOT:case e.BKA:case e.BKN:r(i,o,a+1,l),l.empty=!0;break;case e.TLS:l.empty=!o[a].string.length,l.finite=!0,l.cyclic=!1;break;case e.TBS:case e.TRG:l.empty=!1,l.finite=!0,l.cyclic=!1;break;case e.UDT:l.empty=c.empty,l.finite=!0,l.cyclic=!1;break;case e.ABG:case e.AEN:l.empty=!0,l.finite=!0,l.cyclic=!1;break;default:throw Error(`unknown opcode type: ${c}`)}}(r,a.rule.opcodes,0,o),a.left=o.left,a.right=o.right,a.nested=o.nested,a.empty=o.empty,a.finite=o.finite,a.cyclic=o.cyclic,a.leaf=!1,a.isOpen=!1,a.isComplete=!0)}(t,i,a),t.attrCopy(t.attrs[i],t.attrsWorking[i])}t.attributesComplete=!0;let l=null;for(i=0;i<t.ruleCount;i+=1)if((l=t.attrs[i]).left||!l.finite||l.cyclic){let e=t.attrGen(l.rule);t.attrCopy(e,l),t.attrsErrors.push(e),t.attrsErrorCount+=1}},showAttributes:(e="index")=>{if(!t.attributesComplete)throw Error("rule-attributes.js:showAttributes: attributes not available");let r="",s="RULE ATTRIBUTES\n";return 97===e.charCodeAt(0)?r+="alphabetical by rule name\n"+s+c()+h(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+s+c()+h(116):r+="ordered by rule index\n"+s+c()+h(),r},showAttributeErrors:()=>{let e=null,r=null,s="";if(s+="RULE ATTRIBUTES WITH ERRORS\n"+c(),t.attrsErrorCount)for(let n=0;n<t.attrsErrorCount;n+=1)e=t.attrsErrors[n],r=t.ruleDeps[e.rule.index],s+=l(n,e.rule.index,e,r);else s+="<none>\n";return s}}}()},49230:function(e,t,r){e.exports=(()=>{let e=r(20621),t=null,s=(t,r,n,i)=>{let o=0,a=0,l=r[n];i[n]=!0;let c=l.rule.opcodes;for(o=0;o<c.length;o+=1){let n=c[o];if(n.type===e.RNM)for(l.refersTo[n.index]=!0,i[n.index]||s(t,r,n.index,i),a=0;a<t;a+=1)r[n.index].refersTo[a]&&(l.refersTo[a]=!0);else n.type===e.UDT?l.refersToUdt[n.index]=!0:n.type!==e.BKR||(n.index<t?(l.refersTo[n.index]=!0,i[n.index]||s(t,r,n.index,i)):l.refersToUdt[t-n.index]=!0)}},n=(e=null)=>{let r=0,s=0,n=0,i=0,o=t.ruleCount-1,a=t.udtCount-1,l="",c="",h=!1,p=null,{ruleIndexes:u}=t,{udtIndexes:d}=t;
193for(97===e?(u=t.ruleAlphaIndexes,d=t.udtAlphaIndexes):116===e&&(u=t.ruleTypeIndexes,d=t.udtAlphaIndexes),r=0;r<t.ruleCount;r+=1){for(p=t.ruleDeps[u[r]],c=`${u[r]}:${t.typeToString(p.recursiveType)}:`,t.isMutuallyRecursive&&(c+=(p.groupNumber>-1?p.groupNumber:"-")+":"),c+=" ",l+=`${c+t.rules[u[r]].name} 194`,h=!0,n=0,i=l.length,l+=c,s=0;s<t.ruleCount;s+=1)p.refersTo[u[s]]&&(h?(h=!1,l+="=> "+t.ruleDeps[u[s]].rule.name):l+=`, ${t.ruleDeps[u[s]].rule.name}`,n+=1),l.length-i>100&&s!==o&&(l+=` 195${c}=> `,i=l.length);if(t.udtCount)for(s=0;s<t.udtCount;s+=1)p.refersToUdt[d[s]]&&(h?(h=!1,l+="=> "+t.udts[d[s]].name):l+=`, ${t.udts[d[s]].name}`,n+=1),l.length-i>100&&s!==a&&(l+=` 196${c}=> `,i=l.length);for(0===n&&(l+="=> <none>\n"),!1===h&&(l+="\n"),h=!0,n=0,i=l.length,l+=c,s=0;s<t.ruleCount;s+=1)p.referencedBy[u[s]]&&(h?(h=!1,l+="<= "+t.ruleDeps[u[s]].rule.name):l+=`, ${t.ruleDeps[u[s]].rule.name}`,n+=1),l.length-i>100&&s!==o&&(l+=` 197${c}=> `,i=l.length);0===n&&(l+="<= <none>\n"),!1===h&&(l+="\n"),l+="\n"}return l};return{ruleDependencies:r=>{let n=0,i=0,o=0,a=null,l=null,c=!1;(t=r).dependenciesComplete=!1;let h=t.falseArray(t.ruleCount);for(n=0;n<t.ruleCount;n+=1)t.falsifyArray(h),s(t.ruleCount,t.ruleDeps,n,h);for(n=0;n<t.ruleCount;n+=1)for(i=0;i<t.ruleCount;i+=1)n!==i&&t.ruleDeps[i].refersTo[n]&&(t.ruleDeps[n].referencedBy[i]=!0);for(n=0;n<t.ruleCount;n+=1)t.ruleDeps[n].recursiveType=e.ATTR_N,t.ruleDeps[n].refersTo[n]&&(t.ruleDeps[n].recursiveType=e.ATTR_R);for(n=0,o=-1;n<t.ruleCount;n+=1)if((a=t.ruleDeps[n]).recursiveType===e.ATTR_R)for(i=0,c=!0;i<t.ruleCount;i+=1)n!==i&&(l=t.ruleDeps[i]).recursiveType===e.ATTR_R&&a.refersTo[i]&&l.refersTo[n]&&(c&&(o+=1,a.recursiveType=e.ATTR_MR,a.groupNumber=o,c=!1),l.recursiveType=e.ATTR_MR,l.groupNumber=o);t.isMutuallyRecursive=o>-1,t.ruleAlphaIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesType),t.isMutuallyRecursive&&t.ruleTypeIndexes.sort(t.compRulesGroup),t.udtCount&&t.udtAlphaIndexes.sort(t.compUdtsAlpha),t.dependenciesComplete=!0},showRuleDependencies:(e="index")=>{let r="RULE DEPENDENCIES(index:type:[group number:])\n";return r+="=> refers to rule names\n<= referenced by rule names\n",t.dependenciesComplete&&(97===e.charCodeAt(0)?r+="alphabetical by rule name\n"+n(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+n(116):r+="ordered by rule index\n"+n(null)),r}}})()},91104:function(e){e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1}
197,this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0}
197,this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]}
197,this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1}
197,this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83}
197,this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]}
197,this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function(){return";\n; ABNF for JavaScript APG 2.0 SABNF\n; RFC 5234 with some restrictions and additions.\n; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n; - accepts %s\"string\" as a case-sensitive string\n; - accepts %i\"string\" as a case-insensitive string\n; - accepts \"string\" as a case-insensitive string\n;\n; Some restrictions:\n; 1. Rules must begin at first character of each line.\n; Indentations on first rule and rules thereafter are not allowed.\n; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n;
197 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n; e.g. &%d13 or &rule or !(A / B)\n; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n; u_name may be used as an element but no rule definition is given.\n; e.g. rule = A / u_myUdt\n; A = \"a\"\n; would be a valid grammar.\n; 3. Case-sensitive, single-quoted strings are accepted.\n; e.g. 'abc' would be equivalent to %d97.98.99\n; (kept for backward compatibility, but superseded by %s\"abc\") \n; New 12/26/2015\n; 4. Look-behind operators are accepted as element prefixes.\n; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n; e.g. &&%d13 or &&rule or !!(A / B)\n; 5. Back reference operators, i.e. \\rulename, are accepted.\n; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n; to match is a phrase previously matched by the rule 'rulename'.\n; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n; Back reference modifiers can be used to specify case and mode.\n; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n; 8. String end anchor, AEN(%$) matches the end of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n;\nFile = *(BlankLine / Rule / RuleError)\nBlankLine = *(%d32/%d9) [comment] LineEnd\nRule = RuleLookup owsp Alternation ((owsp LineEnd)\n / (LineEndError LineEnd))\nRuleLookup = RuleNameTest owsp DefinedAsTest\nRuleNameTest = RuleName/RuleNameError\nRuleName = alphanum\nRuleNameError = 1*(%d33-60/%d62-126)\nDefinedAsTest = DefinedAs / DefinedAsError\nDefinedAsError = 1*2%d33-126\nDefinedAs = IncAlt / Defined\nDefined = %d61\nIncAlt = %d61.47\nRuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\nLineEndError = 1*(%d32-126 / %d9 / LineContinue)\nAlternation = Concatenation *(owsp AltOp Concatenation)\nConcatenation = Repetition *(CatOp Repetition)\nRepetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\nModifier = (Predicate [RepOp])\n / RepOp\nPredicate = BkaOp\n / BknOp\n / AndOp\n / NotOp\nBasicElement = UdtOp\n / RnmOp\n / TrgOp\n / TbsOp\n / TlsOp\n / ClsOp\n / BkrOp\n / AbgOp\n / AenOp\n / ProsVal\nBasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\nGroup = GroupOpen Alternation (GroupClose / GroupError)\nGroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nGroupOpen = %d40 owsp\nGroupClose = owsp %d41\nOption = OptionOpen Alternation (OptionClose / OptionError)\nOptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ;
197 same as BasicElementErr\nOptionOpen = %d91 owsp\nOptionClose = owsp %d93\nRnmOp = alphanum\nBkrOp = %d92 [bkrModifier] bkr-name\nbkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\ncs = '%s'\nci = '%i'\num = '%u'\npm = '%p'\nbkr-name = uname / ename / rname\nrname = alphanum\nuname = %d117.95 alphanum\nename = %d101.95 alphanum\nUdtOp = udt-empty\n / udt-non-empty\nudt-non-empty = %d117.95 alphanum\nudt-empty = %d101.95 alphanum\nRepOp = (rep-min StarOp rep-max)\n / (rep-min StarOp)\n / (StarOp rep-max)\n / StarOp\n / rep-min-max\nAltOp = %d47 owsp\nCatOp = wsp\nStarOp = %d42\nAndOp = %d38\nNotOp = %d33\nBkaOp = %d38.38\nBknOp = %d33.33\nAbgOp = %d37.94\nAenOp = %d37.36\nTrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\nTbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\nTlsOp = TlsCase TlsOpen TlsString TlsClose\nTlsCase = [\"%i\" / \"%s\"]\nTlsOpen = %d34\nTlsClose = %d34\nTlsString = *(%d32-33/%d35-126/StringTab)\nStringTab = %d9\nClsOp = ClsOpen ClsString ClsClose\nClsOpen = %d39\nClsClose = %d39\nClsString = *(%d32-38/%d40-126/StringTab)\nProsVal = ProsValOpen ProsValString ProsValClose\nProsValOpen = %d60\nProsValString = *(%d32-61/%d63-126/StringTab)\nProsValClose = %d62\nrep-min = rep-num\nrep-min-max = rep-num\nrep-max = rep-num\nrep-num = 1*(%d48-57)\ndString = dnum\nxString = xnum\nbString = bnum\nDec = (%d68/%d100)\nHex = (%d88/%d120)\nBin = (%d66/%d98)\ndmin = dnum\ndmax = dnum\nbmin = bnum\nbmax = bnum\nxmin = xnum\nxmax = xnum\ndnum = 1*(%d48-57)\nbnum = 1*%d48-49\nxnum = 1*(%d48-57 / %d65-70 / %d97-102)\n;\n; Basics\nalphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\nowsp = *space\nwsp = 1*space\nspace = %d32\n / %d9\n / comment\n / LineContinue\ncomment = %d59 *(%d32-126 / %d9)\nLineEnd = %d13.10\n / %d10\n / %d13\nLineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},79455:function(e,t,r){let s=r(20621),n=r(42109),i=[];i.line=function(e,t,r,n,i){return e===s.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:i.textLength,endType:i.endType,invalidChars:i.invalidCount}),s.SEM_OK},i["line-text"]=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.textLength=n),s.SEM_OK},i["last-line"]=function(e,t,r,n,i){return e===s.SEM_PRE?(i.endLength=0,i.textLength=0,i.invalidCount=0):i.strict?(i.lines.push({lineNo:i.lines.length,beginChar:r,length:n,textLength:n,endType:"none",invalidChars:i.invalidCount}),i.errors.push({line:i.lineNo,char:r+n,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(t.push(10),i.lines.push({lineNo:i.lines.length,beginChar:r,length:n+1,textLength:n,endType:"LF",invalidChars:i.invalidCount})),s.SEM_OK},i.invalid=function(e,t,r,i,o){return e===s.SEM_PRE&&o.errors.push({line:o.lineNo,char:r,msg:`invalid character found '\\x${n.charToHex(t[r])}'`}),s.SEM_OK},i.end=function(e,t,r,n,i){return e===s.SEM_POST&&(i.lineNo+=1),s.SEM_OK},i.lf=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="LF",i.strict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),s.SEM_OK},i.cr=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="CR",i.str
197ict&&i.errors.push({line:i.lineNo,char:r,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),s.SEM_OK},i.crlf=function(e,t,r,n,i){return e===s.SEM_PRE&&(i.endType="CRLF"),s.SEM_OK},t.callbacks=i},92598:function(e){e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function(){return"file = *line [last-line]\nline = line-text end\nline-text = *(valid/invalid)\nlast-line = 1*(valid/invalid)\nvalid = %d32-126 / %d9\ninvalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\nend = CRLF / LF / CR\nCRLF = %d13.10\nLF = %d10\nCR = %d13\n"}}},86959:function(e,t,r){e.exports=function(e,t,s,n){let i=r(61153),o=new(r(92598)),{callbacks:a}=r(79455),l=[],c=new i.parser;if(c.ast=new i.ast,c.ast.callbacks=a,n){if("traceObject"!==n.traceObject)throw TypeError("scanner.js: trace argument is not a trace object");c.trace=n}if(!0!==c.parse(o,"file",e).success){t.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}return c.ast.translate({lines:l,lineNo:0,errors:t,strict:!!s}),l}},95259:function(e,t,r){e.exports=function(){let e=r(61153),t=e.ids,s=function(){this.names=[],this.add=function(e){let t=-1;return -1===this.get(e)&&(t={name:e,lower:e.toLowerCase(),index:this.names.length},this.names.push(t)),t},this.get=function(e){let t=-1,r=e.toLowerCase();for(let e=0;e<this.names.length;e+=1)if(this.names[e].lower===r){t=this.names[e];break}return t}},n=function(e,t,r){let s=0;for(let n=t;n<t+r;n+=1)s=10*s+e[n]-48;return s},i=function(e,t,r){let s=0;for(let n=t;n<t+r;n+=1)s=2*s+e[n]-48;return s},o=function(e,t,r){let s=0;for(let n=t;n<t+r;n+=1){let t=e[n];if(t>=48&&t<=57)t-=48;else if(t>=65&&t<=70)t-=55;else if(t>=97&&t<=102)t-=87;else throw Error("hexnum out of range");s=16*s+t}return s};this.callbacks=[],this.callbacks.abgop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.ABG}),o},this.callbacks.aenop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.AEN}),o},this.callbacks.alternation=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_PRE)for(;;){if(null===i.definedas){o=t.SEM_SKIP;break}if(null===i.topStack){if("="===i.definedas){i.topStack={alt:{type:t.ALT,children:[]},cat:null},i.altStack.push(i.topStack),i.opcodes.push(i.topStack.alt);break}i.topStack={alt:i.opcodes[0],cat:null},i.altStack.push(i.topStack);break}i.topStack={alt:{type:t.ALT,children:[]},cat:null},i.altStack.push(i.topStack),i.opcodes.push(i.topStack.alt);break}else e===t.SEM_POST&&(i.altStack.pop(),i.altStack.length>0?i.topStack=i.altStack[i.altStack.length-1]:i.topStack=null);return o},this.callbacks.andop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.AND}),o},this.callbacks.bmax=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=i(r,s,n)),a},this.callbacks.bmin=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=i(r,s,n)),a},this.callbacks.bkaop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.BKA}),o},this.callbacks.bknop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.BKN}),o},this.callbacks.bkrop=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_PRE?(o.ci=!0,o.cs=!1,o.um=!0,o.pm=!1):r===t.SEM_POST&&o.opcodes.push({type:t.BKR,bkrCase:!0===o.cs?t.BKR_MODE_CS:t.BKR_MODE_CI,bkrMode:!0===o.pm?t.BKR_MODE_PM:t.BKR_MODE_UM,index:{phraseIndex:o.bkrname.phraseIndex,name:e.utils.charsToString(s,o.bkrname.phraseIndex,o.bkrname.phraseLength)}}),a},this.callbacks["bkr-name"]=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.bkrname={phraseIndex:s,phraseLength:n}),o},this.callbacks.bstring=function(e,r,s,n,o){let a=t.SEM_OK;return e===t.SEM_POST&&o.tbsstr.push(i(r,s,n)),a},this.callbacks.clsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(n<=2?i.opcodes.push({type:t.TLS,string:[]}):i.opcodes.push({type:t.TBS,string:r.slice(s+1,s+n-1)})),o},this.callbacks.ci=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.ci=!0),o},this.callbacks.cs=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.cs=!0),o},this.callbacks.um=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.um=!0),o},this.callbacks.pm=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.pm=!0),o},this.callbacks.concatenation=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.topStack.alt.children.push(i.opcodes.length),i.topStack.cat={type:t.CAT,children:[]},i.opcodes.push(i.topStack.cat)):e===t.SEM_POST&&(i.topStack.cat=null),o},this.callbacks.defined=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.definedas="="),o},this.callbacks.dmax=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i)),a},this.callbacks.dmin=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=n(r,s,i)),a},this.callbacks.dstring=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&o.tbsstr.push(n(r,s,i)),a},this.callbacks.file=function(e,r,n,i,o){let a=t.SEM_OK;if(e===t.SEM_PRE)o.ruleNames=new s,o.udtNames=new s,o.rules=[],o.udts=[],o.rulesLineMap=[],o.opcodes=[],o.altStack=[],o.topStack=null,o.topRule=null;else if(e===t.SEM_POST){let e;
197o.rules.forEach(r=>{r.isBkr=!1,r.opcodes.forEach(r=>{r.type===t.RNM&&(-1===(e=o.ruleNames.get(r.index.name))?(o.errors.push({line:o.findLine(o.lines,r.index.phraseIndex,o.charsLength),char:r.index.phraseIndex,msg:`Rule name '${r.index.name}' used but not defined.`}),r.index=-1):r.index=e.index)})}),o.udts.forEach(e=>{e.isBkr=!1}),o.rules.forEach(r=>{r.opcodes.forEach(s=>{s.type===t.BKR&&(r.hasBkr=!0,-1!==(e=o.ruleNames.get(s.index.name))?(o.rules[e.index].isBkr=!0,s.index=e.index):-1!==(e=o.udtNames.get(s.index.name))?(o.udts[e.index].isBkr=!0,s.index=o.rules.length+e.index):(o.errors.push({line:o.findLine(o.lines,s.index.phraseIndex,o.charsLength),char:s.index.phraseIndex,msg:`Back reference name '${s.index.name}' refers to undefined rule or unamed UDT.`}),s.index=-1))})})}return a},this.callbacks.incalt=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&(i.definedas="=/"),o},this.callbacks.notop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.NOT}),o},this.callbacks.optionopen=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&i.opcodes.push({type:t.REP,min:0,max:1,char:s}),o},this.callbacks["rep-max"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i)),a},this.callbacks["rep-min"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.min=n(r,s,i)),a},this.callbacks["rep-min-max"]=function(e,r,s,i,o){let a=t.SEM_OK;return e===t.SEM_POST&&(o.max=n(r,s,i),o.min=o.max),a},this.callbacks.repetition=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&i.topStack.cat.children.push(i.opcodes.length),o},this.callbacks.repop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.min=0,i.max=1/0,i.topRep={type:t.REP,min:0,max:1/0},i.opcodes.push(i.topRep)):e===t.SEM_POST&&(i.min>i.max&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`repetition min cannot be greater than max: min: ${i.min}: max: ${i.max}`}),i.topRep.min=i.min,i.topRep.max=i.max),o},this.callbacks.rnmop=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_POST&&o.opcodes.push({type:t.RNM,index:{phraseIndex:n,name:e.utils.charsToString(s,n,i)}}),a},this.callbacks.rule=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&(i.altStack.length=0,i.topStack=null,i.rulesLineMap.push({line:i.findLine(i.lines,s,i.charsLength),char:s})),o},this.callbacks.rulelookup=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_PRE)i.ruleName="",i.definedas="";else if(e===t.SEM_POST){let e;"="===i.definedas?-1===(e=i.ruleNames.add(i.ruleName))?(i.definedas=null,i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`Rule name '${i.ruleName}' previously defined.`})):(i.topRule={name:e.name,lower:e.lower,opcodes:[],index:e.index},i.rules.push(i.topRule),i.opcodes=i.topRule.opcodes):-1===(e=i.ruleNames.get(i.ruleName))?(i.definedas=null,i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`Rule name '${i.ruleName}' for incremental alternate not previously defined.`})):(i.topRule=i.rules[e.index],i.opcodes=i.topRule.opcodes)}return o},this.callbacks.rulename=function(r,s,n,i,o){let a=t.SEM_OK;return r===t.SEM_PRE&&(o.ruleName=e.utils.charsToString(s,n,i)),a},this.callbacks.tbsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?i.tbsstr=[]:e===t.SEM_POST&&i.opcodes.push({type:t.TBS,string:i.tbsstr}),o},this.callbacks.tlscase=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_POST&&n>0&&(83===r[s+1]||115===r[s+1])&&(i.tlscase=!1),o},this.callbacks.tlsstring=function(e,r,s,n,i){let o=t.SEM_OK;if(e===t.SEM_POST){if(i.tlscase){let e=r.slice(s,s+n);for(let t=0;t<e.length;t+=1)e[t]>=65&&e[t]<=90&&(e[t]+=32);i.opcodes.push({type:t.TLS,string:e})}else i.opcodes.push({type:t.TBS,string:r.slice(s,s+n)})}return o},this.callbacks.tlsop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE&&(i.tlscase=!0),o},this.callbacks.trgop=function(e,r,s,n,i){let o=t.SEM_OK;return e===t.SEM_PRE?(i.min=0,i.max=0):e===t.SEM_POST&&(i.min>i.max&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${i.min}: max: ${i.max}`}),i.opcodes.push({type:t.TRG,min:i.min,max:i.max})),o},this.callbacks["udt-empty"]=function(r,s,n,i,o){let a=t.SEM_OK;if(r===t.SEM_POST){let r=e.utils.charsToString(s,n,i),a=o.udtNames.add(r);if(-1===a){if(-1===(a=o.udtNames.get(r)))throw Error("semUdtEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!0});o.opcodes.push({type:t.UDT,empty:!0,index:a.index})}return a},this.callbacks["udt-non-empty"]=function(r,s,n,i,o){let a=t.SEM_OK;if(r===t.SEM_POST){let r=e.utils.charsToString(s,n,i),a=o.udtNames.add(r);if(-1===a){if(-1===(a=o.udtNames.get(r)))throw Error("semUdtNonEmpty: name look up error")}else o.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!1});o.opcodes.push({type:t.UDT,empty:!1,index:a.index,syntax:null,semantic:null})}return a},this.callbacks.xmax=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&(i.max=o(r,s,n)),a},this.callbacks.xmin=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&(i.min=o(r,s,n)),a},this.callbacks.xstring=function(e,r,s,n,i){let a=t.SEM_OK;return e===t.SEM_POST&&i.tbsstr.push(o(r,s,n)),a}}},30654:function(e){e.exports=function(){let e="show-rules.js";return function(t=[],r=[],s="index"){let n;let i="showRules",o=[],a=[],l=[],c=[],h=t.length,p=r.length,u="RULE/UDT NAMES";if(!(Array.isArray(t)&&t.length))throw Error(`${e}:${i}: rules arg must be array with length > 0`);if(!Array.isArray(r))throw Error(`${e}:${i}: udts arg must be array`);for(n=0;n<h;n+=1)l.push(n);if((o=l.slice(0)).sort(function(e,r){return t[e].lower<t[r].lower?-1:t[e].lower>t[r].lower?1:0}),p){for(n=0;n<p;n+=1)c.push(n);(a=c.slice(0)).sort(function(e,t){return r[e].lower<r[t].lower?-1:r[e].lower>r[t].lower?1:0})}if(97===s.charCodeAt(0)){for(u+=" - alphabetical by rule/UDT name\n",n=0;n<h;n+=1)u+=`${n}: ${o[n]}: ${t[o[n]].name} 198`;if(p)for(n=0;n<p;n+=1)u+=`${n}: ${a[n]}: ${r[a[n]].name} 199`}else{for(u+=" - ordered by rule/UDT index\n",n=0;n<h;n+=1)u+=`${n}: ${t[n].name} 200`;if(p)for(n=0;n<p;n+=1)u+=`${n}: ${r[n].name} 201`}return u}}()},98336:function(e,t,r){e.exports=function(){let e;let t="syntax-callbacks.js: ",s=r(61153),n=s.ids;this.callbacks=[],this.callbacks.andop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"AND operator(&) foun
201d - strict ABNF specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.basicelementerr=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1===e.basicError&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Unrecognized SABNF element."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.clsOpen),char:e.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),e.clsOpen=null,e.basicError=!0;break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,e.clsOpen),char:e.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),e.clsOpen=null;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsopen=function(r,s,i){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e.clsOpen=i;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsstring=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==i.stringTabChar&&i.errors.push({line:i.findLine(i.lines,i.stringTabChar),char:i.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.definedaserror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Expected '=' or '=/'. Not found."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.file=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.altStack=[],i.repCount=0;break;case n.EMPTY:i.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case n.MATCH:0===i.ruleCount&&i.errors.push({line:0,char:0,msg:"no rules defined"});break;case n.NOMATCH:throw Error(`${t}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.groupOpen),char:e.groupOpen,msg:'Group "(...)" opened but not closed.'}),(e=o.altStack.pop()).groupError=!0;break;case n.MATCH:e=o.altStack.pop();break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupopen=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e={groupOpen:i,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(e);break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineenderror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Unrecognized grammar element or characters."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineend=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(1===e.phraseLength&&i.strict){let e=13===r[s]?"CR":"LF";i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:`Line end '${e}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.notop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.optionOpen),char:e.optionOpen,msg:'Option "[...]" opened but not closed.'}),(e=o.altStack.pop()).optionError=!0;break;case n.MATCH:e=o.altStack.pop();break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionopen=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e={groupOpen:null,groupError:!1,optionOpen:i,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(e);break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.prosValOpen),char:e.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),e.basicError=!0,e.prosValOpen=null;break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,e.prosValOpen),char:e.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),e.prosValOpen=null;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(r,s,i){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e.prosValOpen=i;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==i.stringTabChar&&i.errors.push({line:i.findLine(i.lines,i.stringTabChar),char:i.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.repetition=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:case n.MATCH:i.repCount+=1;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rule=function(r,s,i,o){switch(r.state){case n.ACTIVE:o.altStack.length=0,e={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},o.altStack.push(e);break;case n.EMPTY:throw Error(`${t}synRule: EMPTY: rule cannot be empty`);case n.NOMATCH:break;case n.MATCH:o.ruleCount+=1;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.stringTabChar=s;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(r,s,i,o){switch(r.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:o.errors.push({line:o.findLine(o.lines,e.tlsOpen),char:e.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),e.basicError=!0,e.tlsOpen=null;break;case n.MATCH:e.tlsOpen=null;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(r,s,i){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:e.tlsOpen=i;break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(e,r,s,i){switch(e.state){case n.ACTIVE:i.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==i.stringTabChar&&i.errors.push({line:i.findLine(i.lines,i.stringTabChar),char:i.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.udtop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;
201case n.MATCH:if(o.strict){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`UDT operator found(${t}) - strict ABNF specified.`})}break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Positive look-behind operator(&&) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Positive look-behind operator(&&) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bknop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Negative look-behind operator(!!) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Negative look-behind operator(!!) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(o.strict){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Back reference operator(${t}) found - strict ABNF specified.`})}else if(o.lite){let t=s.utils.charsToString(r,i,e.phraseLength);o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Back reference operator(${t}) found - apg-lite specified.`})}break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.abgop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Beginning of string anchor(%^) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"Beginning of string anchor(%^) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}},this.callbacks.aenop=function(e,r,s,i){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.strict?i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"End of string anchor(%$) found - strict ABNF specified."}):i.lite&&i.errors.push({line:i.findLine(i.lines,s,i.charsLength),char:s,msg:"End of string anchor(%$) found - apg-lite specified."});break;default:throw Error(`${t}synFile: unrecognized case.`)}}}},70402:function(e,t,r){let{Buffer:s}=r(15313),n=r(79288),i="UTF8",o="UTF16",a="UTF16BE",l="UTF16LE",c="UTF32",h="UTF32BE",p="UTF32LE",u="UINT7",d="ASCII",f="BINARY",g="UINT8",m="UINT16",b="UINT16LE",y="UINT16BE",T="UINT32",E="UINT32LE",x="UINT32BE",A="ESCAPED",k="STRING",C=function(e){e.type=i;let t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)},S=function(e){let t=e.data;switch(e.bom=0,e.type){case o:e.type=a,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=l,e.bom=2));break;case a:if(e.type=a,t.length>=2){if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw TypeError(`src type: "${a}" specified but BOM is for "${l}"`)}break;case l:if(e.type=l,t.length>=0){if(254===t[0]&&255===t[1])throw TypeError(`src type: "${l}" specified but BOM is for "${a}"`);255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}},M=function(e){let t=e.data;switch(e.bom=0,e.type){case c:e.type=h,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=p,e.bom=4));break;case h:if(e.type=h,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw TypeError(`src type: ${h} specified but BOM is for ${p}"`);break;case p:if(e.type=p,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw TypeError(`src type: "${p}" specified but BOM is for "${h}"`);255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}},w=function(e,t){let r=function(e){let t={type:"",base64:!1}
201,r=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return r&&(r[2]&&(t.type=r[2].toUpperCase()),r[1]&&(t.base64=!0)),t}(e.toUpperCase());if(r.base64){if(r.type===k)throw TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${k}`);if(s.isBuffer(t))r.data=n.base64.decode(t);else if("string"==typeof t){let e=s.from(t,"ascii");r.data=n.base64.decode(e)}else throw TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof t}`)}else r.data=t;switch(r.type){case i:C(r);break;case o:case a:case l:S(r);break;case c:case h:case p:M(r);break;case m:r.type=y;break;case T:r.type=x;break;case d:r.type=u;break;case f:r.type=g;break;case u:case g:case b:case y:case E:case x:case k:case A:break;default:throw TypeError(`type: "${e}" not recognized`)}if(r.type===k){if("string"!=typeof r.data)throw TypeError(`type: "${e}" but data is not a string`)}else if(!s.isBuffer(r.data))throw TypeError(`type: "${e}" but data is not a Buffer`);return r},$=function(e,t){if(!Array.isArray(t))throw TypeError(`dst chars: not array: "${typeof t}`);if("string"!=typeof e)throw TypeError(`dst type: not string: "${typeof e}`);let r=function(e){let t,r;let s={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(r=e,"CRLF:"===(t=e.slice(0,5))){s.crlf=!0,r=e.slice(5);break}"LF:"===(t=e.slice(0,3))&&(s.lf=!0,r=e.slice(3));break}return 1===(t=r.split(":")).length?s.type=t[0]:2===t.length&&"BASE64"===t[1]&&(s.base64=!0,s.type=t[0]),s}(e.toUpperCase());switch(r.type){case i:case a:case l:case h:case p:case u:case g:case b:case y:case E:case x:case A:break;case k:if(r.base64)throw TypeError(`":BASE64" suffix not allowed with type ${k}`);break;case d:r.type=u;break;case f:r.type=g;break;case o:r.type=a;break;case c:r.type=h;break;case m:r.type=y;break;case T:r.type=x;break;default:throw TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return r},O=function(e,t){switch(e){case i:return n.utf8.encode(t);case a:return n.utf16be.encode(t);case l:return n.utf16le.encode(t);case h:return n.utf32be.encode(t);case p:return n.utf32le.encode(t);case u:return n.uint7.encode(t);case g:return n.uint8.encode(t);case y:return n.uint16be.encode(t);case b:return n.uint16le.encode(t);case x:return n.uint32be.encode(t);case E:return n.uint32le.encode(t);case k:return n.string.encode(t);case A:return n.escaped.encode(t);default:throw TypeError(`encode type "${e}" not recognized`)}},L=function(e){switch(e.type){case i:return n.utf8.decode(e.data,e.bom);case l:return n.utf16le.decode(e.data,e.bom);case a:return n.utf16be.decode(e.data,e.bom);case h:return n.utf32be.decode(e.data,e.bom);case p:return n.utf32le.decode(e.data,e.bom);case u:return n.uint7.decode(e.data);case g:return n.uint8.decode(e.data);case y:return n.uint16be.decode(e.data);case b:return n.uint16le.decode(e.data);case x:return n.uint32be.decode(e.data);case E:return n.uint32le.decode(e.data);case k:return n.string.decode(e.data);case A:return n.escaped.decode(e.data);default:throw TypeError(`decode type "${e.type}" not recognized`)}};t.decode=function(e,t){return L(w(e,t))},t.encode=function(e,t){let r,s;let i=$(e,t);return i.crlf?(r=n.lineEnds.crlf(t),s=O(i.type,r)):i.lf?(r=n.lineEnds.lf(t),s=O(i.type,r)):s=O(i.type,t),i.base64&&(s=n.base64.encode(s)),s},t.convert=function(e,r,s){return t.encode(s,t.decode(e,r))}},79288:function(e,t,r){let{Buffer:s}=r(15313),n=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],i=[];
201"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(e=>{i.push(e.charCodeAt(0))}),t.utf8={encode(e){let t=[];return e.forEach(e=>{if(e>=0&&e<=127)t.push(e);else if(e<=2047)t.push(192+(e>>6&31)),t.push(128+(63&e));else if(e<55296||e>57343&&e<=65535)t.push(224+(e>>12&15)),t.push(128+(e>>6&63)),t.push(128+(63&e));else if(e>=65536&&e<=1114111){let r=e>>16&31;t.push(240+(r>>2)),t.push(128+((3&r)<<4)+(e>>12&15)),t.push(128+(e>>6&63)),t.push(128+(63&e))}else throw RangeError(`utf8.encode: character out of range: char: ${e}`)}),s.from(t)},decode(e,t){let r,s,n,i,o,a;let l=e.length,c=t?3:0,h=[];for(;c<l;){for(s=e[c],r=4294967295;;){if(s>=0&&s<=127){r=s,a=1;break}if((n=c+1)<l&&s>=194&&s<=223){r=function(e,t){if((192&t)!=128)return 4294967293;let r=((31&e)<<6)+(63&t);return r<128?4294967292:r}(s,e[n]),a=2;break}if((i=c+2)<l&&s>=224&&s<=239){r=function(e,t,r){if((192&r)!=128||(192&t)!=128)return 4294967293;let s=((15&e)<<12)+((63&t)<<6)+(63&r);return s<2048?4294967292:s>=55296&&s<=57343?4294967294:s}(s,e[n],e[i]),a=3;break}(o=c+3)<l&&s>=240&&s<=244&&(r=function(e,t,r,s){if((192&s)!=128||(192&r)!=128||(192&t)!=128)return 4294967293;let n=(((7&e)<<2)+(t>>4&3)<<16)+((15&t)<<12)+((63&r)<<6)+(63&s);return n<65536?4294967292:n>1114111?4294967294:n}(s,e[n],e[i],e[o]),a=4);break}if(r>1114111){let e=`byte[${c}]`;if(4294967295===r)throw RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(4294967293===r)throw RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(4294967294===r)throw RangeError(`utf8.decode: code point out of range found at: ${e}`);if(4294967292===r)throw RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw RangeError(`utf8.decode: unrecognized error found at: ${e}`)}h.push(r),c+=a}return h}},t.utf16be={encode(e){let t,r,n;let i=[];for(let s=0;s<e.length;s+=1)if((t=e[s])>=0&&t<=55295||t>=57344&&t<=65535)i.push(t>>8&255),i.push(255&t);else if(t>=65536&&t<=1114111)r=55296+((n=t-65536)>>10),n=56320+(1023&n),i.push(r>>8&255),i.push(255&r),i.push(n>>8&255),i.push(255&n);else throw RangeError(`utf16be.encode: UTF16BE value out of range: char[${s}]: ${t}`);return s.from(i)},decode(e,t){let r,s,n,i,o,a;if(e.length%2>0)throw RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${e.length}`);let l=[],c=e.length,h=t?2:0,p=0;for(;h<c;){for(;;){if((n=h+1)<c){if((o=(e[h]<<8)+e[n])<55296||o>57343){r=o,s=2;break}if((i=h+3)<c&&(a=(e[h+2]<<8)+e[i],o<=56319&&a>=56320&&a<=57343)){r=65536+(o-55296<<10)+(a-56320),s=4;break}}throw RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${h}]`)}l[p++]=r,h+=s}return l}},t.utf16le={encode(e){let t,r,n;let i=[];for(let s=0;s<e.length;s+=1)if((t=e[s])>=0&&t<=55295||t>=57344&&t<=65535)i.push(255&t),i.push(t>>8&255);else if(t>=65536&&t<=1114111)r=55296+((n=t-65536)>>10),n=56320+(1023&n),i.push(255&r),i.push(r>>8&255),i.push(255&n),i.push(n>>8&255);else throw RangeError(`utf16le.encode: UTF16LE value out of range: char[${s}]: ${t}`);return s.from(i)},decode(e,t){let r,s,n,i,o,a;if(e.length%2>0)throw RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${e.length}`);let l=[],c=e.length,h=t?2:0,p=0;for(;h<c;){for(;;){if((n=h+1)<c){if((o=(e[n]<<8)+e[h])<55296||o>57343){r=o,s=2;break}if((i=h+3)<c&&(a=(e[i]<<8)+e[h+2],o<=56319&&a>=56320&&a<=57343)){r=65536+(o-55296<<10)+(a-56320),s=4;break}}throw RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${h}]`)}l[p++]=r,h+=s}return l}},t.utf32be={encode(e){let t=s.alloc(4*e.length),r=0;return e.forEach(e=>{if(e>=55296&&e<=57343||e>1114111)throw RangeError(`utf32be.encode: UTF32BE character code out of range: char[${r/4}]: ${e}`);t[r++]=e>>24&255,t[r++]=e>>16&255,t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e,t){if(e.length%4>0)throw RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${e.length}`);let r=[],s=t?4:0;for(;s<e.length;s+=4){let t=(e[s]<<24)+(e[s+1]<<16)+(e[s+2]<<8)+e[s+3];if(t>=55296&&t<=57343||t>1114111)throw RangeError(`utf32be.decode: UTF32BE character code out of range: char[${s/4}]: ${t}`);r.push(t)}return r}},t.utf32le={encode(e){let t=s.alloc(4*e.length),r=0;
201return e.forEach(e=>{if(e>=55296&&e<=57343||e>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${e}`);t[r++]=255&e,t[r++]=e>>8&255,t[r++]=e>>16&255,t[r++]=e>>24&255}),t},decode(e,t){if(e.length%4>0)throw RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${e.length}`);let r=[],s=t?4:0;for(;s<e.length;s+=4){let t=(e[s+3]<<24)+(e[s+2]<<16)+(e[s+1]<<8)+e[s];if(t>=55296&&t<=57343||t>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${s/4}]: ${t}`);r.push(t)}return r}},t.uint7={encode(e){let t=s.alloc(e.length);for(let r=0;r<e.length;r+=1){if(e[r]>127)throw RangeError(`uint7.encode: UINT7 character code out of range: char[${r}]: ${e[r]}`);t[r]=e[r]}return t},decode(e){let t=[];for(let r=0;r<e.length;r+=1){if(e[r]>127)throw RangeError(`uint7.decode: UINT7 character code out of range: byte[${r}]: ${e[r]}`);t[r]=e[r]}return t}},t.uint8={encode(e){let t=s.alloc(e.length);for(let r=0;r<e.length;r+=1){if(e[r]>255)throw RangeError(`uint8.encode: UINT8 character code out of range: char[${r}]: ${e[r]}`);t[r]=e[r]}return t},decode(e){let t=[];for(let r=0;r<e.length;r+=1)t[r]=e[r];return t}},t.uint16be={encode(e){let t=s.alloc(2*e.length),r=0;return e.forEach(e=>{if(e>65535)throw RangeError(`uint16be.encode: UINT16BE character code out of range: char[${r/2}]: ${e}`);t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e){if(e.length%2>0)throw RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${e.length}`);let t=[];for(let r=0;r<e.length;r+=2)t.push((e[r]<<8)+e[r+1]);return t}},t.uint16le={encode(e){let t=s.alloc(2*e.length),r=0;return e.forEach(e=>{if(e>65535)throw RangeError(`uint16le.encode: UINT16LE character code out of range: char[${r/2}]: ${e}`);t[r++]=255&e,t[r++]=e>>8&255}),t},decode(e){if(e.length%2>0)throw RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${e.length}`);let t=[];for(let r=0;r<e.length;r+=2)t.push((e[r+1]<<8)+e[r]);return t}},t.uint32be={encode(e){let t=s.alloc(4*e.length),r=0;return e.forEach(e=>{t[r++]=e>>24&255,t[r++]=e>>16&255,t[r++]=e>>8&255,t[r++]=255&e}),t},decode(e){if(e.length%4>0)throw RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${e.length}`);let t=[];for(let r=0;r<e.length;r+=4)t.push((e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3]);return t}},t.uint32le={encode(e){let t=s.alloc(4*e.length),r=0;return e.forEach(e=>{t[r++]=255&e,t[r++]=e>>8&255,t[r++]=e>>16&255,t[r++]=e>>24&255}),t},decode(e){if(e.length%4>0)throw RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${e.length}`);let t=[];for(let r=0;r<e.length;r+=4)t.push((e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r]);return t}},t.string={encode:e=>t.utf16le.encode(e).toString("utf16le"),decode:e=>t.utf16le.decode(s.from(e,"utf16le"),0)},t.escaped={encode(e){let t=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(96===i)t.push(i),t.push(i);else if(10===i)t.push(i);else if(i>=32&&i<=126)t.push(i);else{let e="";if(i>=0&&i<=31)e+=`\`x${n[i]}`;else if(i>=127&&i<=255)e+=`\`x${n[i]}`;else if(i>=256&&i<=65535)e+=`\`u${n[i>>8&255]}${n[255&i]}`;else if(i>=65536&&i<=4294967295){e+="`u{";let t=i>>24&255;t>0&&(e+=n[t]),e+=`${n[i>>16&255]+n[i>>8&255]+n[255&i]}}`}else throw Error("escape.encode(char): char > 0xffffffff not allowed");s.from(e).forEach(e=>{t.push(e)})}}return s.from(t)},decode(e){let t,r,s;function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}let i=[],o=e.length,a=0;for(;a<o;){for(;;){if(s=!0,96!==e[a]){i.push(e[a]),a+=1,s=!1;break}if((t=a+1)>=o)break;if(96===e[t]){i.push(96),a+=2,s=!1;break}if(120===e[t]){if((r=function(e,t,r){let s={char:null,nexti:e+2,error:!0};if(e+1<t&&n(r[e])&&n(r[e+1])){let t=String.fromCodePoint(r[e],r[e+1]);s.char=parseInt(t,16),Number.isNaN(s.char)||(s.error=!1)}return s}(t+1,o,e)).error)break;
201i.push(r.char),a=r.nexti,s=!1;break}if(117===e[t]){if(123===e[t+1]){if((r=function(e,t,r){let s={char:null,nexti:e+4,error:!0},i="";for(;e<t&&n(r[e]);)i+=String.fromCodePoint(r[e]),e+=1;return s.char=parseInt(i,16),125!==r[e]||Number.isNaN(s.char)||(s.error=!1),s.nexti=e+1,s}(t+2,o,e)).error)break;i.push(r.char),a=r.nexti,s=!1;break}if((r=function(e,t,r){let s={char:null,nexti:e+4,error:!0};if(e+3<t&&n(r[e])&&n(r[e+1])&&n(r[e+2])&&n(r[e+3])){let t=String.fromCodePoint(r[e],r[e+1],r[e+2],r[e+3]);s.char=parseInt(t,16),Number.isNaN(s.char)||(s.error=!1)}return s}(t+1,o,e)).error)break;i.push(r.char),a=r.nexti,s=!1}break}if(s)throw Error(`escaped.decode: ill-formed escape sequence at buf[${a}]`)}return i}},t.lineEnds={crlf(e){let t=[],r=0;for(;r<e.length;)switch(e[r]){case 13:r+1<e.length&&10===e[r+1]?r+=2:r+=1,t.push(13),t.push(10);break;case 10:t.push(13),t.push(10),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&10!==t[t.length-1]&&(t.push(13),t.push(10)),t},lf(e){let t=[],r=0;for(;r<e.length;)switch(e[r]){case 13:r+1<e.length&&10===e[r+1]?r+=2:r+=1,t.push(10);break;case 10:t.push(10),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&10!==t[t.length-1]&&t.push(10),t}},t.base64={encode(e){let t,r,n;if(0===e.length)return s.alloc(0);let o=e.length%3;o=o>0?3-o:0;let a=(e.length+o)/3,l=s.alloc(4*a);o>0&&(a-=1),t=0,r=0;for(let s=0;s<a;s+=1)n=(e[t++]<<16)+(e[t++]<<8)+e[t++],l[r++]=i[n>>18&63],l[r++]=i[n>>12&63],l[r++]=i[n>>6&63],l[r++]=i[63&n];return 0===o?l:1===o?(n=(e[t++]<<16)+(e[t]<<8),l[r++]=i[n>>18&63],l[r++]=i[n>>12&63],l[r++]=i[n>>6&63],l[r]=i[64],l):2===o?(n=e[t]<<16,l[r++]=i[n>>18&63],l[r++]=i[n>>12&63],l[r++]=i[64],l[r]=i[64],l):void 0},decode(e){let t,r,n;if(0===e.length)return s.alloc(0);let i=function(e){let t=[],r=0;for(let s=0;s<e.length;s+=1){let n=e[s];for(;32!==n&&9!==n&&10!==n&&13!==n;){if(n>=65&&n<=90){t.push(n-65);break}if(n>=97&&n<=122){t.push(n-71);break}if(n>=48&&n<=57){t.push(n+4);break}if(43===n){t.push(62);break}if(47===n){t.push(63);break}if(61===n){t.push(64),r+=1;break}throw RangeError(`base64.decode: invalid character buf[${s}]: ${n}`)}}if(t.length%4>0)throw RangeError(`base64.decode: string length not integral multiple of 4: ${t.length}`);switch(r){case 0:break;case 1:if(64!==t[t.length-1])throw RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==t[t.length-1]||64!==t[t.length-2])throw RangeError("base64.decode: two tail characters found: not last characters");break;default:throw RangeError(`base64.decode: more than two tail characters found: ${r}`)}return{tail:r,buf:s.from(t)}}(e),{tail:o}=i,a=i.buf,l=a.length/4,c=s.alloc(3*l-o);o>0&&(l-=1),r=0,t=0;for(let e=0;e<l;e+=1)n=(a[t++]<<18)+(a[t++]<<12)+(a[t++]<<6)+a[t++],c[r++]=n>>16&255,c[r++]=n>>8&255,c[r++]=255&n;return 1===o&&(n=(a[t++]<<18)+(a[t++]<<12)+(a[t]<<6),c[r++]=n>>16&255,c[r]=n>>8&255),2===o&&(n=(a[t++]<<18)+(a[t++]<<12),c[r]=n>>16&255),c},toString(e){if(e.length%4>0)throw RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",r=0;for(let n=0;n<e.length;n+=4){for(let t=n;t<n+4;t+=1){var s;if(!((s=e[t])>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||43===s||47===s||61===s))throw RangeError(`base64.toString: buf[${t}]: ${e[t]} : not valid base64 character code`)}!function(e,s,n,i){switch(r){case 76:t+=`\r 202${e}${s}${n}${i}`,r=4;break;case 75:t+=`${e}\r 203${s}${n}${i}`,r=3;break;case 74:t+=`${e+s}\r 204${n}${i}`,r=2;break;case 73:t+=`${e+s+n}\r 205${i}`,r=1;break;default:t+=e+s+n+i,r+=4}}(String.fromCharCode(e[n]),String.fromCharCode(e[n+1]),String.fromCharCode(e[n+2]),String.fromCharCode(e[n+3]))}return t}}},49890:function(e,t,r){e.exports=function(){let e=r(20621),t=r(42109),s=this,n=null,i=null,o=null,a=0,l=[],c=[],h=[],p=[];function u(e){let t="";for(let r=0;r<e;r+=1)t+=" ";return t}this.callbacks=[],this.astObject="astObject",this.init=function(e,t,r){let u;h.length=0,p.length=0,l.length=0,a=0,n=e,i=t,o=r;let d=[];for(u=0;u<n.length;u+=1)d.push(n[u].lower);for(u=0;u<i.length;u+=1)d.push(i[u].lower);for(u=0,a=n.length+i.length;u<a;u+=1)l[u]=!1,c[u]=null;for(let e in s.callbacks){let t=e.toLowerCase();
205if((u=d.indexOf(t))<0)throw Error(`ast.js: init: node '${e}' not a rule or udt name`);"function"==typeof s.callbacks[e]&&(l[u]=!0,c[u]=s.callbacks[e]),!0===s.callbacks[e]&&(l[u]=!0)}},this.ruleDefined=function(e){return!1!==l[e]},this.udtDefined=function(e){return!1!==l[n.length+e]},this.down=function(t,r){let s=p.length;return h.push(s),p.push({name:r,thisIndex:s,thatIndex:null,state:e.SEM_PRE,callbackIndex:t,phraseIndex:null,phraseLength:null,stack:h.length}),s},this.up=function(t,r,s,n){let i=p.length,o=h.pop();return p.push({name:r,thisIndex:i,thatIndex:o,state:e.SEM_POST,callbackIndex:t,phraseIndex:s,phraseLength:n,stack:h.length}),p[o].thatIndex=i,p[o].phraseIndex=s,p[o].phraseLength=n,i},this.translate=function(t){let r,s;for(let n=0;n<p.length;n+=1)r=c[(s=p[n]).callbackIndex],s.state===e.SEM_PRE?null!==r&&r(e.SEM_PRE,o,s.phraseIndex,s.phraseLength,t)===e.SEM_SKIP&&(n=s.thatIndex):null!==r&&r(e.SEM_POST,o,s.phraseIndex,s.phraseLength,t)},this.setLength=function(e){p.length=e,e>0?h.length=p[e-1].stack:h.length=0},this.getLength=function(){return p.length},this.toXml=function(r){let s=t.charsToDec,n="decimal integer character codes";if("string"==typeof r&&r.length>=3){let e=r.slice(0,3).toLowerCase();"asc"===e?(s=t.charsToAscii,n="ASCII for printing characters, hex for non-printing"):"hex"===e?(s=t.charsToHex,n="hexadecimal integer character codes"):"uni"===e&&(s=t.charsToUnicode,n="Unicode UTF-32 integer character codes")}let i="",a=0;return i+=`<?xml version="1.0" encoding="utf-8"?> 206<root nodes="${p.length/2}" characters="${o.length}"> 207<!-- input string, ${n} --> 208`+u(a+2)+s(o)+"\n",p.forEach(t=>{t.state===e.SEM_PRE?(a+=1,i+=u(a)+`<node name="${t.name}" index="${t.phraseIndex}" length="${t.phraseLength}"> 209`+u(a+2)+s(o,t.phraseIndex,t.phraseLength)+"\n"):(i+=u(a)+`</node><!-- name="${t.name}" --> 210`,a-=1)}),i+="</root>\n"},this.phrases=function(){let t,r;let s={};for(t=0;t<p.length;t+=1)(r=p[t]).state===e.SEM_PRE&&(Array.isArray(s[r.name])||(s[r.name]=[]),s[r.name].push({index:r.phraseIndex,length:r.phraseLength}));return s}}},17934:function(e){e.exports=function(){let e=-1,t=0;this.init=function(r){if("number"!=typeof r||r<=0)throw Error("circular-buffer.js: init: circular buffer size must an integer > 0");t=Math.ceil(r),e=-1},this.increment=function(){return((e+=1)+t)%t},this.maxSize=function(){return t},this.items=function(){return e+1},this.getListIndex=function(r){return -1===e||r<0||r>e||e-r>=t?-1:(r+t)%t},this.forEach=function(r){if(-1!==e){if(e<t){for(let t=0;t<=e;t+=1)r(t,t);return}for(let s=e-t+1;s<=e;s+=1)r((s+t)%t,s)}}}},47394:function(e){e.exports=function(){return"/* This file automatically generated by jsonToless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: 0.6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}
210\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},20621:function(e){e.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}},61153:function(e,t,r){e.exports={ast:r(49890),circular:r(17934),ids:r(20621),parser:r(12059),stats:r(77960),trace:r(95718),utils:r(42109),emitcss:r(47394),style:r(6596)}},12059:function(e,t,r){e.exports=function(){let e,t,s,n,i;let o=r(20621),a=r(42109),l="parser.js: ",c=this;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let h=null,p=null,u=0,d=0,f=0,g=null,m=null,b=null,y=null,T=null,E=0,x=1/0,A=1/0,k=function(t,r,s){let i=`${l}evaluateRule(): `;if(t>=b.length)throw Error(`${i}rule index: ${t} out of range`);if(r>=n)throw Error(`${i}phrase index: ${r} out of range`);let{length:a}=h;h.push({type:o.RNM,index:t}),e(a,r,s),h.pop()},C=function(t,r,s){let i=`${l}evaluateUdt(): `;if(t>=y.length)throw Error(`${i}udt index: ${t} out of range`);if(r>=n)throw Error(`${i}phrase index: ${r} out of range`);let{length:a}=h;h.push({type:o.UDT,empty:y[t].empty,index:t}),e(a,r,s),h.pop()},S=function(){u=0,d=0,f=0,E=0,i=[{lookAround:o.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],b=null,y=null,p=null,t=0,s=0,n=0,g=null,m=null,T=null,h=null},M=function(){let e=[],t=function(){let t=e[e.length-1],r={};for(let e in t)r[e]=t[e];return r};this.push=function(){e.push(t())},this.pop=function(t){let r=t;if(r||(r=e.length-1),r<1||r>e.length)throw Error(`${l}backRef.pop(): bad length: ${r}`);return e.length=r,e[e.length-1]},this.length=function(){return e.length},this.savePhrase=function(t,r,s){e[e.length-1][t]={phraseIndex:r,phraseLength:s}},this.getPhrase=function(t){return e[e.length-1][t]},function(){let t={};b.forEach(e=>{e.isBkr&&(t[e.lower]=null)}),y.length>0&&y.forEach(e=>{e.isBkr&&(t[e.lower]=null)}),e.push(t)}()},w=function(){let e=this;this.state=o.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=i[i.length-1],this.uFrame=new M,this.pFrame=new M,this.evaluateRule=k,this.evaluateUdt=C,this.refresh=function(){e.state=o.ACTIVE,e.phraseLength=0,e.lookAround=i[i.length-1]}},$=function(){return i[i.length-1]},O=function(){return i.length>1},L=function(){let e=`${l}initializeAst(): `;for(;;){if(void 0===c.ast){c.ast=null;break}if(null===c.ast)break;if("astObject"!==c.ast.astObject)throw Error(`${e}ast object not recognized`);break}null!==c.ast&&c.ast.init(b,y,p)},N=function(){let e=`${l}initializeTrace(): `;for(;;){if(void 0===c.trace){c.trace=null;break}if(null===c.trace)break;if("traceObject"!==c.trace.traceObject)throw Error(`${e}trace object not recognized`);break}null!==c.trace&&c.trace.init(b,y,p)},R=function(){let e=`${l}initializeStats(): `;for(;;){if(void 0===c.stats){c.stats=null;break}if(null===c.stats)break;if("statsObject"!==c.stats.statsObject)throw Error(`${e}stats object not recognized`);break}null!==c.stats&&c.stats.init(b,y)},B=function(e){let t=`${l}initializeGrammar(): `;if(!e)throw Error(`${t}grammar object undefined`);if("grammarObject"!==e.grammarObject)throw Error(`${t}bad grammar object`);b=e.rules,y=e.udts},_=function(e){let t=`${l}initializeStartRule(): `,r=null;if("number"==typeof e){if(e>=b.length)throw Error(`${t}start rule index too large: max: ${b.length}: index: ${e}`);r=e}else if("string"==typeof e){let s=e.toLowerCase();for(let e=0;e<b.length;e+=1)if(s===b[e].lower){r=b[e].index;break}if(null===r)throw Error(`${t}start rule name '${e}' not recognized`)}else throw Error(`${t}type of start rule '${typeof e}' not recognized`);return r},I=function(e,r,i){let o=`${l}initializeInputChars(): `,c=e,h=r,u=i;if(void 0===c)throw Error(`${o}input string is undefined`);if(null===c)throw Error(`${o}input string is null`);if("string"==typeof c)c=a.stringToChars(c);else if(!Array.isArray(c))throw Error(`${o}input string is not a string or array`);if(c.length>0&&"number"!=typeof c[0])throw Error(`${o}input string not an array of integers`);if("number"!=typeof h)h=0;else if((h=Math.floor(h))<0||h>c.length)throw Error(`${o}input beginning index out of range: ${h}`);
210if("number"!=typeof u)u=c.length-h;else if((u=Math.floor(u))<0||u>c.length-h)throw Error(`${o}input length out of range: ${u}`);p=c,n=(t=h)+(s=u)},D=function(){let e,t;let r=`${l}initializeCallbacks(): `;for(e=0,g=[],m=[];e<b.length;e+=1)g[e]=null;for(e=0;e<y.length;e+=1)m[e]=null;let s=[];for(e=0;e<b.length;e+=1)s.push(b[e].lower);for(e=0;e<y.length;e+=1)s.push(y[e].lower);for(let n in c.callbacks){if((e=s.indexOf(n.toLowerCase()))<0)throw Error(`${r}syntax callback '${n}' not a rule or udt name`);if((t=c.callbacks[n])||(t=null),"function"==typeof t||null===t)e<b.length?g[e]=t:m[e-b.length]=t;else throw Error(`${r}syntax callback[${n}] must be function reference or 'false' (false/null/undefined/etc.)`)}for(e=0;e<y.length;e+=1)if(null===m[e])throw Error(`${r}all UDT callbacks must be defined. UDT callback[${y[e].lower}] not a function reference`)};this.setMaxTreeDepth=function(e){if("number"!=typeof e||(x=Math.floor(e))<=0)throw Error(`parser: max tree depth must be integer > 0: ${e}`)},this.setMaxNodeHits=function(e){if("number"!=typeof e||(A=Math.floor(e))<=0)throw Error(`parser: max node hits must be integer > 0: ${e}`)};let P=function(r,i,a){let c;let u=`${l}parse(): `;B(r);let g=_(i);D(),N(),R(),L();let m=new w;switch(null!=a&&(T=a),h=[{type:o.RNM,index:g}],e(0,t,m),h=null,m.state){case o.ACTIVE:throw Error(`${u}final state should never be 'ACTIVE'`);case o.NOMATCH:c=!1;break;case o.EMPTY:case o.MATCH:c=m.phraseLength===s;break;default:throw Error("unrecognized state")}return{success:c,state:m.state,length:s,matched:m.phraseLength,maxMatched:E,maxTreeDepth:d,nodeHits:f,inputLength:p.length,subBegin:t,subEnd:n,subLength:s}};this.parseSubstring=function(e,t,r,s,n,i){return S(),I(r,s,n),P(e,t,i)},this.parse=function(e,t,r,s){return S(),I(r,0,r.length),P(e,t,s)};let H=function(t,r,s){let n=h[t];for(let t=0;t<n.children.length&&(e(n.children[t],r,s),s.state===o.NOMATCH);t+=1);},v=function(t,r,s){let n,i,a,l;let p=h[t],u=s.uFrame.length(),d=s.pFrame.length();c.ast&&(i=c.ast.getLength()),n=!0,a=r,l=0;for(let t=0;t<p.children.length;t+=1){if(e(p.children[t],a,s),s.state===o.NOMATCH){n=!1;break}a+=s.phraseLength,l+=s.phraseLength}n?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(u),s.pFrame.pop(d),c.ast&&c.ast.setLength(i))},F=function(t,r,s){let i,a,l,p;let u=h[t];if(0===u.max){s.state=o.EMPTY,s.phraseLength=0;return}a=r,l=0,p=0;let d=s.uFrame.length(),f=s.pFrame.length();for(c.ast&&(i=c.ast.getLength());!(a>=n)&&(e(t+1,a,s),s.state!==o.NOMATCH&&s.state!==o.EMPTY&&(p+=1,l+=s.phraseLength,a+=s.phraseLength,p!==u.max)););s.state===o.EMPTY?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):p>=u.min?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(d),s.pFrame.pop(f),c.ast&&c.ast.setLength(i))},K=function(e,t,r,s){if(t.phraseLength>r){let s=`${l}opRNM(${e.name}): callback function error: `;throw Error(s+=`sysData.phraseLength: ${t.phraseLength} must be <= remaining chars: ${r}`)}switch(t.state){case o.ACTIVE:if(!0!==s)throw Error(`${l}opRNM(${e.name}): callback function return error. ACTIVE state not allowed.`);break;case o.EMPTY:t.phraseLength=0;break;case o.MATCH:0===t.phraseLength&&(t.state=o.EMPTY);break;case o.NOMATCH:t.phraseLength=0;break;default:throw Error(`${l}opRNM(${e.name}): callback function return error. Unrecognized return state: ${t.state}`)}},U=function(t,r,s){let i,a,l,u,d,f;let m=h[t],y=b[m.index],E=g[y.index],x=!O();if(x&&((a=c.ast&&c.ast.ruleDefined(m.index))&&(i=c.ast.getLength(),c.ast.down(m.index,b[m.index].name)),u=s.uFrame.length(),d=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),f=s.pFrame,s.pFrame=new M),null===E)l=h,h=y.opcodes,e(0,r,s),h=l;else{let t=n-r;s.ruleIndex=y.index,E(s,p,r,T),K(y,s,t,!0),s.state===o.ACTIVE&&(l=h,h=y.opcodes,e(0,r,s),h=l,s.ruleIndex=y.index,E(s,p,r,T),K(y,s,t,!1))}x&&(a&&(s.state===o.NOMATCH?c.ast.setLength(i):c.ast.up(m.index,y.name,r,s.phraseLength)),s.pFrame=f,s.state===o.NOMATCH?(s.uFrame.pop(u),s.pFrame.pop(d)):y.isBkr&&(s.pFrame.savePhrase(y.lower,r,s.phraseLength),s.uFrame.savePhrase(y.lower,r,s.phraseLength)))},G=function(e,t,r){if(t.phraseLength>r){let s=`${l}opUDT(${e.name}): callback function error: `;throw Error(s+=`sysData.phraseLength: ${t.phraseLength} must be <= remaining chars: ${r}`)}switch(t.state){case o.ACTIVE:throw Error(`${l}opUDT(${e.name}): callback function return error. ACTIVE state not allowed.`);case o.EMPTY:if(!1===e.empty)throw Error(`${l}opUDT(${e.name}): callback function return error. May not return EMPTY.`);t.phraseLength=0;break;case o.MATCH:if(0===t.phraseLength){if(!1===e.empty)throw Error(`${l}opUDT(${e.name}): callback function return error. May not return EMPTY.`);
210t.state=o.EMPTY}break;case o.NOMATCH:t.phraseLength=0;break;default:throw Error(`${l}opUDT(${e.name}): callback function return error. Unrecognized return state: ${t.state}`)}},Y=function(e,t,r){let s,i,a,l,u,d;let f=h[e],g=y[f.index];r.UdtIndex=g.index;let E=!O();E&&((a=c.ast&&c.ast.udtDefined(f.index))&&(i=b.length+f.index,s=c.ast.getLength(),c.ast.down(i,g.name)),l=r.uFrame.length(),u=r.pFrame.length(),r.uFrame.push(),r.pFrame.push(),d=r.pFrame,r.pFrame=new M);let x=n-t;m[f.index](r,p,t,T),G(g,r,x),E&&(a&&(r.state===o.NOMATCH?c.ast.setLength(s):c.ast.up(i,g.name,t,r.phraseLength)),r.pFrame=d,r.state===o.NOMATCH?(r.uFrame.pop(l),r.pFrame.pop(u)):g.isBkr&&(r.pFrame.savePhrase(g.lower,t,r.phraseLength),r.uFrame.savePhrase(g.lower,t,r.phraseLength)))},z=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=p.length,s=p.length-t,e(r+1,a,l);let c=i.pop();switch(n=c.charsEnd,s=c.charsLength,l.phraseLength=0,l.state){case o.EMPTY:case o.MATCH:l.state=o.EMPTY;break;case o.NOMATCH:l.state=o.NOMATCH;break;default:throw Error(`opAND: invalid state ${l.state}`)}},V=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=p.length,s=p.length-t,e(r+1,a,l);let c=i.pop();switch(n=c.charsEnd,s=c.charsLength,l.phraseLength=0,l.state){case o.EMPTY:case o.MATCH:l.state=o.NOMATCH;break;case o.NOMATCH:l.state=o.EMPTY;break;default:throw Error(`opNOT: invalid state ${l.state}`)}},j=function(e,t,r){let s=h[e];r.state=o.NOMATCH,t<n&&s.min<=p[t]&&p[t]<=s.max&&(r.state=o.MATCH,r.phraseLength=1)},q=function(e,t,r){let s;let i=h[e],a=i.string.length;if(r.state=o.NOMATCH,t+a<=n){for(s=0;s<a;s+=1)if(p[t+s]!==i.string[s])return;r.state=o.MATCH,r.phraseLength=a}},X=function(e,t,r){let s,i;let a=h[e];r.state=o.NOMATCH;let l=a.string.length;if(0===l){r.state=o.EMPTY;return}if(t+l<=n){for(s=0;s<l;s+=1)if((i=p[t+s])>=65&&i<=90&&(i+=32),i!==a.string[s])return;r.state=o.MATCH,r.phraseLength=l}},W=function(e,t,r){r.state=o.NOMATCH,r.phraseLength=0,r.state=0===t?o.EMPTY:o.NOMATCH},Z=function(e,t,r){r.state=o.NOMATCH,r.phraseLength=0,r.state=t===p.length?o.EMPTY:o.NOMATCH},J=function(e,t,r){let s,i,a,l;let c=h[e];r.state=o.NOMATCH,l=c.index<b.length?b[c.index].lower:y[c.index-b.length].lower;let u=c.bkrMode===o.BKR_MODE_PM?r.pFrame.getPhrase(l):r.uFrame.getPhrase(l),d=c.bkrCase===o.BKR_MODE_CI;if(null===u)return;let f=u.phraseIndex,g=u.phraseLength;if(0===g){r.state=o.EMPTY;return}if(t+g<=n){if(d){for(s=0;s<g;s+=1)if(i=p[t+s],a=p[f+s],i>=65&&i<=90&&(i+=32),a>=65&&a<=90&&(a+=32),i!==a)return;r.state=o.MATCH,r.phraseLength=g}else for(s=0;s<g;s+=1)if((i=p[t+s])!==(a=p[f+s]))return;r.state=o.MATCH,r.phraseLength=g}},Q=function(t,r,s){switch(i.push({lookAround:o.LOOKAROUND_BEHIND,anchor:r}),e(t+1,r,s),i.pop(),s.phraseLength=0,s.state){case o.EMPTY:case o.MATCH:s.state=o.EMPTY;break;case o.NOMATCH:s.state=o.NOMATCH;break;default:throw Error(`opBKA: invalid state ${s.state}`)}},ee=function(t,r,s){switch(i.push({lookAround:o.LOOKAROUND_BEHIND,anchor:r}),e(t+1,r,s),i.pop(),s.phraseLength=0,s.state){case o.EMPTY:case o.MATCH:s.state=o.NOMATCH;break;case o.NOMATCH:s.state=o.EMPTY;break;default:throw Error(`opBKN: invalid state ${s.state}`)}},et=function(t,r,s){let n,i,a,l;let p=h[t],u=s.uFrame.length(),d=s.pFrame.length();c.ast&&(i=c.ast.getLength()),n=!0,a=r,l=0;for(let t=p.children.length-1;t>=0;t-=1)if(e(p.children[t],a,s),a-=s.phraseLength,l+=s.phraseLength,s.state===o.NOMATCH){n=!1;break}n?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(u),s.pFrame.pop(d),c.ast&&c.ast.setLength(i))},er=function(t,r,s){let n,i,a,l;let p=h[t];i=r,a=0,l=0;let u=s.uFrame.length(),d=s.pFrame.length();for(c.ast&&(n=c.ast.getLength());!(i<=0)&&(e(t+1,i,s),s.state!==o.NOMATCH&&s.state!==o.EMPTY&&(l+=1,a+=s.phraseLength,i-=s.phraseLength,l!==p.max)););s.state===o.EMPTY?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):l>=p.min?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(u),s.pFrame.pop(d),c.ast&&c.ast.setLength(n))},es=function(e,t,r){let s=h[e];if(r.state=o.NOMATCH,r.phraseLength=0,t>0){let e=p[t-1];s.min<=e&&e<=s.max&&(r.state=o.MATCH,r.phraseLength=1)}},en=function(e,t,r){let s;let n=h[e];r.state=o.NOMATCH;let i=n.string.length,a=t-i;if(a>=0){for(s=0;s<i;s+=1)if(p[a+s]!==n.string[s])return;r.state=o.MATCH,r.phraseLength=i}},ei=function(e,t,r){let s;let n=h[e];r.state=o.NOMATCH;let i=n.string.length;
210if(0===i){r.state=o.EMPTY;return}let a=t-i;if(a>=0){for(let e=0;e<i;e+=1)if((s=p[a+e])>=65&&s<=90&&(s+=32),s!==n.string[e])return;r.state=o.MATCH,r.phraseLength=i}},eo=function(e,t,r){let s,n,i,a;let l=h[e];r.state=o.NOMATCH,r.phraseLength=0,a=l.index<b.length?b[l.index].lower:y[l.index-b.length].lower;let c=l.bkrMode===o.BKR_MODE_PM?r.pFrame.getPhrase(a):r.uFrame.getPhrase(a),u=l.bkrCase===o.BKR_MODE_CI;if(null===c)return;let d=c.phraseIndex,f=c.phraseLength;if(0===f){r.state=o.EMPTY,r.phraseLength=0;return}let g=t-f;if(g>=0){if(u){for(s=0;s<f;s+=1)if(n=p[g+s],i=p[d+s],n>=65&&n<=90&&(n+=32),i>=65&&i<=90&&(i+=32),n!==i)return;r.state=o.MATCH,r.phraseLength=f}else for(s=0;s<f;s+=1)if((n=p[g+s])!==(i=p[d+s]))return;r.state=o.MATCH,r.phraseLength=f}};e=function(e,t,r){let s=!0,n=h[e];if((f+=1)>A)throw Error(`parser: maximum number of node hits exceeded: ${A}`);if((u+=1)>d&&(d=u)>x)throw Error(`parser: maximum parse tree depth exceeded: ${x}`);if(r.refresh(),null!==c.trace){let e=$();c.trace.down(n,r.state,t,r.phraseLength,e.anchor,e.lookAround)}if(i[i.length-1].lookAround===o.LOOKAROUND_BEHIND)switch(n.type){case o.ALT:H(e,t,r);break;case o.CAT:et(e,t,r);break;case o.REP:er(e,t,r);break;case o.RNM:U(e,t,r);break;case o.UDT:Y(e,t,r);break;case o.AND:z(e,t,r);break;case o.NOT:V(e,t,r);break;case o.TRG:es(e,t,r);break;case o.TBS:en(e,t,r);break;case o.TLS:ei(e,t,r);break;case o.BKR:eo(e,t,r);break;case o.BKA:Q(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:W(e,t,r);break;case o.AEN:Z(e,t,r);break;default:s=!1}else switch(n.type){case o.ALT:H(e,t,r);break;case o.CAT:v(e,t,r);break;case o.REP:F(e,t,r);break;case o.RNM:U(e,t,r);break;case o.UDT:Y(e,t,r);break;case o.AND:z(e,t,r);break;case o.NOT:V(e,t,r);break;case o.TRG:j(e,t,r);break;case o.TBS:q(e,t,r);break;case o.TLS:X(e,t,r);break;case o.BKR:J(e,t,r);break;case o.BKA:Q(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:W(e,t,r);break;case o.AEN:Z(e,t,r);break;default:s=!1}if(!O()&&t+r.phraseLength>E&&(E=t+r.phraseLength),null!==c.stats&&c.stats.collect(n,r),null!==c.trace){let e=$();c.trace.up(n,r.state,t,r.phraseLength,e.anchor,e.lookAround)}return u-=1,s}}},77960:function(e,t,r){e.exports=function(){let e;let t=r(20621),s=r(42109),n=r(6596),i=[],o=[],a=[],l=[],c=[];this.statsObject="statsObject";let h=function(e,t){return e.lower<t.lower?-1:e.lower>t.lower?1:0},p=function(e,t){return e.total<t.total?1:e.total>t.total?-1:h(e,t)},u=function(e,t){return e.index<t.index?-1:e.index>t.index?1:0},d=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},f=function(){a.length=0,e=new d,a[t.ALT]=new d,a[t.CAT]=new d,a[t.REP]=new d,a[t.RNM]=new d,a[t.TRG]=new d,a[t.TBS]=new d,a[t.TLS]=new d,a[t.UDT]=new d,a[t.AND]=new d,a[t.NOT]=new d,a[t.BKR]=new d,a[t.BKA]=new d,a[t.BKN]=new d,a[t.ABG]=new d,a[t.AEN]=new d,l.length=0;for(let e=0;e<i.length;e+=1)l.push({empty:0,match:0,nomatch:0,total:0,name:i[e].name,lower:i[e].lower,index:i[e].index});if(o.length>0){c.length=0;for(let e=0;e<o.length;e+=1)c.push({empty:0,match:0,nomatch:0,total:0,name:o[e].name,lower:o[e].lower,index:o[e].index})}},g=function(e,r){switch(e.total+=1,r){case t.EMPTY:e.empty+=1;break;case t.MATCH:e.match+=1;break;case t.NOMATCH:e.nomatch+=1;break;default:throw Error(`stats.js: collect(): incStat(): unrecognized state: ${r}`)}},m=function(e,t){return`<tr><td class="${n.CLASS_ACTIVE}">${e}</td><td class="${n.CLASS_EMPTY}">${t.empty}</td><td class="${n.CLASS_MATCH}">${t.match}</td><td class="${n.CLASS_NOMATCH}">${t.nomatch}</td><td class="${n.CLASS_ACTIVE}">${t.total}</td></tr> 211`},b=function(){return""+(m("ALT",a[t.ALT])+m("CAT",a[t.CAT])+m("REP",a[t.REP])+m("RNM",a[t.RNM])+m("TRG",a[t.TRG])+m("TBS",a[t.TBS])+m("TLS",a[t.TLS])+m("UDT",a[t.UDT])+m("AND",a[t.AND])+m("NOT",a[t.NOT])+m("BKR",a[t.BKR])+m("BKA",a[t.BKA])+m("BKN",a[t.BKN])+m("ABG",a[t.ABG])+m("AEN",a[t.AEN])+m("totals",e))},y=function(){let e="";e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<i.length;t+=1)l[t].total>0&&(e+=`<tr><td class="${n.CLASS_ACTIVE}">${l[t].name}</td><td class="${n.CLASS_EMPTY}">${l[t].empty}</td><td class="${n.CLASS_MATCH}">${l[t].match}</td><td class="${n.CLASS_NOMATCH}">${l[t].nomatch}</td><td class="${n.CLASS_ACTIVE}">${l[t].total}</td></tr> 212`);if(o.length>0){e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n<tr><th>
212udts</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<o.length;t+=1)c[t].total>0&&(e+=`<tr><td class="${n.CLASS_ACTIVE}">${c[t].name}</td><td class="${n.CLASS_EMPTY}">${c[t].empty}</td><td class="${n.CLASS_MATCH}">${c[t].match}</td><td class="${n.CLASS_NOMATCH}">${c[t].nomatch}</td><td class="${n.CLASS_ACTIVE}">${c[t].total}</td></tr> 213`)}return e};this.validate=function(e){let t=!1;return"string"==typeof e&&"stats"===e&&(t=!0),t},this.init=function(e,t){i=e,o=t,f()},this.collect=function(r,s){g(e,s.state,s.phraseLength),g(a[r.type],s.state,s.phraseLength),r.type===t.RNM&&g(l[r.index],s.state,s.phraseLength),r.type===t.UDT&&g(c[r.index],s.state,s.phraseLength)},this.toHtml=function(e,t){let r="";for(r+=`<table class="${n.CLASS_STATS}"> 214`,"string"==typeof t&&(r+=`<caption>${t}</caption> 215`),r+=`<tr><th class="${n.CLASS_ACTIVE}">ops</th> 216<th class="${n.CLASS_EMPTY}">EMPTY</th> 217<th class="${n.CLASS_MATCH}">MATCH</th> 218<th class="${n.CLASS_NOMATCH}">NOMATCH</th> 219<th class="${n.CLASS_ACTIVE}">totals</th></tr> 220`;;){if(null==e||"ops"===e){r+=b();break}if("index"===e){l.sort(u),c.length>0&&c.sort(u),r+=b()+y();break}if("hits"===e){l.sort(p),c.length>0&&c.sort(u),r+=b()+y();break}"alpha"===e&&(l.sort(h),c.length>0&&c.sort(h),r+=b()+y());break}return r+"</table>\n"},this.toHtmlPage=function(e,t,r){return s.htmlToPage(this.toHtml(e,t),r)}}},6596:function(e){e.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},95718:function(e,t,r){e.exports=function(){let e=r(42109),t=r(6596),s=new(r(17934)),n=r(20621),i="trace.js: ",o=this,a=[],l=5e3,c=-1,h=0,p=0,u=[],d=null,f=null,g=null,m=[],b=[],y=`<span class="${t.CLASS_LINEEND}">•</span>`,T=`<span class="${t.CLASS_LINEEND}">…</span>`,E=`<span class="${t.CLASS_EMPTY}">𝜺</span>`,x=function(){let e=function(e){m[n.ALT]=e,m[n.CAT]=e,m[n.REP]=e,m[n.TLS]=e,m[n.TBS]=e,m[n.TRG]=e,m[n.AND]=e,m[n.NOT]=e,m[n.BKR]=e,m[n.BKA]=e,m[n.BKN]=e,m[n.ABG]=e,m[n.AEN]=e},t=0;for(let e in o.filter.operators)t+=1;if(0===t){e(!1);return}for(let t in o.filter.operators){let r=t.toUpperCase();if("<ALL>"===r){e(!0);return}if("<NONE>"===r){e(!1);return}}for(let t in e(!1),o.filter.operators){let e=t.toUpperCase();if("ALT"===e)m[n.ALT]=!0===o.filter.operators[t];else if("CAT"===e)m[n.CAT]=!0===o.filter.operators[t];else if("REP"===e)m[n.REP]=!0===o.filter.operators[t];else if("AND"===e)m[n.AND]=!0===o.filter.operators[t];else if("NOT"===e)m[n.NOT]=!0===o.filter.operators[t];else if("TLS"===e)m[n.TLS]=!0===o.filter.operators[t];else if("TBS"===e)m[n.TBS]=!0===o.filter.operators[t];else if("TRG"===e)m[n.TRG]=!0===o.filter.operators[t];else if("BKR"===e)m[n.BKR]=!0===o.filter.operators[t];else if("BKA"===e)m[n.BKA]=!0===o.filter.operators[t];else if("BKN"===e)m[n.BKN]=!0===o.filter.operators[t];else if("ABG"===e)m[n.ABG]=!0===o.filter.operators[t];else if("AEN"===e)m[n.AEN]=!0===o.filter.operators[t];else throw Error(`${i}initOpratorFilter: '${t}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`)}},A=function(){let e,t;let r=function(e){m[n.RNM]=e,m[n.UDT]=e;let t=f.length+g.length;b.length=0;for(let r=0;r<t;r+=1)b.push(e)},s=[];for(t=0;t<f.length;t+=1)s.push(f[t].lower);for(t=0;t<g.length;t+=1)s.push(g[t].lower);for(let t in b.length=0,e=0,o.filter.rules)e+=1;if(0===e){r(!0);return}for(let e in o.filter.rules){let t=e.toLowerCase();if("<all>"===t){r(!0);return}if("<none>"===t){r(!1);return}}for(let e in r(!1),m[n.RNM]=!0,m[n.UDT]=!0,o.filter.rules){let r=e.toLowerCase();if((t=s.indexOf(r))<0)throw Error(`${i}initRuleFilter: '${e}' not a valid rule or udt name`);b[t]=!0===o.filter.rules[e]}};this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(e,t){if(c=-1,"number"==typeof e&&e>0)l=Math.ceil(e);else{l=0;return}"number"==typeof t&&(c=Math.floor(t))<0&&(c=-1)},this.getMaxRecords=function(){return l},this.getLastRecord=function(){return c},this.init=function(e,t,r){a.length=0,u.length=0,h=0,p=0,d=r,f=e,g=t,x(),A(),s.init(l)};let k=function(e){return e.type===n.RNM?!!m[e.type]&&!!b[e.index]:e.type===n.UDT?!!m[e.type]&&!!b[f.length+e.index]:m[e.type]},C=function(e){return -1===c||e<=c};
220this.down=function(e,t,r,n,i,o){C(h)&&k(e)&&(u.push(h),a[s.increment()]={dirUp:!1,depth:p,thisLine:h,thatLine:void 0,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},h+=1,p+=1)},this.up=function(e,t,r,n,i,o){if(C(h)&&k(e)){let l=h,c=u.pop(),d=s.getListIndex(c);-1!==d&&(a[d].thatLine=l),p-=1,a[s.increment()]={dirUp:!0,depth:p,thisLine:l,thatLine:c,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},h+=1}};let S=function(){let t,r,i,o,l;function c(t,r){let s,i,o;if(r)switch(t.op={id:r.type,name:e.opcodeToString(r.type)},t.opData=void 0,r.type){case n.RNM:t.opData=f[r.index].name;break;case n.UDT:t.opData=g[r.index].name;break;case n.BKR:s=r.index<f.length?f[r.index].name:g[r.index-f.length].name,i=r.bkrCase===n.BKR_MODE_CI?"%i":"%s",o=r.bkrMode===n.BKR_MODE_UM?"%u":"%p",t.opData=`\\\\${i}${o}${s}`;break;case n.TLS:t.opData=[];for(let e=0;e<r.string.length;e+=1)t.opData.push(r.string[e]);break;case n.TBS:t.opData=[];for(let e=0;e<r.string.length;e+=1)t.opData.push(r.string[e]);break;case n.TRG:case n.REP:t.opData=[r.min,r.max];break;default:throw Error("unrecognized opcode")}else t.op={id:void 0,name:void 0},t.opData=void 0}function h(e,t,r){return e===n.MATCH?{index:t,length:r}:e===n.NOMATCH||e===n.EMPTY?{index:t,length:0}:null}let u=-1;function m(t,r,s){let n={id:u++,branch:-1,parent:t,up:!1,down:!1,depth:s,children:[]};return r?(n.down=!0,n.state={id:r.state,name:e.stateToString(r.state)},n.phrase=null,c(n,r.opcode)):(n.state={id:void 0,name:void 0},n.phrase=h(),c(n,void 0)),n}function b(t,r){r&&(t.up=!0,t.state={id:r.state,name:e.stateToString(r.state)},t.phrase=h(r.state,r.phraseIndex,r.phraseLength),t.down||c(t,r.opcode))}let y=0,T=-1,E=1,x=[],A=!0,k=m(null,null,-1);for(x.push(k),r=k,s.forEach(e=>{if(o=a[e],A&&(A=!1,o.depth>0)){let e=o.dirUp?o.depth+1:o.depth;for(let t=0;t<e;t+=1)i=r,r=m(r,null,t),x.push(r),i.children.push(r)}o.dirUp?(b(r=x.pop(),o),r=x[x.length-1]):(i=r,r=m(r,o,o.depth),x.push(r),i.children.push(r))});x.length>1;)b(r=x.pop(),null);if(0===k.children.length)throw Error("trace.toTree(): parse tree has no nodes");if(0===x.length)throw Error("trace.toTree(): integrity check: dummy root node disappeared?");let C=t=k.children[0];for(;t&&!t.down&&!t.up;)C=t,t=t.children[0];(t=C).leftMost=!0,t.rightMost=!0,function e(t){if(T+=1,t.branch=E,T>p&&(p=T),0===t.children.length)y+=1;else for(let r=0;r<t.children.length;r+=1)r>0&&(E+=1),t.children[r].leftMost=!1,t.children[r].rightMost=!1,t.leftMost&&(t.children[r].leftMost=0===r),t.rightMost&&(t.children[r].rightMost=r===t.children.length-1),e(t.children[r]);T-=1}(t),t.branch=0;let S={};S.string=[];for(let e=0;e<d.length;e+=1)S.string[e]=d[e];S.rules=[];for(let e=0;e<f.length;e+=1)S.rules[e]=f[e].name;S.udts=[];for(let e=0;e<g.length;e+=1)S.udts[e]=g[e].name;return S.id={},S.id.ALT={id:n.ALT,name:"ALT"},S.id.CAT={id:n.CAT,name:"CAT"},S.id.REP={id:n.REP,name:"REP"},S.id.RNM={id:n.RNM,name:"RNM"},S.id.TLS={id:n.TLS,name:"TLS"},S.id.TBS={id:n.TBS,name:"TBS"},S.id.TRG={id:n.TRG,name:"TRG"},S.id.UDT={id:n.UDT,name:"UDT"},S.id.AND={id:n.AND,name:"AND"},S.id.NOT={id:n.NOT,name:"NOT"},S.id.BKR={id:n.BKR,name:"BKR"},S.id.BKA={id:n.BKA,name:"BKA"},S.id.BKN={id:n.BKN,name:"BKN"},S.id.ABG={id:n.ABG,name:"ABG"},S.id.AEN={id:n.AEN,name:"AEN"},S.id.ACTIVE={id:n.ACTIVE,name:"ACTIVE"},S.id.MATCH={id:n.MATCH,name:"MATCH"},S.id.EMPTY={id:n.EMPTY,name:"EMPTY"},S.id.NOMATCH={id:n.NOMATCH,name:"NOMATCH"},S.treeDepth=p,S.leafNodes=y,l=t.down?t.up?"none":"right":t.up?"left":"both",S.branchesIncomplete=l,S.tree=function e(t,r){let s;let n={};if(n.id=t.id,n.branch=t.branch,n.leftMost=t.leftMost,n.rightMost=t.rightMost,s=t.state.name?t.state.name:"ACTIVE",n.state={id:t.state.id,name:s},s=t.op.name?t.op.name:"?",n.op={id:t.op.id,name:s},"string"==typeof t.opData)n.opData=t.opData;else if(Array.isArray(t.opData)){n.opData=[];for(let e=0;e<t.opData.length;e+=1)n.opData[e]=t.opData[e]}else n.opData=void 0;t.phrase?n.phrase={index:t.phrase.index,length:t.phrase.length}:n.phrase=null,n.depth=t.depth,n.children=[];for(let s=0;s<t.children.length;s+=1){let i=s!==t.children.length-1;n.children[s]=e(t.children[s],r,i)}return n}(t,t.depth,!1),S};this.toTree=function(e){let t=S();return e?JSON.stringify(t):t},this.toHtmlPage=function(t,r,s){return e.htmlToPage(this.toHtml(t,r),s)};let M=function(e,r){let s;switch(e){case 16:s="hexadecimal";break;case 10:s="decimal";break;case 8:s="ASCII";break;case 32:s="UNICODE";break;default:throw Error(`${i}htmlHeader: unrecognized mode: ${e}`)}let n="";return n+=`<p>display mode: ${s}</p> 221<table class="${t.CLASS_TRACE}"> 222`,"string"==typeof r&&(n+=`<caption>${r}</caption>`),n};this.indent=function(e){let t="";for(let r=0;r<e;r+=1)t+=".";return t};let w=function(e,t){let r="";if(t.type===n.TRG){if(16===e||32===e){let s=t.min.toString(16).toUpperCase();s.length%2!=0&&(s=`0${s}`),r+=(16===e?"%x":"U+")+s,(s=t.max.toString(16).toUpperCase()).length%2!=0&&(s=`0${s}`),r+=`–${s}`}else r=`%d${t.min.toString(10)}–${t.max.toString(10)}`}return r},$=function(e,t){let r="";if(t.type===n.REP){if(16===e){let e=t.min.toString(16).toUpperCase();e.length%2!=0&&(e=`0${e}`),r=`x${e}`,t.max<1/0?(e=t.max.toString(16).toUpperCase()).length%2!=0&&(e=`0${e}`):e="inf",r+=`–${e}`}else r=t.max<1/0?`${t.min.toString(10)}–${t.max.toString(10)}`:`${t.min.toString(10)}–inf`}return r},O=function(e,t){let r="";if(t.type===n.TBS){let s=Math.min(t.string.length,10);if(16===e||32===e){r+=16===e?"%x":"U+";for(let e=0;e<s;e+=1){let s;e>0&&(r+="."),(s=t.string[e].toString(16).toUpperCase()).length%2!=0&&(s=`0${s}`),r+=s}}else{r="%d";for(let e=0;e<s;e+=1)e>0&&(r+="."),r+=t.string[e].toString(10)}s<t.string.length&&(r+=T)}return r},L=function(t,r){let s="";if(r.type===n.TLS){let n=Math.min(r.string.length,5);if(16===t||10===t){let e,i,o;16===t?(s="%x",o=16):(s="%d",o=10);for(let t=0;t<n;t+=1)t>0&&(s+="."),(i=r.string[t])>=97&&i<=122?(e=i-32,s+=`${e.toString(o)}/${i.toString(o)}`.toUpperCase()):i>=65&&i<=90?(e=i,i+=32,s+=`${e.toString(o)}/${i.toString(o)}`.toUpperCase()):s+=i.toString(o).toUpperCase();
222n<r.string.length&&(s+=T)}else{s='"';for(let t=0;t<n;t+=1)s+=e.asciiChars[r.string[t]];n<r.string.length&&(s+=T),s+='"'}}return s},N=function(t,r,s,n,i){if(0===n)return"";let o="",a=i?",":"";switch(t){case 16:o=a+e.charsToHex(r,s,n);break;case 10:if(i)return`,${e.charsToDec(r,s,n)}`;o=a+e.charsToDec(r,s,n);break;case 32:o=e.charsToUnicode(r,s,n);break;default:o=e.charsToAsciiHtml(r,s,n)}return o},R=function(e,r,s,i,o,a){let l,c,h,p,u="",d=y,f=`<span class="${t.CLASS_LOOKBEHIND}">`,g=`<span class="${t.CLASS_REMAINDER}">`,m="</span>",b=!1;switch(s){case n.EMPTY:u+=E;case n.NOMATCH:case n.MATCH:case n.ACTIVE:c=a-(l=i-o),h=a,p=r.length-h;break;default:throw Error("unrecognized state")}return d=y,c>80?(c=80,d=T,p=0):c+p>80&&(d=T,p=80-c),c>0&&(u+=f+N(e,r,l,c,b)+m,b=!0),p>0&&(u+=g+N(e,r,h,p,b)+m),u+d},B=function(e,r,s,i,o,a){let l,c,h,p,u="",d=y,f=`<span class="${t.CLASS_REMAINDER}">`,g="</span>",m=!1;switch(s){case n.EMPTY:u+=E;case n.NOMATCH:case n.ACTIVE:l=i,c=0,h=i,p=r.length-h;break;case n.MATCH:l=i,h=i+(c=o),p=r.length-h;break;default:throw Error("unrecognized state")}return d=y,c>80?(c=80,d=T,p=0):c+p>80&&(d=T,p=80-c),c>0&&(u+=a+N(e,r,l,c,m)+g,m=!0),p>0&&(u+=f+N(e,r,h,p,m)+g),u+d},_=function(r){let i,l,c,h,p,u;if(null===f)return"";let m="";return m+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th><th>operator</th><th>phrase</th></tr>\n",s.forEach(s=>{let b=a[s];switch(i=b.thisLine,l=void 0!==b.thatLine?b.thatLine:"--",c=!1,h=!1,p=!1,b.lookAround===n.LOOKAROUND_AHEAD&&(c=!0,p=!0,u=b.lookAnchor),(b.opcode.type===n.AND||b.opcode.type===n.NOT)&&(c=!0,p=!0,u=b.phraseIndex),b.lookAround===n.LOOKAROUND_BEHIND&&(h=!0,p=!0,u=b.lookAnchor),(b.opcode.type===n.BKA||b.opcode.type===n.BKN)&&(h=!0,p=!0,u=b.phraseIndex),m+=`<tr><td>${i}</td><td>${l}</td><td>${b.phraseIndex}</td><td>${b.phraseLength}</td><td>${b.depth}</td><td>`,b.state){case n.ACTIVE:m+=`<span class="${t.CLASS_ACTIVE}">↓ </span>`;break;case n.MATCH:m+=`<span class="${t.CLASS_MATCH}">↑M</span>`;break;case n.NOMATCH:m+=`<span class="${t.CLASS_NOMATCH}">↑N</span>`;break;case n.EMPTY:m+=`<span class="${t.CLASS_EMPTY}">↑E</span>`;break;default:m+=`<span class="${t.CLASS_ACTIVE}">--</span>`}if(m+="</td><td>"+o.indent(b.depth),c?m+=`<span class="${t.CLASS_LOOKAHEAD}">`:h&&(m+=`<span class="${t.CLASS_LOOKBEHIND}">`),m+=e.opcodeToString(b.opcode.type),b.opcode.type===n.RNM&&(m+=`(${f[b.opcode.index].name}) `),b.opcode.type===n.BKR){let e=b.opcode.bkrCase===n.BKR_MODE_CI?"%i":"%s",t=b.opcode.bkrMode===n.BKR_MODE_UM?"%u":"%p";m+=`(\\${e}${t}${f[b.opcode.index].name}) `}(b.opcode.type===n.UDT&&(m+=`(${g[b.opcode.index].name}) `),b.opcode.type===n.TRG&&(m+=`(${w(r,b.opcode)}) `),b.opcode.type===n.TBS&&(m+=`(${O(r,b.opcode)}) `),b.opcode.type===n.TLS&&(m+=`(${L(r,b.opcode)}) `),b.opcode.type===n.REP&&(m+=`(${$(r,b.opcode)}) `),p&&(m+="</span>"),m+="</td><td>",h)?m+=R(r,d,b.state,b.phraseIndex,b.phraseLength,u):c?m+=B(r,d,b.state,b.phraseIndex,b.phraseLength,`<span class="${t.CLASS_LOOKAHEAD}">`):m+=B(r,d,b.state,b.phraseIndex,b.phraseLength,`<span class="${t.CLASS_MATCH}">`),m+="</td></tr>\n"}),m+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th><th>operator</th><th>phrase</th></tr>\n</table>\n"};this.toHtml=function(e,r){let s=8;if("string"==typeof e&&e.length>=3){let t=e.toLowerCase().slice(0,3);"hex"===t?s=16:"dec"===t?s=10:"uni"===t&&(s=32)}return M(s,r)+_(s)+""+`</table> 223<p class="${t.CLASS_MONOSPACE}">legend:<br> 224(a) - line number<br> 225(b) - matching line number<br> 226(c) - phrase offset<br> 227(d) - phrase length<br> 228(e) - tree depth<br> 229(f) - operator state<br> 230 - <span class="${t.CLASS_ACTIVE}">↓</span> phrase opened<br> 231 - <span class="${t.CLASS_MATCH}">↑M</span> phrase matched<br> 232 - <span class="${t.CLASS_EMPTY}">↑E</span> empty phrase matched<br> 233 - <span class="${t.CLASS_NOMATCH}">↑N</span> phrase not matched<br> 234operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br> 235phrase - up to 80 characters of the phrase being matched<br> 236 - <span class="${t.CLASS_MATCH}">matched characters</span><br> 237 - <span class="${t.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br> 238 - <span class="${t.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br> 239 - <span class="${t.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br> 240 - <span class="${t.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br> 241 - ${E} empty string<br> 242 - ${y} end of input string<br> 243 - ${T} input string display truncated<br> 244</p> 245<p class="${t.CLASS_MONOSPACE}"> 246<sup>†</sup>original ABNF operators:<br> 247ALT - alternation<br> 248CAT - concatenation<br> 249REP - repetition<br> 250RNM - rule name<br> 251TRG - terminal range<br> 252TLS - terminal literal string (case insensitive)<br> 253TBS - terminal binary string (case sensitive)<br> 254<br> 255<sup>‡</sup>super set SABNF operators:<br> 256UDT - user-defined terminal<br> 257AND - positive look ahead<br> 258NOT - negative look ahead<br> 259BKA - positive look behind<br> 260BKN - negative look behind<br> 261BKR - back reference<br> 262ABG - anchor - begin of input string<br> 263AEN - anchor - end of input string<br> 264</p> 265`}}},42109:function(e,t,r){let s=r(6596),n=r(70402),i=r(47394),o=r(20621),a="utilities.js: ",l=function(e,t,r){let s;let n=t;for(;;){if(e<=0){n=0,s=0;break}if("number"!=typeof n){n=0,s=e;break}if(n>=e){n=e,s=e;break}if("number"!=typeof r){s=e;break}(s=n+r)>e&&(s=e);break}return{beg:n,end:s}};t.htmlToPage=function(e,t){let r;if("string"!=typeof e)throw Error(`${a}htmlToPage: input HTML is not a string`);return r="string"!=typeof t?"htmlToPage":t,`<!DOCTYPE html> 266<html lang="en"> 267<head> 268<meta charset="utf-8"> 269<title>${r}</title> 270<style> 271`+i()+"</style>\n</head>\n<body>\n"+`<p>${new Date}</p> 272`+e+"</body>\n</html>\n"},t.parserResultToHtml=function(e,t){let r,n,i=null;"string"==typeof t&&""!==t&&(i=t),r=!0===e.success?`<span class="${s.CLASS_MATCH}">true</span>`:`<span class="${s.CLASS_NOMATCH}">
272false</span>`,n=e.state===o.EMPTY?`<span class="${s.CLASS_EMPTY}">EMPTY</span>`:e.state===o.MATCH?`<span class="${s.CLASS_MATCH}">MATCH</span>`:e.state===o.NOMATCH?`<span class="${s.CLASS_NOMATCH}">NOMATCH</span>`:`<span class="${s.CLASS_NOMATCH}">unrecognized</span>`;let a="";return a+=`<table class="${s.CLASS_STATE}"> 273`,i&&(a+=`<caption>${i}</caption> 274`),a+=`<tr><th>state item</th><th>value</th><th>description</th></tr> 275<tr><td>parser success</td><td>${r}</td> 276<td><span class="${s.CLASS_MATCH}">true</span> if the parse succeeded, 277 <span class="${s.CLASS_NOMATCH}">false</span> otherwise<br><i>NOTE: for success, entire string must be matched</i></td></tr> 278<tr><td>parser state</td><td>${n}</td> 279<td><span class="${s.CLASS_EMPTY}">EMPTY</span>, <span class="${s.CLASS_MATCH}">MATCH</span> or 280<span class="${s.CLASS_NOMATCH}">NOMATCH</span></td></tr> 281<tr><td>string length</td><td>${e.length}</td><td>length of the input (sub)string</td></tr> 282<tr><td>matched length</td><td>${e.matched}</td><td>number of input string characters matched</td></tr> 283<tr><td>max matched</td><td>${e.maxMatched}</td><td>maximum number of input string characters matched</td></tr> 284<tr><td>max tree depth</td><td>${e.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr> 285<tr><td>node hits</td><td>${e.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr> 286<tr><td>input length</td><td>${e.inputLength}</td><td>length of full input string</td></tr> 287<tr><td>sub-string begin</td><td>${e.subBegin}</td><td>sub-string first character index</td></tr> 288<tr><td>sub-string end</td><td>${e.subEnd}</td><td>sub-string end-of-string index</td></tr> 289<tr><td>sub-string length</td><td>${e.subLength}</td><td>sub-string length</td></tr> 290</table> 291`},t.charsToString=function(e,t,r){let s,i;if("number"==typeof t){if(t>=e.length)return"";s=t<0?0:t}else s=0;if("number"==typeof r){if(r<=0)return"";i=r>e.length-s?e.length:s+r}else i=e.length;return s<i?n.encode("UTF16LE",e.slice(s,i)).toString("utf16le"):""},t.stringToChars=function(e){return n.decode("STRING",e)},t.opcodeToString=function(e){let t="unknown";switch(e){case o.ALT:t="ALT";break;case o.CAT:t="CAT";break;case o.RNM:t="RNM";break;case o.UDT:t="UDT";break;case o.AND:t="AND";break;case o.NOT:t="NOT";break;case o.REP:t="REP";break;case o.TRG:t="TRG";break;case o.TBS:t="TBS";break;case o.TLS:t="TLS";break;case o.BKR:t="BKR";break;case o.BKA:t="BKA";break;case o.BKN:t="BKN";break;case o.ABG:t="ABG";break;case o.AEN:t="AEN";break;default:throw Error("unrecognized opcode")}return t},t.stateToString=function(e){let t="unknown";switch(e){case o.ACTIVE:t="ACTIVE";break;case o.MATCH:t="MATCH";break;case o.EMPTY:t="EMPTY";break;case o.NOMATCH:t="NOMATCH";break;default:throw Error("unrecognized state")}return t},t.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"," ","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"],t.charToHex=function(e){let t=e.toString(16).toUpperCase();switch(t.length){case 1:case 3:case 7:t=`0${t}`;break;case 2:case 6:t=`00${t}`;break;case 4:break;case 5:t=`000${t}`;break;default:throw Error("unrecognized option")}return t},t.charsToDec=function(e,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToDec: input must be an array of integers`);let n=l(e.length,t,r);if(n.end>n.beg){s+=e[n.beg];for(let t=n.beg+1;t<n.end;t+=1)s+=`,${e[t]}`}return s},t.charsToHex=function(e,r,s){let n="";if(!Array.isArray(e))throw Error(`${a}charsToHex: input must be an array of integers`);let i=l(e.length,r,s);if(i.end>i.beg){n+=`\\x${t.charToHex(e[i.beg])}`;for(let r=i.beg+1;r<i.end;r+=1)n+=`,\\x${t.charToHex(e[r])}`}return n},t.charsToHtmlEntities=function(e,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToHex: input must be an array of integers`);let n=l(e.length,t,r);if(n.end>n.beg)for(let t=n.beg;t<n.end;t+=1)s+=`&#x${e[t].toString(16)};`;return s},t.charsToUnicode=function(e,r,s){let n="";if(!Array.isArray(e))throw Error(`${a}charsToUnicode: input must be an array of integers`);let i=l(e.length,r,s);if(i.end>i.beg)for(let r=i.beg;r<i.end;r+=1){var o;((o=e[r])>=55296&&o<=57343||o>1114111?1:0)?n+=` U+${t.charToHex(e[r])}`:n+=`&#${e[r]};`}return n},t.charsToJsUnicode=function(e,r,s){let n="";if(!Array.isArray(e))throw Error(`${a}charsToJsUnicode: input must be an array of integers`);let i=l(e.length,r,s);if(i.end>i.beg){n+=`\\u${t.charToHex(e[i.beg])}`;for(let r=i.beg+1;r<i.end;r+=1)n+=`,\\u${t.charToHex(e[r])}`}return n},t.charsToAscii=function(e,r,s){let n="";if(!Array.isArray(e))throw Error(`${a}charsToAscii: input must be an array of integers`);let i=l(e.length,r,s);for(let r=i.beg;r<i.end;r+=1){let s=e[r];s>=32&&s<=126?n+=String.fromCharCode(s):n+=`\\x${t.charToHex(s)}`}return n},t.charsToAsciiHtml=function(e,r,n){let i;if(!Array.isArray(e))throw Error(`${a}charsToAsciiHtml: input must be an array of integers`);let o="",c=l(e.length,r,n);for(let r=c.beg;r<c.end;r+=1)(i=e[r])<32||127===i?o+=`<span class="${s.CLASS_CTRLCHAR}">${t.asciiChars[i]}</span>`:i>127?o+=`<span class="${s.CLASS_CTRLCHAR}">U+${t.charToHex(i)}</span>`:o+=t.asciiChars[i];return o},t.stringToAsciiHtml=function(e){let t=n.decode("STRING",e);return this.charsToAsciiHtml(t)}},88950:function(e,t,r){"use strict";var s,n,i=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};
291Object.defineProperty(t,"__esModule",{value:!0}),t.generateNonce=t.checkContractWalletSignature=t.SiweMessage=t.SignatureType=t.ErrorTypes=void 0;let o=r(80900),a=r(36994),l=r(35398);(s=n=t.ErrorTypes||(t.ErrorTypes={})).INVALID_SIGNATURE="Invalid signature.",s.EXPIRED_MESSAGE="Expired message.",s.MALFORMED_SESSION="Malformed session.",(t.SignatureType||(t.SignatureType={})).PERSONAL_SIGNATURE="Personal signature";class c{constructor(e){if("string"==typeof e){let t=new l.ParsedMessage(e);this.domain=t.domain,this.address=t.address,this.statement=t.statement,this.uri=t.uri,this.version=t.version,this.nonce=t.nonce,this.issuedAt=t.issuedAt,this.expirationTime=t.expirationTime,this.notBefore=t.notBefore,this.requestId=t.requestId,this.chainId=t.chainId,this.resources=t.resources}else Object.assign(this,e),"string"==typeof this.chainId&&(this.chainId=parseInt(this.chainId))}regexFromMessage(e){return new l.ParsedMessageRegExp(e).match}toMessage(){let e=`${this.domain} wants you to sign in with your Ethereum account:`,r=`URI: ${this.uri}`,s=[e,this.address].join("\n"),n=`Version: ${this.version}`;this.nonce||(this.nonce=(0,t.generateNonce)());let i=[r,n,"Chain ID: "+this.chainId,`Nonce: ${this.nonce}`];if(this.issuedAt&&Date.parse(this.issuedAt),this.issuedAt=this.issuedAt?this.issuedAt:new Date().toISOString(),i.push(`Issued At: ${this.issuedAt}`),this.expirationTime){let e=`Expiration Time: ${this.expirationTime}`;i.push(e)}this.notBefore&&i.push(`Not Before: ${this.notBefore}`),this.requestId&&i.push(`Request ID: ${this.requestId}`),this.resources&&i.push(["Resources:",...this.resources.map(e=>`- ${e}`)].join("\n"));let o=i.join("\n");return s=[s,this.statement].join("\n\n"),this.statement&&(s+="\n"),[s,o].join("\n")}signMessage(){return console&&console.warn&&console.warn("signMessage method is deprecated, use prepareMessage instead."),this.prepareMessage()}prepareMessage(){let e;return this.version,this.toMessage()}validate(e=this.signature,r){return i(this,void 0,void 0,function*(){return new Promise((s,o)=>i(this,void 0,void 0,function*(){let i=this.prepareMessage();try{let o,l=[];
291if(i||l.push("`message`"),e||l.push("`signature`"),this.address||l.push("`address`"),l.length>0)throw Error(`${n.MALFORMED_SESSION} missing: ${l.join(", ")}.`);try{o=a.ethers.utils.verifyMessage(i,e)}catch(e){}finally{if(o!==this.address)try{if(!(yield(0,t.checkContractWalletSignature)(this,e,r)))throw Error(`${n.INVALID_SIGNATURE}: ${o} !== ${this.address}`)}catch(e){throw e}}let h=new c(i);if(h.expirationTime){let e=new Date(h.expirationTime).getTime();if(isNaN(e))throw Error(`${n.MALFORMED_SESSION} invalid expiration date.`);if(new Date().getTime()>=e)throw Error(n.EXPIRED_MESSAGE)}s(h)}catch(e){o(e)}}))})}}t.SiweMessage=c,t.checkContractWalletSignature=(e,t,r)=>i(void 0,void 0,void 0,function*(){if(!r)return!1;try{let s=new a.Contract(e.address,["function isValidSignature(bytes32 _message, bytes _signature) public view returns (bool)"],r),n=a.utils.hashMessage(e.signMessage());return yield s.isValidSignature(n,t)}catch(e){throw e}}),t.generateNonce=()=>(0,o.randomStringForEntropy)(96)},63730:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(88950),t)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.