1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[777],{10888: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(38728)),i=s(r(10247)),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`;t.ParsedMessage=class{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}}},39755:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessageRegExp=t.ParsedMessage=void 0;let s=r(10888);Object.defineProperty(t,"ParsedMessage",{enumerable:!0,get:function(){return s.ParsedMessage}});let n=r(50734);Object.defineProperty(t,"ParsedMessageRegExp",{enumerable:!0,get:function(){return n.ParsedMessage}})},50734: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}$`;t.ParsedMessage=class{constructor(e){var t,r,s,n,i,o,a,l,u,h,p,d,f;let g=RegExp(c,"g"),m=g.exec(e);
141if(!m)throw Error("Message did not match the regular expression.");this.match=m,this.domain=null===(t=null==m?void 0:m.groups)||void 0===t?void 0:t.domain,this.address=null===(r=null==m?void 0:m.groups)||void 0===r?void 0:r.address,this.statement=null===(s=null==m?void 0:m.groups)||void 0===s?void 0:s.statement,this.uri=null===(n=null==m?void 0:m.groups)||void 0===n?void 0:n.uri,this.version=null===(i=null==m?void 0:m.groups)||void 0===i?void 0:i.version,this.nonce=null===(o=null==m?void 0:m.groups)||void 0===o?void 0:o.nonce,this.chainId=parseInt(null===(a=null==m?void 0:m.groups)||void 0===a?void 0:a.chainId),this.issuedAt=null===(l=null==m?void 0:m.groups)||void 0===l?void 0:l.issuedAt,this.expirationTime=null===(u=null==m?void 0:m.groups)||void 0===u?void 0:u.expirationTime,this.notBefore=null===(h=null==m?void 0:m.groups)||void 0===h?void 0:h.notBefore,this.requestId=null===(p=null==m?void 0:m.groups)||void 0===p?void 0:p.requestId,this.resources=null===(f=null===(d=null==m?void 0:m.groups)||void 0===d?void 0:d.resources)||void 0===f?void 0:f.split("\n- ").slice(1)}}},38728:function(e,t,r){var s=r(48834).Buffer;e.exports=function(e){let t;let n="api.js: ",i=this,o=r(10247),a=r(14562),l=r(79101),c=new(r(93430)),{attributes:u,showAttributes:h,showAttributeErrors:p,showRuleDependencies:d}=r(46507),f=r(88026),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 u=0;for(let r=t;r<s;r+=1){let t=e[r];if(t>=32&&t<=126)switch(1===u?(c+=i,u=0):2===u&&(c+=l,u=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===u?(c+=n,u=1):2===u&&(c+=l+n,u=1),9===t&&(c+="TAB"),10===t&&(c+="LF"),13===t&&(c+="CR")):(0===u?(c+=a,u=2):1===u&&(c+=i+a,u=2),c+=`\\x${o.utils.charToHex(t)}`)}2===u&&(c+=l),1===u&&(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"},E=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,u;let h="",p="";0===t.length||(l=(s=t[e.line]).beginChar,e.char>l&&(h=g(r,l,e.char-l)),(l=e.char)<(c=s.beginChar+s.length)&&(p=g(r,l,c-l)),i+=`<tr><td>${e.line}</td><td>${s.beginChar}</td><td>${e.char-s.beginChar}</td><td>${h+a+p}</td></tr> 149<tr><td colspan="3"></td><td>↑: ${o.utils.stringToAsciiHtml(e.msg)}</td></tr> 150`)}),i+="</table></p>\n"},T=function(e,t,r){let s,n,i;return s="",e.forEach(e=>{s+=`${(n=t[e.line]).lineNo}: ${n.beginChar}: ${e.char-n.beginChar}: `+(m(r,n.beginChar,e.char-n.beginChar)+" >> ")+(m(r,e.char,n.beginChar+n.length-e.char)+"\n"+`${n.lineNo}: `+`${n.beginChar}: `+`${e.char-n.beginChar}: `+"error: "+e.msg+"\n")}),s},k=!1,x=!1,A=!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),k=!0},this.parse=function(e,t){if(!k)throw Error(`${n}grammar not scanned`);c.syntax(this.chars,this.lines,this.errors,e,t),x=!0},this.translate=function(){if(!x)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,A=!0)},this.attributes=function(){if(!A)throw Error(`${n}grammar not scanned, parsed and translated`);return S=u(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=u(this.rules,this.udts,t,this.errors),C=!0)},this.displayRules=function(e="index"){if(!A)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&&p(e),h(e)},this.displayAttributeErrors=function(){if(!C)throw Error(`${n}no attributes - must be preceeded by call to attributes()`);return p()},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 T(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return E(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return b(this.lines)},this.linesToHtml=function(){return y(this.lines)}}},46507:function(e,t,r){e.exports=function(){let e=r(91003),{ruleAttributes:t,showAttributes:s,showAttributeErrors:n}=r(51763),{ruleDependencies:i,showRuleDependencies:o}=r(68319);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){let n={rule:t,recursiveType:e.ATTR_N,groupNumber:-1,refersTo:this.falseArray(r),refersToUdt:this.falseArray(s),referencedBy:this.falseArray(r)};return n}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}}()},93430:function(e,t,r){e.exports=function(){let e=r(10247),t=e.ids,s=new(r(97506)),n=new(r(10245)),i=new(r(73045)),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){if(n){if("traceObject"!==n.traceObject)throw TypeError("parser: trace argument is not a trace object");o.trace=n}let l={};l.errors=r,l.strict=!!s,l.lines=t,l.findLine=a,l.charsLength=e.length,l.ruleCount=0;let c=o.parse(i,"file",e,l);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,u="",h=0,p=1/0,d=0,f=[],g=[],m=0,b=0,y=0,E=0,T=0,k=0,x=0,A=0,C=0,S=0,w=0,M=0,O=0,$=0,R=0;s.forEach(e=>{f.push(e.lower),h+=e.opcodes.length,e.opcodes.forEach(e=>{switch(e.type){case t.ALT:m+=1;break;case t.CAT:b+=1;break;case t.RNM:y+=1;break;case t.UDT:E+=1;break;case t.REP:T+=1;break;case t.AND:k+=1;break;case t.NOT:x+=1;break;case t.BKA:M+=1;break;case t.BKN:O+=1;break;case t.BKR:w+=1;break;case t.ABG:$+=1;break;case t.AEN:R+=1;break;case t.TLS:for(A+=1,o=0;o<e.string.length;o+=1)e.string[o]<p&&(p=e.string[o]),e.string[o]>d&&(d=e.string[o]);break;case t.TBS:for(C+=1,o=0;o<e.string.length;o+=1)e.string[o]<p&&(p=e.string[o]),e.string[o]>d&&(d=e.string[o]);break;case t.TRG:S+=1,e.min<p&&(p=e.min),e.max>d&&(d=e.max);break;default:throw Error("generateSource: unrecognized opcode")}})}),f.sort(),n.length>0&&(n.forEach(e=>{g.push(e.lower)}),g.sort());let v="module.exports";return i&&"string"==typeof i&&(v=`let ${i}`),u+=`// copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved<br> 151// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br> 152// 153// Generated by apg-js, Version 4.0.0 [apg-js](https://github.com/ldthomas/apg-js) 154${v} = function grammar(){ 155 // \`\`\` 156 // SUMMARY 157 // rules = ${s.length} 158 // udts = ${n.length} 159 // opcodes = ${h} 160 // --- ABNF original opcodes 161 // ALT = ${m} 162 // CAT = ${b} 163 // REP = ${T} 164 // RNM = ${y} 165 // TLS = ${A}
166 // TBS = ${C} 167 // TRG = ${S} 168 // --- SABNF superset opcodes 169 // UDT = ${E} 170 // AND = ${k} 171 // NOT = ${x} 172 // BKA = ${M} 173 // BKN = ${O} 174 // BKR = ${w} 175 // ABG = ${$} 176 // AEN = ${R} 177 // characters = [`,A+C+S===0?u+=" none defined ]":u+=`${p} - ${d}]`,E>0&&(u+=" + user defined"),u+="\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",u+=r}),u+="\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",u+=r}),u+="\n /* OPCODES */\n",s.forEach((e,r)=>{r>0&&(u+="\n"),u+=` /* ${e.name} */ 178 this.rules[${r}].opcodes = []; 179`,e.opcodes.forEach((e,i)=>{let o;switch(e.type){case t.ALT:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, children: [${e.children.toString()}]};// ALT 180`;break;case t.CAT:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, children: [${e.children.toString()}]};// CAT 181`;break;case t.RNM:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, index: ${e.index}};// RNM(${s[e.index].name}) 182`;break;case t.BKR:e.index>
182=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",u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, index: ${e.index}, lower: '${l}', bkrCase: ${e.bkrCase}, bkrMode: ${e.bkrMode}};// BKR(\\${a=o+a}) 183`;break;case t.UDT:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, empty: ${e.empty}, index: ${e.index}};// UDT(${n[e.index].name}) 184`;break;case t.REP:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, min: ${e.min}, max: ${e.max}};// REP 185`;break;case t.AND:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// AND 186`;break;case t.NOT:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// NOT 187`;break;case t.ABG:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// ABG(%^) 188`;break;case t.AEN:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// AEN(%$) 189`;break;case t.BKA:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// BKA 190`;break;case t.BKN:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}};// BKN 191`;break;case t.TLS:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, string: [${e.string.toString()}]};// TLS 192`;break;case t.TBS:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, string: [${e.string.toString()}]};// TBS 193`;break;case t.TRG:u+=` this.rules[${r}].opcodes[${i}] = {type: ${e.type}, min: ${e.min}, max: ${e.max}};// TRG 194`;break;default:throw Error("parser.js: ~143: unrecognized opcode")}})}),u+='\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="",u+=' 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])}u+=c}u+='";\n'}),u+=" 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}}},51763:function(e,t,r){e.exports=function(){let e=r(91003),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=r=>{t=r;let i=0,o=0,a=t.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,u=[];for(a=0;a<c;a+=1)u.push(e.attrGen());for(a=0;a<c;a+=1)r(e,t,l.children[a],u[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}(u,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}(u,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}(u,c),o.empty=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].empty)return!1;return!0}(u,c),o.finite=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].finite)return!1;return!0}(u,c),o.cyclic=function(e,t){for(let r=0;r<t;r+=1)if(!e[r].cyclic)return!1;return!0}(u,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}},o=e=>e?"t":"f",a=e=>e?"e":"f",l=e=>e?"t":"e",c=(r,s,n,i)=>`${r}:${s}:`+(`${a(n.left)} ${o(n.nested)} ${o(n.right)} ${a(n.cyclic)} ${l(n.finite)} ${o(n.empty)}:${t.typeToString(i.recursiveType)}:`+(i.recursiveType===e.ATTR_MR?i.groupNumber:"-"))+`:${n.rule.name} 195`,u=()=>"LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n",h=()=>{let e=null,r=null,s="";if(s+="RULE ATTRIBUTES WITH ERRORS\n"+u(),t.attrsErrorCount)for(let n=0;n<t.attrsErrorCount;n+=1)e=t.attrsErrors[n],r=t.ruleDeps[e.rule.index],s+=c(n,e.rule.index,e,r);else s+="<none>\n";return s},p=e=>{let r=0,s=0,n=null,i=null,o="",{ruleIndexes:a}=t;
195for(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+=c(r,s,n,i);return o},d=(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+u()+p(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+s+u()+p(116):r+="ordered by rule index\n"+s+u()+p(),r};return{ruleAttributes:i,showAttributes:d,showAttributeErrors:h}}()},68319:function(e,t,r){e.exports=(()=>{let e=r(91003),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=r=>{let n=0,i=0,o=0,a=null,l=null,c=!1;(t=r).dependenciesComplete=!1;
195let u=t.falseArray(t.ruleCount);for(n=0;n<t.ruleCount;n+=1)t.falsifyArray(u),s(t.ruleCount,t.ruleDeps,n,u);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},i=(e=null)=>{let r=0,s=0,n=0,i=0,o=t.ruleCount-1,a=t.udtCount-1,l="",c="",u=!1,h=null,{ruleIndexes:p}=t,{udtIndexes:d}=t;for(97===e?(p=t.ruleAlphaIndexes,d=t.udtAlphaIndexes):116===e&&(p=t.ruleTypeIndexes,d=t.udtAlphaIndexes),r=0;r<t.ruleCount;r+=1){for(c=`${p[r]}:${t.typeToString((h=t.ruleDeps[p[r]]).recursiveType)}:`,t.isMutuallyRecursive&&(c+=(h.groupNumber>-1?h.groupNumber:"-")+":"),c+=" ",l+=`${c+t.rules[p[r]].name} 196`,u=!0,n=0,i=l.length,l+=c,s=0;s<t.ruleCount;s+=1)h.refersTo[p[s]]&&(u?(u=!1,l+="=> "+t.ruleDeps[p[s]].rule.name):l+=`, ${t.ruleDeps[p[s]].rule.name}`,n+=1),l.length-i>100&&s!==o&&(l+=` 197${c}=> `,i=l.length);if(t.udtCount)for(s=0;s<t.udtCount;s+=1)h.refersToUdt[d[s]]&&(u?(u=!1,l+="=> "+t.udts[d[s]].name):l+=`, ${t.udts[d[s]].name}`,n+=1),l.length-i>100&&s!==a&&(l+=` 198${c}=> `,i=l.length);for(0===n&&(l+="=> <none>\n"),!1===u&&(l+="\n"),u=!0,n=0,i=l.length,l+=c,s=0;s<t.ruleCount;s+=1)h.referencedBy[p[s]]&&(u?(u=!1,l+="<= "+t.ruleDeps[p[s]].rule.name):l+=`, ${t.ruleDeps[p[s]].rule.name}`,n+=1),l.length-i>100&&s!==o&&(l+=` 199${c}=> `,i=l.length);0===n&&(l+="<= <none>\n"),!1===u&&(l+="\n"),l+="\n"}return l},o=(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"+i(97):116===e.charCodeAt(0)?r+="ordered by rule type\n"+i(116):r+="ordered by rule index\n"+i(null)),r};return{ruleDependencies:n,showRuleDependencies:o}})()},73045: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}
199,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}
199,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]}
199,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}
199,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}
199,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]}
199,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;
199 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) ;
199 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"}}},343:function(e,t,r){let s=r(91003),n=r(29090),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
199ict&&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},43438: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"}}},79101:function(e,t,r){e.exports=function(e,t,s,n){let i=r(10247),o=new(r(43438)),{callbacks:a}=r(343),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}let u=c.parse(o,"file",e);if(!0!==u.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}},10245:function(e,t,r){e.exports=function(){let e=r(10247),t=e.ids,s=function(){this.names=[],this.add=function(e){let t=-1,r=this.get(e);return -1===r&&(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;
199o.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}}},88026: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=[],u=t.length,h=r.length,p="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<u;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}),h){for(n=0;n<h;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(p+=" - alphabetical by rule/UDT name\n",n=0;n<u;n+=1)p+=`${n}: ${o[n]}: ${t[o[n]].name} 200`;if(h)for(n=0;n<h;n+=1)p+=`${n}: ${a[n]}: ${r[a[n]].name} 201`}else{for(p+=" - ordered by rule/UDT index\n",n=0;n<u;n+=1)p+=`${n}: ${t[n].name} 202`;if(h)for(n=0;n<h;n+=1)p+=`${n}: ${r[n].name} 203`}return p}}()},97506:function(e,t,r){e.exports=function(){let e;let t="syntax-callbacks.js: ",s=r(10247),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
203d - 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;
203case 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."});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."});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.`})}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."});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."});break;default:throw Error(`${t}synFile: unrecognized case.`)}}}},14562:function(e,t,r){var s=r(48834).Buffer;let n=this,i=r(11077),o="UTF8",a="UTF16",l="UTF16BE",c="UTF16LE",u="UTF32",h="UTF32BE",p="UTF32LE",d="UINT7",f="ASCII",g="BINARY",m="UINT8",b="UINT16",y="UINT16LE",E="UINT16BE",T="UINT32",k="UINT32LE",x="UINT32BE",A="ESCAPED",C="STRING",S=function(e){e.type=o;let t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)},w=function(e){let t=e.data;switch(e.bom=0,e.type){case a:e.type=l,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=c,e.bom=2));break;case l:if(e.type=l,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: "${l}" specified but BOM is for "${c}"`)}break;case c:if(e.type=c,t.length>=0){if(254===t[0]&&255===t[1])throw TypeError(`src type: "${c}" specified but BOM is for "${l}"`);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 u: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`)}},O=function(e,t){if("string"!=typeof e||""===e)throw TypeError(`type: "${e}" not recognized`);let r=function(e){let t={type:"",base64:!1}
203,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===C)throw TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${C}`);if(s.isBuffer(t))r.data=i.base64.decode(t);else if("string"==typeof t){let e=s.from(t,"ascii");r.data=i.base64.decode(e)}else throw TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof t}`)}else r.data=t;switch(r.type){case o:S(r);break;case a:case l:case c:w(r);break;case u:case h:case p:M(r);break;case b:r.type=E;break;case T:r.type=x;break;case f:r.type=d;break;case g:r.type=m;break;case d:case m:case y:case E:case k:case x:case C:case A:break;default:throw TypeError(`type: "${e}" not recognized`)}if(r.type===C){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 o:case l:case c:case h:case p:case d:case m:case y:case E:case k:case x:case A:break;case C:if(r.base64)throw TypeError(`":BASE64" suffix not allowed with type ${C}`);break;case f:r.type=d;break;case g:r.type=m;break;case a:r.type=l;break;case u:r.type=h;break;case b:r.type=E;break;case T:r.type=x;break;default:throw TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return r},R=function(e,t){switch(e){case o:return i.utf8.encode(t);case l:return i.utf16be.encode(t);case c:return i.utf16le.encode(t);case h:return i.utf32be.encode(t);case p:return i.utf32le.encode(t);case d:return i.uint7.encode(t);case m:return i.uint8.encode(t);case E:return i.uint16be.encode(t);case y:return i.uint16le.encode(t);case x:return i.uint32be.encode(t);case k:return i.uint32le.encode(t);case C:return i.string.encode(t);case A:return i.escaped.encode(t);default:throw TypeError(`encode type "${e}" not recognized`)}},v=function(e){switch(e.type){case o:return i.utf8.decode(e.data,e.bom);case c:return i.utf16le.decode(e.data,e.bom);case l:return i.utf16be.decode(e.data,e.bom);case h:return i.utf32be.decode(e.data,e.bom);case p:return i.utf32le.decode(e.data,e.bom);case d:return i.uint7.decode(e.data);case m:return i.uint8.decode(e.data);case E:return i.uint16be.decode(e.data);case y:return i.uint16le.decode(e.data);case x:return i.uint32be.decode(e.data);case k:return i.uint32le.decode(e.data);case C:return i.string.decode(e.data);case A:return i.escaped.decode(e.data);default:throw TypeError(`decode type "${e.type}" not recognized`)}};t.decode=function(e,t){let r=O(e,t);return v(r)},t.encode=function(e,t){let r,s;let n=$(e,t);return n.crlf?(r=i.lineEnds.crlf(t),s=R(n.type,r)):n.lf?(r=i.lineEnds.lf(t),s=R(n.type,r)):s=R(n.type,t),n.base64&&(s=i.base64.encode(s)),s},t.convert=function(e,t,r){return n.encode(r,n.decode(e,t))}},11077:function(e,t,r){var s=r(48834).Buffer;let n=this,i=["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"],o=[];
203"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(e=>{o.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,u=[];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}`)}u.push(r),c+=a}return u}},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,u=t?2:0,h=0;for(;u<c;){for(;;){if((n=u+1)<c){if((o=(e[u]<<8)+e[n])<55296||o>57343){r=o,s=2;break}if((i=u+3)<c&&(a=(e[u+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[${u}]`)}l[h++]=r,u+=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,u=t?2:0,h=0;for(;u<c;){for(;;){if((n=u+1)<c){if((o=(e[n]<<8)+e[u])<55296||o>57343){r=o,s=2;break}if((i=u+3)<c&&(a=(e[i]<<8)+e[u+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[${u}]`)}l[h++]=r,u+=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;
203return 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=>n.utf16le.encode(e).toString("utf16le"),decode:e=>n.utf16le.decode(s.from(e,"utf16le"),0)},t.escaped={encode(e){let t=[];for(let r=0;r<e.length;r+=1){let n=e[r];if(96===n)t.push(n),t.push(n);else if(10===n)t.push(n);else if(n>=32&&n<=126)t.push(n);else{let e="";if(n>=0&&n<=31)e+=`\`x${i[n]}`;else if(n>=127&&n<=255)e+=`\`x${i[n]}`;else if(n>=256&&n<=65535)e+=`\`u${i[n>>8&255]}${i[255&n]}`;else if(n>=65536&&n<=4294967295){e+="`u{";let t=n>>24&255;t>0&&(e+=i[t]),e+=`${i[n>>16&255]+i[n>>8&255]+i[255&n]}}`}else throw Error("escape.encode(char): char > 0xffffffff not allowed");let r=s.from(e);r.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;
203i.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 i=e.length%3;i=i>0?3-i:0;let a=(e.length+i)/3,l=s.alloc(4*a);i>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++]=o[n>>18&63],l[r++]=o[n>>12&63],l[r++]=o[n>>6&63],l[r++]=o[63&n];return 0===i?l:1===i?(n=(e[t++]<<16)+(e[t]<<8),l[r++]=o[n>>18&63],l[r++]=o[n>>12&63],l[r++]=o[n>>6&63],l[r]=o[64],l):2===i?(n=e[t]<<16,l[r++]=o[n>>18&63],l[r++]=o[n>>12&63],l[r++]=o[64],l[r]=o[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 204${e}${s}${n}${i}`,r=4;break;case 75:t+=`${e}\r 205${s}${n}${i}`,r=3;break;case 74:t+=`${e+s}\r 206${n}${i}`,r=2;break;case 73:t+=`${e+s+n}\r 207${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}}},25655:function(e,t,r){e.exports=function(){let e=r(91003),t=r(29090),s=this,n=null,i=null,o=null,a=0,l=[],c=[],u=[],h=[];function p(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 p;u.length=0,h.length=0,l.length=0,a=0,n=e,i=t,o=r;let d=[];for(p=0;p<n.length;p+=1)d.push(n[p].lower);for(p=0;p<i.length;p+=1)d.push(i[p].lower);for(p=0,a=n.length+i.length;p<a;p+=1)l[p]=!1,c[p]=null;for(let e in s.callbacks){let t=e.toLowerCase();
207if((p=d.indexOf(t))<0)throw Error(`ast.js: init: node '${e}' not a rule or udt name`);"function"==typeof s.callbacks[e]&&(l[p]=!0,c[p]=s.callbacks[e]),!0===s.callbacks[e]&&(l[p]=!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=h.length;return u.push(s),h.push({name:r,thisIndex:s,thatIndex:null,state:e.SEM_PRE,callbackIndex:t,phraseIndex:null,phraseLength:null,stack:u.length}),s},this.up=function(t,r,s,n){let i=h.length,o=u.pop();return h.push({name:r,thisIndex:i,thatIndex:o,state:e.SEM_POST,callbackIndex:t,phraseIndex:s,phraseLength:n,stack:u.length}),h[o].thatIndex=i,h[o].phraseIndex=s,h[o].phraseLength=n,i},this.translate=function(t){let r,s;for(let n=0;n<h.length;n+=1)r=c[(s=h[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){h.length=e,e>0?u.length=h[e-1].stack:u.length=0},this.getLength=function(){return h.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"?> 208<root nodes="${h.length/2}" characters="${o.length}"> 209<!-- input string, ${n} --> 210`+p(a+2)+s(o)+"\n",h.forEach(t=>{t.state===e.SEM_PRE?(a+=1,i+=p(a)+`<node name="${t.name}" index="${t.phraseIndex}" length="${t.phraseLength}"> 211`+p(a+2)+s(o,t.phraseIndex,t.phraseLength)+"\n"):(i+=p(a)+`</node><!-- name="${t.name}" --> 212`,a-=1)}),i+="</root>\n"},this.phrases=function(){let t,r;let s={};for(t=0;t<h.length;t+=1)(r=h[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}}},84804: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){let e=(s+t)%t;r(e,s)}}}}},79387: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}
212\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"}},91003: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}},10247:function(e,t,r){e.exports={ast:r(25655),circular:r(84804),ids:r(91003),parser:r(31141),stats:r(12618),trace:r(24410),utils:r(29090),emitcss:r(79387),style:r(60754)}},31141:function(e,t,r){e.exports=function(){let e,t,s,n,i;let o=r(91003),a=r(29090),l="parser.js: ",c=this;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let u=null,h=null,p=0,d=0,f=0,g=null,m=null,b=null,y=null,E=null,T=0,k=1/0,x=1/0,A=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}=u;u.push({type:o.RNM,index:t}),e(a,r,s),u.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}=u;u.push({type:o.UDT,empty:y[t].empty,index:t}),e(a,r,s),u.pop()},S=function(){p=0,d=0,f=0,T=0,i=[{lookAround:o.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],b=null,y=null,h=null,t=0,s=0,n=0,g=null,m=null,E=null,u=null},w=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)}()},M=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 w,this.pFrame=new w,this.evaluateRule=A,this.evaluateUdt=C,this.refresh=function(){e.state=o.ACTIVE,e.phraseLength=0,e.lookAround=i[i.length-1]}},O=function(){return i[i.length-1]},$=function(){return i.length>1},R=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,h)},v=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,h)},L=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)},N=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},B=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},_=function(e,r,i){let o=`${l}initializeInputChars(): `,c=e,u=r,p=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 u)u=0;else if((u=Math.floor(u))<0||u>c.length)throw Error(`${o}input beginning index out of range: ${u}`);if("number"!=typeof p)p=c.length-u;else if((p=Math.floor(p))<0||p>c.length-u)throw Error(`${o}input length out of range: ${p}`);h=c,n=(t=u)+(s=p)},P=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||(k=Math.floor(e))<=0)throw Error(`parser: max tree depth must be integer > 0: ${e}`)},this.setMaxNodeHits=function(e){if("number"!=typeof e||(x=Math.floor(e))<=0)throw Error(`parser: max n
212ode hits must be integer > 0: ${e}`)};let I=function(r,i,a){let c;let p=`${l}parse(): `;N(r);let g=B(i);P(),v(),L(),R();let m=new M;switch(null!=a&&(E=a),u=[{type:o.RNM,index:g}],e(0,t,m),u=null,m.state){case o.ACTIVE:throw Error(`${p}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:T,maxTreeDepth:d,nodeHits:f,inputLength:h.length,subBegin:t,subEnd:n,subLength:s}};this.parseSubstring=function(e,t,r,s,n,i){return S(),_(r,s,n),I(e,t,i)},this.parse=function(e,t,r,s){return S(),_(r,0,r.length),I(e,t,s)};let D=function(t,r,s){let n=u[t];for(let t=0;t<n.children.length&&(e(n.children[t],r,s),s.state===o.NOMATCH);t+=1);},H=function(t,r,s){let n,i,a,l;let h=u[t],p=s.uFrame.length(),d=s.pFrame.length();c.ast&&(i=c.ast.getLength()),n=!0,a=r,l=0;for(let t=0;t<h.children.length;t+=1){if(e(h.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(p),s.pFrame.pop(d),c.ast&&c.ast.setLength(i))},F=function(t,r,s){let i,a,l,h;let p=u[t];a=r,l=0,h=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&&(h+=1,l+=s.phraseLength,a+=s.phraseLength,h!==p.max)););s.state===o.EMPTY?(s.state=0===l?o.EMPTY:o.MATCH,s.phraseLength=l):h>=p.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,p,d,f;let m=u[t],y=b[m.index],T=g[y.index],k=!$();if(k&&((a=c.ast&&c.ast.ruleDefined(m.index))&&(i=c.ast.getLength(),c.ast.down(m.index,b[m.index].name)),p=s.uFrame.length(),d=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),f=s.pFrame,s.pFrame=new w),null===T)l=u,u=y.opcodes,e(0,r,s),u=l;else{let t=n-r;s.ruleIndex=y.index,T(s,h,r,E),K(y,s,t,!0),s.state===o.ACTIVE&&(l=u,u=y.opcodes,e(0,r,s),u=l,s.ruleIndex=y.index,T(s,h,r,E),K(y,s,t,!1))}k&&(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(p),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.`);t.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}`)}},j=function(e,t,r){let s,i,a,l,p,d;let f=u[e],g=y[f.index];r.UdtIndex=g.index;let T=!$();T&&((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(),p=r.pFrame.length(),r.uFrame.push(),r.pFrame.push(),d=r.pFrame,r.pFrame=new w);let k=n-t;m[f.index](r,h,t,E),G(g,r,k),T&&(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(p)):g.isBkr&&(r.pFrame.savePhrase(g.lower,t,r.phraseLength),r.uFrame.savePhrase(g.lower,t,r.phraseLength)))},V=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=h.length,s=h.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.E
212MPTY;break;case o.NOMATCH:l.state=o.NOMATCH;break;default:throw Error(`opAND: invalid state ${l.state}`)}},z=function(r,a,l){i.push({lookAround:o.LOOKAROUND_AHEAD,anchor:a,charsEnd:n,charsLength:s}),n=h.length,s=h.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}`)}},Y=function(e,t,r){let s=u[e];r.state=o.NOMATCH,t<n&&s.min<=h[t]&&h[t]<=s.max&&(r.state=o.MATCH,r.phraseLength=1)},q=function(e,t,r){let s;let i=u[e],a=i.string.length;if(r.state=o.NOMATCH,t+a<=n){for(s=0;s<a;s+=1)if(h[t+s]!==i.string[s])return;r.state=o.MATCH,r.phraseLength=a}},Q=function(e,t,r){let s,i;let a=u[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=h[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},J=function(e,t,r){r.state=o.NOMATCH,r.phraseLength=0,r.state=t===h.length?o.EMPTY:o.NOMATCH},X=function(e,t,r){let s,i,a,l;let c=u[e];r.state=o.NOMATCH,l=c.index<b.length?b[c.index].lower:y[c.index-b.length].lower;let p=c.bkrMode===o.BKR_MODE_PM?r.pFrame.getPhrase(l):r.uFrame.getPhrase(l),d=c.bkrCase===o.BKR_MODE_CI;if(null===p)return;let f=p.phraseIndex,g=p.phraseLength;if(0===g){r.state=o.EMPTY;return}if(t+g<=n){if(d){for(s=0;s<g;s+=1)if(i=h[t+s],a=h[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=h[t+s])!==(a=h[f+s]))return;r.state=o.MATCH,r.phraseLength=g}},Z=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 h=u[t],p=s.uFrame.length(),d=s.pFrame.length();c.ast&&(i=c.ast.getLength()),n=!0,a=r,l=0;for(let t=h.children.length-1;t>=0;t-=1)if(e(h.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(p),s.pFrame.pop(d),c.ast&&c.ast.setLength(i))},er=function(t,r,s){let n,i,a,l;let h=u[t];i=r,a=0,l=0;let p=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!==h.max)););s.state===o.EMPTY?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):l>=h.min?(s.state=0===a?o.EMPTY:o.MATCH,s.phraseLength=a):(s.state=o.NOMATCH,s.phraseLength=0,s.uFrame.pop(p),s.pFrame.pop(d),c.ast&&c.ast.setLength(n))},es=function(e,t,r){let s=u[e];if(r.state=o.NOMATCH,r.phraseLength=0,t>0){let e=h[t-1];s.min<=e&&e<=s.max&&(r.state=o.MATCH,r.phraseLength=1)}},en=function(e,t,r){let s;let n=u[e];r.state=o.NOMATCH;let i=n.string.length,a=t-i;if(a>=0){for(s=0;s<i;s+=1)if(h[a+s]!==n.string[s])return;r.state=o.MATCH,r.phraseLength=i}},ei=function(e,t,r){let s;let n=u[e];r.state=o.NOMATCH;let i=n.string.length;if(0===i){r.state=o.EMPTY;return}let a=t-i;if(a>=0){for(let e=0;e<i;e+=1)if((s=h[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=u[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),p=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(p){for(s=0;s<f;s+=1)if(n=h[g+s],i=h[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=h[g+s])!==(i=h[d+s]))return;r.state=o.MATCH,r.phraseLength=f}};e=function(e,t,r){let s=!0,n=u[e];
212if((f+=1)>x)throw Error(`parser: maximum number of node hits exceeded: ${x}`);if((p+=1)>d&&(d=p)>k)throw Error(`parser: maximum parse tree depth exceeded: ${k}`);if(r.refresh(),null!==c.trace){let e=O();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:D(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:j(e,t,r);break;case o.AND:V(e,t,r);break;case o.NOT:z(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:Z(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:W(e,t,r);break;case o.AEN:J(e,t,r);break;default:s=!1}else switch(n.type){case o.ALT:D(e,t,r);break;case o.CAT:H(e,t,r);break;case o.REP:F(e,t,r);break;case o.RNM:U(e,t,r);break;case o.UDT:j(e,t,r);break;case o.AND:V(e,t,r);break;case o.NOT:z(e,t,r);break;case o.TRG:Y(e,t,r);break;case o.TBS:q(e,t,r);break;case o.TLS:Q(e,t,r);break;case o.BKR:X(e,t,r);break;case o.BKA:Z(e,t,r);break;case o.BKN:ee(e,t,r);break;case o.ABG:W(e,t,r);break;case o.AEN:J(e,t,r);break;default:s=!1}if(!$()&&t+r.phraseLength>T&&(T=t+r.phraseLength),null!==c.stats&&c.stats.collect(n,r),null!==c.trace){let e=O();c.trace.up(n,r.state,t,r.phraseLength,e.anchor,e.lookAround)}return p-=1,s}}},12618:function(e,t,r){e.exports=function(){let e;let t=r(91003),s=r(29090),n=r(60754),i=[],o=[],a=[],l=[],c=[];this.statsObject="statsObject";let u=function(e,t){return e.lower<t.lower?-1:e.lower>t.lower?1:0},h=function(e,t){return e.total<t.total?1:e.total>t.total?-1:u(e,t)},p=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> 213`},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> 214`);if(o.length>0){e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n<tr><th>udts</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> 215`)}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}"> 216`,"string"==typeof t&&(r+=`<caption>${t}</caption> 217`),r+=`<tr><th class="${n.CLASS_ACTIVE}">ops</th> 218<th class="${n.CLASS_EMPTY}">EMPTY</th> 219<th class="${n.CLASS_MATCH}">MATCH</th> 220<th class="${n.CLASS_NOMATCH}">NOMATCH</th> 221<th class="${n.CLASS_ACTIVE}">totals</th></tr> 222`;;){if(null==e||"ops"===e){r+=b();break}if("index"===e){l.sort(p),c.length>
2220&&c.sort(p),r+=b()+y();break}if("hits"===e){l.sort(h),c.length>0&&c.sort(p),r+=b()+y();break}"alpha"===e&&(l.sort(u),c.length>0&&c.sort(u),r+=b()+y());break}return r+"</table>\n"},this.toHtmlPage=function(e,t,r){return s.htmlToPage(this.toHtml(e,t),r)}}},60754: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"}},24410:function(e,t,r){e.exports=function(){let e=r(29090),t=r(60754),s=new(r(84804)),n=r(91003),i="trace.js: ",o=this,a=[],l=5e3,c=-1,u=0,h=0,p=[],d=null,f=null,g=null,m=[],b=[],y=`<span class="${t.CLASS_LINEEND}">•</span>`,E=`<span class="${t.CLASS_LINEEND}">…</span>`,T=`<span class="${t.CLASS_EMPTY}">𝜺</span>`,k=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`)}},x=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,p.length=0,u=0,h=0,d=r,f=e,g=t,k(),x(),s.init(l)};let A=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};this.down=function(e,t,r,n,i,o){C(u)&&A(e)&&(p.push(u),a[s.increment()]={dirUp:!1,depth:h,thisLine:u,thatLine:void 0,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},u+=1,h+=1)},this.up=function(e,t,r,n,i,o){if(C(u)&&A(e)){let l=u,c=p.pop(),d=s.getListIndex(c);-1!==d&&(a[d].thatLine=l),h-=1,a[s.increment()]={dirUp:!0,depth:h,thisLine:l,thatLine:c,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:i,lookAround:o},u+=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 u(e,t,r){return e===n.MATCH?{index:t,length:r}
222:e===n.NOMATCH||e===n.EMPTY?{index:t,length:0}:null}let p=-1;function m(t,r,s){let n={id:p++,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=u(),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=u(r.state,r.phraseIndex,r.phraseLength),t.down||c(t,r.opcode))}let y=0,E=-1,T=1,k=[],x=!0,A=m(null,null,-1);for(k.push(A),r=A,s.forEach(e=>{if(o=a[e],x&&(x=!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),k.push(r),i.children.push(r)}o.dirUp?(b(r=k.pop(),o),r=k[k.length-1]):(i=r,r=m(r,o,o.depth),k.push(r),i.children.push(r))});k.length>1;)b(r=k.pop(),null);if(0===A.children.length)throw Error("trace.toTree(): parse tree has no nodes");if(0===k.length)throw Error("trace.toTree(): integrity check: dummy root node disappeared?");let C=t=A.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(E+=1,t.branch=T,E>h&&(h=E),0===t.children.length)y+=1;else for(let r=0;r<t.children.length;r+=1)r>0&&(T+=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]);E-=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=h,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 w=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> 223<table class="${t.CLASS_TRACE}"> 224`,"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 M=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},O=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},$=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+=E)}return r},R=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?s+=`${(e=i-32).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();
224n<r.string.length&&(s+=E)}else{s='"';for(let t=0;t<n;t+=1)s+=e.asciiChars[r.string[t]];n<r.string.length&&(s+=E),s+='"'}}return s},v=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},L=function(e,r,s,i,o,a){let l,c,u,h,p="",d=y,f=`<span class="${t.CLASS_LOOKBEHIND}">`,g=`<span class="${t.CLASS_REMAINDER}">`,m="</span>",b=!1;switch(s){case n.EMPTY:p+=T;case n.NOMATCH:case n.MATCH:case n.ACTIVE:c=a-(l=i-o),u=a,h=r.length-u;break;default:throw Error("unrecognized state")}return d=y,c>80?(c=80,d=E,h=0):c+h>80&&(d=E,h=80-c),c>0&&(p+=f+v(e,r,l,c,b)+m,b=!0),h>0&&(p+=g+v(e,r,u,h,b)+m),p+d},N=function(e,r,s,i,o,a){let l,c,u,h,p="",d=y,f=`<span class="${t.CLASS_REMAINDER}">`,g="</span>",m=!1;switch(s){case n.EMPTY:p+=T;case n.NOMATCH:case n.ACTIVE:l=i,c=0,u=i,h=r.length-u;break;case n.MATCH:l=i,u=i+(c=o),h=r.length-u;break;default:throw Error("unrecognized state")}return d=y,c>80?(c=80,d=E,h=0):c+h>80&&(d=E,h=80-c),c>0&&(p+=a+v(e,r,l,c,m)+g,m=!0),h>0&&(p+=f+v(e,r,u,h,m)+g),p+d},B=function(e,r,s,n,i){let o=`<span class="${t.CLASS_LOOKAHEAD}">`;return N(e,r,s,n,i,o)},_=function(e,r,s,n,i){let o=`<span class="${t.CLASS_MATCH}">`;return N(e,r,s,n,i,o)},P=function(r){let i,l,c,u,h,p;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,u=!1,h=!1,b.lookAround===n.LOOKAROUND_AHEAD&&(c=!0,h=!0,p=b.lookAnchor),(b.opcode.type===n.AND||b.opcode.type===n.NOT)&&(c=!0,h=!0,p=b.phraseIndex),b.lookAround===n.LOOKAROUND_BEHIND&&(u=!0,h=!0,p=b.lookAnchor),(b.opcode.type===n.BKA||b.opcode.type===n.BKN)&&(u=!0,h=!0,p=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}">`:u&&(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+=`(${M(r,b.opcode)}) `),b.opcode.type===n.TBS&&(m+=`(${$(r,b.opcode)}) `),b.opcode.type===n.TLS&&(m+=`(${R(r,b.opcode)}) `),b.opcode.type===n.REP&&(m+=`(${O(r,b.opcode)}) `),h&&(m+="</span>"),m+="</td><td>",u?m+=L(r,d,b.state,b.phraseIndex,b.phraseLength,p):c?m+=B(r,d,b.state,b.phraseIndex,b.phraseLength):m+=_(r,d,b.state,b.phraseIndex,b.phraseLength),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 w(s,r)+P(s)+""+`</table> 225<p class="${t.CLASS_MONOSPACE}">legend:<br> 226(a) - line number<br> 227(b) - matching line number<br> 228(c) - phrase offset<br> 229(d) - phrase length<br> 230(e) - tree depth<br> 231(f) - operator state<br> 232 - <span class="${t.CLASS_ACTIVE}">↓</span> phrase opened<br> 233 - <span class="${t.CLASS_MATCH}">↑M</span> phrase matched<br> 234 - <span class="${t.CLASS_EMPTY}">↑E</span> empty phrase matched<br> 235 - <span class="${t.CLASS_NOMATCH}">↑N</span> phrase not matched<br> 236operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br> 237phrase - up to 80 characters of the phrase being matched<br> 238 - <span class="${t.CLASS_MATCH}">matched characters</span><br> 239 - <span class="${t.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br> 240 - <span class="${t.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br> 241 - <span class="${t.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br> 242 - <span class="${t.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br> 243 - ${T} empty string<br> 244 - ${y} end of input string<br> 245 - ${E} input string display truncated<br> 246</p> 247<p class="${t.CLASS_MONOSPACE}"> 248<sup>†</sup>original ABNF operators:<br> 249ALT - alternation<br> 250CAT - concatenation<br> 251REP - repetition<br> 252RNM - rule name<br> 253TRG - terminal range<br> 254TLS - terminal literal string (case insensitive)<br> 255TBS - terminal binary string (case sensitive)<br> 256<br> 257<sup>‡</sup>super set SABNF operators:<br> 258UDT - user-defined terminal<br> 259AND - positive look ahead<br> 260NOT - negative look ahead<br> 261BKA - positive look behind<br> 262BKN - negative look behind<br> 263BKR - back reference<br> 264ABG - anchor - begin of input string<br> 265AEN - anchor - end of input string<br> 266</p> 267`}}},29090:function(e,t,r){let s=r(60754),n=r(14562),i=r(79387),o=r(91003),a="utilities.js: ",l=this,c=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){if("string"!=typeof e)throw Error(`${a}htmlToPage: input HTML is not a string`);return`<!DOCTYPE html> 268<html lang="en"> 269<head> 270<meta charset="utf-8"> 271<title>${"string"!=typeof t?"htmlToPage":t}</title> 272<style> 273`+i()+"</style>\n</head>\n<body>\n"+`<p>${new Date}</p> 274`+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}">
274false</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}"> 275`,i&&(a+=`<caption>${i}</caption> 276`),a+=`<tr><th>state item</th><th>value</th><th>description</th></tr> 277<tr><td>parser success</td><td>${r}</td> 278<td><span class="${s.CLASS_MATCH}">true</span> if the parse succeeded, 279 <span class="${s.CLASS_NOMATCH}">false</span> otherwise<br><i>NOTE: for success, entire string must be matched</i></td></tr> 280<tr><td>parser state</td><td>${n}</td> 281<td><span class="${s.CLASS_EMPTY}">EMPTY</span>, <span class="${s.CLASS_MATCH}">MATCH</span> or 282<span class="${s.CLASS_NOMATCH}">NOMATCH</span></td></tr> 283<tr><td>string length</td><td>${e.length}</td><td>length of the input (sub)string</td></tr> 284<tr><td>matched length</td><td>${e.matched}</td><td>number of input string characters matched</td></tr> 285<tr><td>max matched</td><td>${e.maxMatched}</td><td>maximum number of input string characters matched</td></tr> 286<tr><td>max tree depth</td><td>${e.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr> 287<tr><td>node hits</td><td>${e.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr> 288<tr><td>input length</td><td>${e.inputLength}</td><td>length of full input string</td></tr> 289<tr><td>sub-string begin</td><td>${e.subBegin}</td><td>sub-string first character index</td></tr> 290<tr><td>sub-string end</td><td>${e.subEnd}</td><td>sub-string end-of-string index</td></tr> 291<tr><td>sub-string length</td><td>${e.subLength}</td><td>sub-string length</td></tr> 292</table> 293`},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=c(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,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToHex: input must be an array of integers`);let n=c(e.length,t,r);if(n.end>n.beg){s+=`\\x${l.charToHex(e[n.beg])}`;for(let t=n.beg+1;t<n.end;t+=1)s+=`,\\x${l.charToHex(e[t])}`}return s},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=c(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,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToUnicode: input must be an array of integers`);let n=c(e.length,t,r);if(n.end>n.beg)for(let t=n.beg;t<n.end;t+=1){var i;((i=e[t])>=55296&&i<=57343||i>1114111?1:0)?s+=` U+${l.charToHex(e[t])}`:s+=`&#${e[t]};`}return s},t.charsToJsUnicode=function(e,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToJsUnicode: input must be an array of integers`);let n=c(e.length,t,r);if(n.end>n.beg){s+=`\\u${l.charToHex(e[n.beg])}`;for(let t=n.beg+1;t<n.end;t+=1)s+=`,\\u${l.charToHex(e[t])}`}return s},t.charsToAscii=function(e,t,r){let s="";if(!Array.isArray(e))throw Error(`${a}charsToAscii: input must be an array of integers`);let n=c(e.length,t,r);for(let t=n.beg;t<n.end;t+=1){let r=e[t];r>=32&&r<=126?s+=String.fromCharCode(r):s+=`\\x${l.charToHex(r)}`}return s},t.charsToAsciiHtml=function(e,t,r){let n;if(!Array.isArray(e))throw Error(`${a}charsToAsciiHtml: input must be an array of integers`);let i="",o=c(e.length,t,r);for(let t=o.beg;t<o.end;t+=1)(n=e[t])<32||127===n?i+=`<span class="${s.CLASS_CTRLCHAR}">${l.asciiChars[n]}</span>`:n>127?i+=`<span class="${s.CLASS_CTRLCHAR}">U+${l.charToHex(n)}</span>`:i+=l.asciiChars[n];return i},t.stringToAsciiHtml=function(e){let t=n.decode("STRING",e);return this.charsToAsciiHtml(t)}},82312:function(e,t,r){"use strict";r.r(t),r.d(t,{BaseContract:function(){return i.VZ},BigNumber:function(){return o.O$},Contract:function(){return i.CH},ContractFactory:function(){return i.lV},FixedNumber:function(){return a.xs},Signer:function(){return l.E},VoidSigner:function(){return l.b},Wallet:function(){return c.Wallet},Wordlist:function(){return ee.D},constants:function(){return u},errors:function(){return b.ErrorCode},ethers:function(){return n},getDefaultProvider:function(){return X},logger:function(){return es},providers:function(){return s},utils:function(){return et},version:function(){return er},wordlists:function(){return Z.E}});var s={};
293r.r(s),r.d(s,{AlchemyProvider:function(){return f.D},AlchemyWebSocketProvider:function(){return f.V},AnkrProvider:function(){return k},BaseProvider:function(){return d.Zk},CloudflareProvider:function(){return A},EtherscanProvider:function(){return _},FallbackProvider:function(){return P.H},Formatter:function(){return g.Mb},InfuraProvider:function(){return U},InfuraWebSocketProvider:function(){return K},IpcProvider:function(){return I},JsonRpcBatchProvider:function(){return j},JsonRpcProvider:function(){return G.r},JsonRpcSigner:function(){return G.C},NodesmithProvider:function(){return z},PocketProvider:function(){return Q},Provider:function(){return h.zt},Resolver:function(){return d.H2},StaticJsonRpcProvider:function(){return m.c},UrlJsonRpcProvider:function(){return m.l},Web3Provider:function(){return W.Q},WebSocketProvider:function(){return D.q},getDefaultProvider:function(){return X},getNetwork:function(){return p.H},isCommunityResourcable:function(){return g.Ed},isCommunityResource:function(){return g.Gp},showThrottleMessage:function(){return g.vh}});var n={};r.r(n),r.d(n,{BaseContract:function(){return i.VZ},BigNumber:function(){return o.O$},Contract:function(){return i.CH},ContractFactory:function(){return i.lV},FixedNumber:function(){return a.xs},Signer:function(){return l.E},VoidSigner:function(){return l.b},Wallet:function(){return c.Wallet},Wordlist:function(){return ee.D},constants:function(){return u},errors:function(){return b.ErrorCode},getDefaultProvider:function(){return X},logger:function(){return es},providers:function(){return s},utils:function(){return et},version:function(){return er},wordlists:function(){return Z.E}});var i=r(30171),o=r(10528),a=r(49222),l=r(28612),c=r(61),u=r(41175),h=r(35239),p=r(62678),d=r(58171),f=r(49393),g=r(44520),m=r(68930),b=r(57036),y=r(75707);let E=new b.Logger(y.i),T="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class k extends m.l{isCommunityResource(){return this.apiKey===T}static getApiKey(e){return null==e?T:e}static getUrl(e,t){null==t&&(t=T);let r={allowGzip:!0,url:"https://"+function(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return E.throwArgumentError("unsupported network","name",e)}(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===T&&(0,g.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}let x=new b.Logger(y.i);class A extends m.l{static getApiKey(e){return null!=e&&x.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;return"homestead"===e.name?r="https://cloudflare-eth.com/":x.throwArgumentError("unsupported network","network",arguments[0]),r}perform(e,t){var r,s,n,i;let o=Object.create(null,{perform:{get:()=>super.perform}});return r=this,s=void 0,n=void 0,i=function*(){if("getBlockNumber"===e){let e=yield o.perform.call(this,"getBlock",{blockTag:"latest"});return e.number}return o.perform.call(this,e,t)},new(n||(n=Promise))(function(e,t){function o(e){try{l(i.next(e))}catch(e){t(e)}}function a(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(o,a)}l((i=i.apply(r,s||[])).next())})}}var C=r(75398),S=r(84427),w=r(13353),M=r(38637),O=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())})};let $=new b.Logger(y.i);function R(e){let t={};for(let r in e){if(null==e[r])continue;let s=e[r];("type"!==r||0!==s)&&(s=({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0})[r]?(0,C.hexValue)((0,C.hexlify)(s)):"accessList"===r?"["+(0,w.accessListify)(s).map(e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`).join(",")+"]":(0,C.hexlify)(s),t[r]=s)}return t}
293function v(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){let t=Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function L(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){let t=Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){let t=Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){let t=Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function N(e){if("pending"===e)throw Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function B(e,t,r){if("call"===e&&t.code===b.Logger.errors.SERVER_ERROR){let e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,C.isHexString)(r))return r;$.throwError("missing revert data in call exception",b.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let s=t.message;throw t.code===b.Logger.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?s=t.error.message:"string"==typeof t.body?s=t.body:"string"==typeof t.responseText&&(s=t.responseText)),(s=(s||"").toLowerCase()).match(/insufficient funds/)&&$.throwError("insufficient funds for intrinsic transaction cost",b.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),s.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&$.throwError("nonce has already been used",b.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),s.match(/another transaction with same nonce/)&&$.throwError("replacement fee too low",b.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),s.match(/execution failed due to an exception|execution reverted/)&&$.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class _ extends d.Zk{constructor(e,t){super(e),(0,S.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,S.defineReadOnly)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return $.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let r=Object.keys(t).reduce((e,r)=>{let s=t[r];return null!=s&&(e+=`&${r}=${s}`),e},""),s=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${s}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return O(this,void 0,void 0,function*(){let s=r?this.getPostUrl():this.getUrl(e,t),n=r?this.getPostData(e,t):null;this.emit("debug",{action:"request",request:s,provider:this});let i={url:s,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,g.vh)(),Promise.resolve(!0))},o=null;n&&(i.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},o=Object.keys(n).map(e=>`${e}=${n[e]}`).join("&"));let a=yield(0,M.fetchJson)(i,o,("proxy"===e?L:v)||L);return this.emit("debug",{action:"response",request:s,response:(0,S.deepCopy)(a),provider:this}),a})}detectNetwork(){return O(this,void 0,void 0,function*(){return this.network})}perform(e,t){let r=Object.create(null,{perform:{get:()=>super.perform}});return O(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(e=>B("sendTransaction",e,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw Error("EtherscanProvider does not support blockTag for call");let e=R(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return B("call",e,t.transaction)}}case"estimateGas":{let e=R(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return B("estimateGas",e,t.transaction)}}case"getLogs":{let e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=N(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=N(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&$.throwError("unsupported topic count",b.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){let r=t.filter.topics[0];("string"!=typeof r||66!==r.length)&&$.throwError("unsupported topic format",b.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}let r=yield this.fetch("logs",e),s={};for(let e=0;e<r.length;e++){let t=r[e];if(null==t.blockHash){if(null==s[t.blockNumber]){let e=yield this.getBlock(t.blockNumber);e&&(s[t.blockNumber]=e.hash)}t.blockHash=s[t.blockNumber]}}return r}case"getEtherPrice":if("homestead"!==this.network.name)return 0;return parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return r.perform.call(this,e,t)})}getHistory(e,t,r){return O(this,void 0,void 0,function*(){let s={action:"txlist",address:yield this.resolveName(e),startblock:null==t?0:t,endblock:null==r?99999999:r,sort:"asc"},n=yield this.fetch("account",s);return n.map(e=>{["contractAddress","to"].forEach(function(t){""==e[t]&&delete e[t]}),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);let t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t})})}isCommunityResource(){return null==this.apiKey}}var P=r(97477);let I=null;var D=r(40552);let H=new b.Logger(y.i),F="84842078b09946638c03157f83405213";class K extends D.q{constructor(e,t){let r=new U(e,t),s=r.connection;s.password&&H.throwError("INFURA WebSocket project secrets unsupported",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let n=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(n,e),(0,S.defineReadOnly)(this,"apiKey",r.projectId),(0,S.defineReadOnly)(this,"projectId",r.projectId),(0,S.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===F}}class U extends m.l{static getWebSocketProvider(e,t){return new K(e,t)}static getApiKey(e){let t={apiKey:F,projectId:F,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(H.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),H.assertArgument("string"==typeof e.projectSecret,"invali
293d projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:H.throwError("unsupported network",b.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let s={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===F&&(0,g.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(s.user="",s.password=t.projectSecret),s}isCommunityResource(){return this.projectId===F}}var G=r(1005);class j extends G.r{send(e,t){let r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);let s={request:r,resolve:null,reject:null},n=new Promise((e,t)=>{s.resolve=e,s.reject=t});return this._pendingBatch.push(s),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{let e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let t=e.map(e=>e.request);return this.emit("debug",{action:"requestBatch",request:(0,S.deepCopy)(t),provider:this}),(0,M.fetchJson)(this.connection,JSON.stringify(t)).then(r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach((e,t)=>{let s=r[t];if(s.error){let t=Error(s.error.message);t.code=s.error.code,t.data=s.error.data,e.reject(t)}else e.resolve(s.result)})},r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach(e=>{e.reject(r)})})},10)),n}}let V=new b.Logger(y.i);class z extends m.l{static getApiKey(e){return e&&"string"!=typeof e&&V.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){V.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:V.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}let Y=new b.Logger(y.i),q="62e1ad51b37b8e00394bda3b";class Q extends m.l{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=q:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Y.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:Y.throwError("unsupported network",b.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let s=`https://${r}/v1/lb/${t.applicationId}`,n={headers:{},url:s};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===q}}var W=r(8550);let J=new b.Logger(y.i);function X(e,t){if(null==e&&(e="homestead"),"string"==typeof e){let t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new G.r(e);case"ws":case"wss":return new D.q(e);default:J.throwArgumentError("unsupported URL scheme","network",e)}}let r=(0,p.H)(e);return r&&r._defaultProvider||J.throwError("unsupported getDefaultProvider network",b.Logger.errors.NETWORK_E
293RROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:P.H,AlchemyProvider:f.D,AnkrProvider:k,CloudflareProvider:A,EtherscanProvider:_,InfuraProvider:U,JsonRpcProvider:G.r,NodesmithProvider:z,PocketProvider:Q,Web3Provider:W.Q,IpcProvider:I},t)}var Z=r(56279),ee=r(17503),et=r(95958);let er="ethers/5.7.2",es=new b.Logger(er);try{let e=window;null==e._ethers&&(e._ethers=n)}catch(e){}},34034: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())})};Object.defineProperty(t,"__esModule",{value:!0}),t.generateNonce=t.checkContractWalletSignature=t.SiweMessage=t.SignatureType=t.ErrorTypes=void 0;let o=r(81293),a=r(82312),l=r(39755);(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){let t=new l.ParsedMessageRegExp(e);return t.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="Chain ID: "+this.chainId,o=`Nonce: ${this.nonce}`,a=[r,n,i,o];if(this.issuedAt&&Date.parse(this.issuedAt),this.issuedAt=this.issuedAt?this.issuedAt:new Date().toISOString(),a.push(`Issued At: ${this.issuedAt}`),this.expirationTime){let e=`Expiration Time: ${this.expirationTime}`;a.push(e)}this.notBefore&&a.push(`Not Before: ${this.notBefore}`),this.requestId&&a.push(`Request ID: ${this.requestId}`),this.resources&&a.push(["Resources:",...this.resources.map(e=>`- ${e}`)].join("\n"));let l=a.join("\n");return s=[s,this.statement].join("\n\n"),this.statement&&(s+="\n"),[s,l].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=[];
293if(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{let s=yield(0,t.checkContractWalletSignature)(this,e,r);if(!s)throw Error(`${n.INVALID_SIGNATURE}: ${o} !== ${this.address}`)}catch(e){throw e}}let u=new c(i);if(u.expirationTime){let e=new Date(u.expirationTime).getTime();if(isNaN(e))throw Error(`${n.MALFORMED_SESSION} invalid expiration date.`);if(new Date().getTime()>=e)throw Error(n.EXPIRED_MESSAGE)}s(u)}catch(e){o(e)}}))})}}t.SiweMessage=c;let u=(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.checkContractWalletSignature=u;let h=()=>(0,o.randomStringForEntropy)(96);t.generateNonce=h},41845: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(34034),t)},66252:function(e,t,r){"use strict";r.d(t,{x:function(){return o}});var s=r(97450),n=r(2784),i=r(85317);function o(e){var t=(0,n.useContext)((0,i.K)()),r=e||t.client;return __DEV__?(0,s.kG)(!!r,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):(0,s.kG)(!!r,32),r}},73359:function(e,t,r){"use strict";r.d(t,{t:function(){return c}});var s=r(5163),n=r(2784),i=r(14012),o=r(37887),a=r(66252),l=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore"];function c(e,t){var r,c=(0,n.useRef)(),u=(0,n.useRef)(),h=(0,n.useRef)(),p=c.current?(0,i.J)(t,c.current):t,d=null!==(r=null==p?void 0:p.query
293)&&void 0!==r?r:e;u.current=p,h.current=d;var f=(0,o.A)((0,a.x)(t&&t.client),d),g=f.useQuery((0,s.__assign)((0,s.__assign)({},p),{skip:!c.current})),m=g.observable.options.initialFetchPolicy||f.getDefaultFetchPolicy(),b=Object.assign(g,{called:!!c.current}),y=(0,n.useMemo)(function(){for(var e={},t=0;t<l.length;t++)!function(t){var r=b[t];e[t]=function(){return c.current||(c.current=Object.create(null),f.forceUpdate()),r.apply(this,arguments)}}(l[t]);return e},[]);return Object.assign(b,y),[(0,n.useCallback)(function(e){c.current=e?(0,s.__assign)((0,s.__assign)({},e),{fetchPolicy:e.fetchPolicy||m}):{fetchPolicy:m};var t=(0,i.J)(u.current,(0,s.__assign)({query:h.current},c.current)),r=f.executeQuery((0,s.__assign)((0,s.__assign)({},t),{skip:!1})).then(function(e){return Object.assign(e,y)});return r.catch(function(){}),r},[]),b]}},50319:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var s=r(5163),n=r(2784),i=r(14012),o=r(38229),a=r(14692),l=r(30990),c=r(66252);function u(e,t){var r=(0,c.x)(null==t?void 0:t.client);(0,a.Vp)(e,a.n_.Mutation);var u=(0,n.useState)({called:!1,loading:!1,client:r}),h=u[0],p=u[1],d=(0,n.useRef)({result:h,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});Object.assign(d.current,{client:r,options:t,mutation:e});var f=(0,n.useCallback)(function(e){void 0===e&&(e={});var t=d.current,r=t.options,n=t.mutation,a=(0,s.__assign)((0,s.__assign)({},r),{mutation:n}),c=e.client||d.current.client;d.current.result.loading||a.ignoreResults||!d.current.isMounted||p(d.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:c});var u=++d.current.mutationId,h=(0,i.J)(a,e);return c.mutate(h).then(function(t){var r,s=t.data,n=t.errors,i=n&&n.length>0?new l.cA({graphQLErrors:n}):void 0;if(u===d.current.mutationId&&!h.ignoreResults){var a={called:!0,loading:!1,data:s,error:i,client:c};d.current.isMounted&&!(0,o.D)(d.current.result,a)&&p(d.current.result=a)}var f=e.onCompleted||(null===(r=d.current.options)||void 0===r?void 0:r.onCompleted);return null==f||f(t.data,h),t}).catch(function(t){if(u===d.current.mutationId&&d.current.isMounted){var r,s={loading:!1,error:t,data:void 0,called:!0,client:c};(0,o.D)(d.current.result,s)||p(d.current.result=s)}var n=e.onError||(null===(r=d.current.options)||void 0===r?void 0:r.onError);if(n)return n(t,h),{data:void 0,errors:t};throw t})},[]),g=(0,n.useCallback)(function(){d.current.isMounted&&p({called:!1,loading:!1,client:r})},[]);return(0,n.useEffect)(function(){return d.current.isMounted=!0,function(){d.current.isMounted=!1}},[]),[f,(0,s.__assign)({reset:g},h)]}},37887:function(e,t,r){"use strict";r.d(t,{A:function(){return A},a:function(){return x}});var s=r(5163),n=r(97450),i=r(2784),o=r.t(i,2),a=r(30320),l=!1,c=o.useSyncExternalStore||function(e,t,r){var s=t();__DEV__&&!l&&s!==t()&&(l=!0,__DEV__&&n.kG.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=i.useState({inst:{value:s,getSnapshot:t}}),c=o[0].inst,h=o[1];return a.JC?i.useLayoutEffect(function(){Object.assign(c,{value:s,getSnapshot:t}),u(c)&&h({inst:c})},[e,s,t]):Object.assign(c,{value:s,getSnapshot:t}),i.useEffect(function(){return u(c)&&h({inst:c}),e(function(){u(c)&&h({inst:c})})},[e]),s};function u(e){var t=e.value,r=e.getSnapshot;try{return t!==r()}catch(e){return!0}}var h=r(38229),p=r(14012),d=r(85317),f=r(30990),g=r(1644),m=r(14692),b=r(66252),y=r(10542),E=r(53712),T=r(21436),k=Object.prototype.hasOwnProperty;function x(e,t){return void 0===t&&(t=Object.create(null)),A((0,b.x)(t.client),e).useQuery(t)}function A(e,t){var r=(0,i.useRef)();r.current&&e===r.current.client&&t===r.current.query||(r.current=new C(e,t,r.current));var s=r.current,n=(0,i.useState)(0),o=(n[0],n[1]);return s.forceUpdate=function(){o(function(e){return e+1})},s}var C=function(){function e(e,t,r){this.client=e,this.query=t,this.ssrDisabledResult=(0,y.J)({loading:!0,data:void 0,error:void 0,networkStatus:g.I.loading}),this.skipStandbyResult=(0,y.J)({loading:!1,data:void 0,error:void 0,networkStatus:g.I.ready}),this.toQueryResultCache=new(a.mr?WeakMap:Map),(0,m.Vp)(t,m.n_.Query);var s=r&&r.result,n=s&&s.data;n&&(this.previousData=n)}return e.prototype.forceUpdate=function(){__DEV__&&n.kG.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.executeQuery=function(e){var t,r=this;e.query&&Object.assign(this,{query:e.query}),this.watchQueryOptions=this.createWatchQueryOptions(this.queryHookOptions=e);var s=this.observable.reobserveAsConcast(this.getObsQueryOptions());return this.previousData=(null===(t=this.result)||void 0===t?void 0:t.data)||this.previousData,this.result=void 0,this.forceUpdate(),new Promise(function(e){var t;s.subscribe({next:function(e){t=e},error:function(){e(r.toQueryResult(r.observable.getCurrentResult()))},complete:function(){e(r.toQueryResult(t))}})})},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,i.useContext)((0,d.K)()).renderPromises,this.useOptions(e);var r=this.useObservableQuery(),s=c((0,i.useCallback)(function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,s=r.getCurrentResult();e&&e.loading===s.loading&&e.networkStatus===s.networkStatus&&(0,h.D)(e.data,s.data)||t.setResult(s)},s=function(i){var o=r.last;n.unsubscribe();try{r.resetLastResults(),n=r.subscribe(e,s)}finally{r.last=o}if(!k.call(i,"graphQLErrors"))throw i;var a=t.result;(!a||a&&a.loading||!(0,h.D)(i,a.error))&&t.setResult({data:a&&a.data,error:i,loading:!1,networkStatus:g.I.error})},n=r.subscribe(e,s);return function(){return setTimeout(function(){return n.unsubscribe()})}},[r,this.renderPromises,this.client.disableNetworkFetches]),function(){return t.getCurrentResult()},function(){return t.getCurrentResult()});return this.unsafeHandlePartialRefetch(s),this.toQueryResult(s)},e.prototype.useOptions=function(t){var r,s=this.createWatchQueryOptions(this.queryHookOptions=t),n=this.watchQueryOptions;!(0,h.D)(s,n)&&(this.watchQueryOptions=s,n&&this.observable&&(this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(r=this.result)||void 0===r?void 0:r.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,(this.renderPromises||this.client.disableNetworkFetches)&&!1===this.queryHookOptions.ssr&&!this.queryHookOptions.skip?this.result=this.ssrDisabledResult:this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:(this.result===this.ssrDisabledResult||this.result===this.skipStandbyResult)&&(this.result=void 0)},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push((0,E.o)(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(p.J)},e.prototype.createWatchQueryOptions=function(e){void 0===e&&(e={});var t,r=e.skip,n=Object.assign((e.ssr,e.onCompleted,e.onError,e.defaultOptions,(0,s.__rest)(e,["skip","ssr","onCompleted","onError","defaultOptions"])),{query:this.query});if(this.renderPromises&&("network-only"===n.fetchPolicy||"cache-and-network"===n.fetchPolicy)&&(n.fetchPolicy="cache-first"),n.variables||(n.variables={}),r){var i=n.fetchPolicy,o=void 0===i?this.getDefaultFetchPolicy():i,a=n.initialFetchPolicy;Object.assign(n,{initialFetchPolicy:void 0===a?o:a,fetchPolicy:"standby"})}else n.fetchPolicy||(n.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return n},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cac
293he-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,i.useMemo)(function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}},[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var r=this.toApolloError(e);Promise.resolve().then(function(){r?t.onError(r):e.data&&t.onCompleted(e.data)}).catch(function(e){__DEV__&&n.kG.warn(e)})}},e.prototype.toApolloError=function(e){return(0,T.O)(e.errors)?new f.cA({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var r=e.data,n=(e.partial,(0,s.__rest)(e,["data","partial"]));return this.toQueryResultCache.set(e,t=(0,s.__assign)((0,s.__assign)((0,s.__assign)({data:r},n),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&(0,T.O)(e.errors)&&(t.error=new f.cA({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){e.partial&&this.queryHookOptions.partialRefetch&&!e.loading&&(!e.data||0===Object.keys(e.data).length)&&"cache-only"!==this.observable.options.fetchPolicy&&(Object.assign(e,{loading:!0,networkStatus:g.I.refetch}),this.observable.refetch())},e}()},14692:function(e,t,r){"use strict";r.d(t,{Vp:function(){return l},n_:function(){return n}});var s,n,i=r(97450);(s=n||(n={}))[s.Query=0]="Query",s[s.Mutation=1]="Mutation",s[s.Subscription=2]="Subscription";var o=new Map;function a(e){var t;switch(e){case n.Query:t="Query";break;case n.Mutation:t="Mutation";break;case n.Subscription:t="Subscription"}return t}function l(e,t){var r=function(e){var t,r,s=o.get(e);if(s)return s;__DEV__?(0,i.kG)(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):(0,i.kG)(!!e&&!!e.kind,33);for(var a=[],l=[],c=[],u=[],h=0,p=e.definitions;h<p.length;h++){var d=p[h];if("FragmentDefinition"===d.kind){a.push(d);continue}if("OperationDefinition"===d.kind)switch(d.operation){case"query":l.push(d);break;case"mutation":c.push(d);break;case"subscription":u.push(d)}}__DEV__?(0,i.kG)(!a.length||l.length||c.length||u.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):(0,i.kG)(!a.length||l.length||c.length||u.length,34),__DEV__?(0,i.kG)(l.length+c.length+u.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(l.length," queries, ").concat(u.length," ")+"subscriptions and ".concat(c.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):(0,i.kG)(l.length+c.length+u.length<=1,35),r=l.length?n.Query:n.Mutation,l.length||c.length||(r=n.Subscription);var f=l.length?l:c.length?c:u;__DEV__?(0,i.kG)(1===f.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(f.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):(0,i.kG)(1===f.length,36);var g=f[0];t=g.variableDefinitions||[];var m={name:g.name&&"Name"===g.name.kind?g.name.value:"data",type:r,variables:t};return o.set(e,m),m}(e),s=a(t),l=a(r.type);__DEV__?(0,i.kG)(r.type===t,"Running a ".concat(s," requires a graphql ")+"".concat(s,", but a ").concat(l," was used instead.")):(0,i.kG)(r.type===t,37)}},82729:function(e,t,r){"use strict";function s(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{_:function(){return s}})}}]);
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.