>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new A;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new N}return w[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],h=u-1;h>=0;h--){var c=l>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,S),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},4242:(t,e,r)=>{"use strict";r.d(e,{Uj:()=>o,te:()=>u,Uw:()=>s,U$:()=>f,uu:()=>d,Y0:()=>h,XL:()=>m,ZN:()=>p});var n=r(3286);const i=new(r(711).Yd)("strings/5.7.0");var o,s;function a(t,e,r,n,i){if(t===s.BAD_PREFIX||t===s.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6==2;n++)t++;return t}return t===s.OVERRUN?r.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(o||(o={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(s||(s={}));const u=Object.freeze({error:function(t,e,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:a,replace:function(t,e,r,n,i){return t===s.OVERLONG?(n.push(i),0):(n.push(65533),a(t,e,r))}});function l(t,e){null==e&&(e=u.error),t=(0,n.lE)(t);const r=[];let i=0;for(;i>7==0){r.push(n);continue}let o=null,a=null;if(192==(224&n))o=1,a=127;else if(224==(240&n))o=2,a=2047;else{if(240!=(248&n)){i+=e(128==(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,t,r);continue}o=3,a=65535}if(i-1+o>=t.length){i+=e(s.OVERRUN,i-1,t,r);continue}let u=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=e(s.OUT_OF_RANGE,i-1-o,t,r,u):u>=55296&&u<=57343?i+=e(s.UTF16_SURROGATE,i-1-o,t,r,u):u<=a?i+=e(s.OVERLONG,i-1-o,t,r,u):r.push(u))}return r}function h(t,e=o.current){e!=o.current&&(i.checkNormalize(),t=t.normalize(e));let r=[];for(let e=0;e>6|192),r.push(63&n|128);else if(55296==(64512&n)){e++;const i=t.charCodeAt(e);if(e>=t.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.lE)(r)}function c(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function f(t,e){return'"'+l(t,e).map((t=>{if(t<256){switch(t){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(t>=32&&t<127)return String.fromCharCode(t)}return t<=65535?c(t):c(55296+((t-=65536)>>10&1023))+c(56320+(1023&t))})).join("")+'"'}function d(t){return t.map((t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join("")}function p(t,e){return d(l(t,e))}function m(t,e=o.current){return l(h(t,e))}},4377:(t,e,r)=>{"use strict";r.d(e,{em:()=>d,z7:()=>M,db:()=>y,Qc:()=>T,RJ:()=>b,qC:()=>S});var n=r(4594),i=r(2593),o=r(3286),s=r(1046),a=r(8197),u=r(3587),l=r(1843),h=r(2768),c=r(711);const f=new c.Yd("transactions/5.7.0");var d;function p(t){return"0x"===t?null:(0,n.Kn)(t)}function m(t){return"0x"===t?s._Y:i.O$.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(d||(d={}));const g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],v={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function y(t){const e=(0,h.VW)(t);return(0,n.Kn)((0,o.p3)((0,a.w)((0,o.p3)(e,1)),12))}function b(t,e){return y((0,h.LO)((0,o.lE)(t),e))}function w(t,e){const r=(0,o.G1)(i.O$.from(t).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function E(t,e){return{address:(0,n.Kn)(t),storageKeys:(e||[]).map(((e,r)=>(32!==(0,o.E1)(e)&&f.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase())))}}function M(t){if(Array.isArray(t))return t.map(((t,e)=>Array.isArray(t)?(t.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),E(t[0],t[1])):E(t.address,t.storageKeys)));const e=Object.keys(t).map((e=>{const r=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return E(e,Object.keys(r).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function A(t){return M(t).map((t=>[t.address,t.storageKeys]))}function _(t,e){if(null!=t.gasPrice){const e=i.O$.from(t.gasPrice),r=i.O$.from(t.maxFeePerGas||0);e.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(t.maxFeePerGas||0,"maxFeePerGas"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.Kn)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",A(t.accessList||[])];if(e){const t=(0,o.N)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.G1)(t.r)),r.push((0,o.G1)(t.s))}return(0,o.xs)(["0x02",l.encode(r)])}function N(t,e){const r=[w(t.chainId||0,"chainId"),w(t.nonce||0,"nonce"),w(t.gasPrice||0,"gasPrice"),w(t.gasLimit||0,"gasLimit"),null!=t.to?(0,n.Kn)(t.to):"0x",w(t.value||0,"value"),t.data||"0x",A(t.accessList||[])];if(e){const t=(0,o.N)(e);r.push(w(t.recoveryParam,"recoveryParam")),r.push((0,o.G1)(t.r)),r.push((0,o.G1)(t.s))}return(0,o.xs)(["0x01",l.encode(r)])}function S(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,u.uj)(t,v);const r=[];g.forEach((function(e){let n=t[e.name]||[];const i={};e.numeric&&(i.hexPad="left"),n=(0,o.lE)((0,o.Dv)(n,i)),e.length&&n.length!==e.length&&n.length>0&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=(0,o.G1)(n),n.length>e.maxLength&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n)),r.push((0,o.Dv)(n))}));let n=0;if(null!=t.chainId?(n=t.chainId,"number"!=typeof n&&f.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,o.Zq)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push((0,o.Dv)(n)),r.push("0x"),r.push("0x")),!e)return l.encode(r);const i=(0,o.N)(e);let s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,o.Dv)(s)),r.push((0,o.G1)((0,o.lE)(i.r))),r.push((0,o.G1)((0,o.lE)(i.s))),l.encode(r)}(t,e);switch(t.type){case 1:return N(t,e);case 2:return _(t,e)}return f.throwError(`unsupported transaction type: ${t.type}`,c.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function k(t,e,r){try{const r=m(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch(t){f.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,o.$m)(e[1],32),t.s=(0,o.$m)(e[2],32);try{const e=(0,a.w)(r(t));t.from=b(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(t){}}function T(t){const e=(0,o.lE)(t);if(e[0]>127)return function(t){const e=l.decode(t);9!==e.length&&6!==e.length&&f.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:m(e[0]).toNumber(),gasPrice:m(e[1]),gasLimit:m(e[2]),to:p(e[3]),value:m(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=i.O$.from(e[6]).toNumber()}catch(t){return r}if(r.r=(0,o.$m)(e[7],32),r.s=(0,o.$m)(e[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);0!==r.chainId&&(i.push((0,o.Dv)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const s=(0,a.w)(l.encode(i));try{r.from=b(s,{r:(0,o.Dv)(r.r),s:(0,o.Dv)(r.s),recoveryParam:n})}catch(t){}r.hash=(0,a.w)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){const e=l.decode(t.slice(1));8!==e.length&&11!==e.length&&f.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.Dv)(t));const r={type:1,chainId:m(e[0]).toNumber(),nonce:m(e[1]).toNumber(),gasPrice:m(e[2]),gasLimit:m(e[3]),to:p(e[4]),value:m(e[5]),data:e[6],accessList:M(e[7])};return 8===e.length||(r.hash=(0,a.w)(t),k(r,e.slice(8),N)),r}(e);case 2:return function(t){const e=l.decode(t.slice(1));9!==e.length&&12!==e.length&&f.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.Dv)(t));const r=m(e[2]),n=m(e[3]),i={type:2,chainId:m(e[0]).toNumber(),nonce:m(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:m(e[4]),to:p(e[5]),value:m(e[6]),data:e[7],accessList:M(e[8])};return 9===e.length||(i.hash=(0,a.w)(t),k(i,e.slice(9),_)),i}(e)}return f.throwError(`unsupported transaction type: ${e[0]}`,c.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},8341:(t,e,r)=>{"use strict";r.d(e,{MY:()=>p,rd:()=>m,$l:()=>g});var n=r(9567),i=r(3286),o=r(3587),s=r(4242),a=r(711),u=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};function l(t,e){return u(this,void 0,void 0,(function*(){null==e&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(!0!==e.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=e.fetchOptions){const t=e.fetchOptions;t.mode&&(r.mode=t.mode),t.cache&&(r.cache=t.cache),t.credentials&&(r.credentials=t.credentials),t.redirect&&(r.redirect=t.redirect),t.referrer&&(r.referrer=t.referrer)}const n=yield fetch(t,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach(((t,e)=>{s[e.toLowerCase()]=t})):n.headers.keys().forEach((t=>{s[t.toLowerCase()]=n.headers.get(t)})),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.lE)(new Uint8Array(o))}}))}var h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};const c=new a.Yd("web/5.7.1");function f(t){return new Promise((e=>{setTimeout(e,t)}))}function d(t,e){if(null==t)return null;if("string"==typeof t)return t;if((0,i.Zq)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return(0,s.ZN)(t)}catch(t){}return(0,i.Dv)(t)}return t}function p(t,e,r){const i="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;c.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const u="object"==typeof t?t.throttleCallback:null,p="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;c.assertArgument(p>0&&p%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const m="object"==typeof t&&!!t.errorPassThrough,g={};let v=null;const y={method:"GET"};let b=!1,w=12e4;if("string"==typeof t)v=t;else if("object"==typeof t){if(null!=t&&null!=t.url||c.throwArgumentError("missing URL","connection.url",t),v=t.url,"number"==typeof t.timeout&&t.timeout>0&&(w=t.timeout),t.headers)for(const e in t.headers)g[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(b=!0);if(y.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==v.substring(0,6)&&!0!==t.allowInsecureAuthentication&&c.throwError("basic authentication requires a secure https url",a.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:v,user:t.user,password:"[REDACTED]"});const e=t.user+":"+t.password;g.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,s.Y0)(e))}}null!=t.skipFetchSetup&&(y.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(y.fetchOptions=(0,o.DC)(t.fetchOptions))}const E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),M=v?v.match(E):null;if(M)try{const t={statusCode:200,statusMessage:"OK",headers:{"content-type":M[1]||"text/plain"},body:M[2]?(0,n.J)(M[3]):(A=M[3],(0,s.Y0)(A.replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))};let e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(t){c.throwError("processing response error",a.Yd.errors.SERVER_ERROR,{body:d(M[1],M[2]),error:t,requestBody:null,requestMethod:"GET",url:v})}var A;e&&(y.method="POST",y.body=e,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(e.length)}));const _={};Object.keys(g).forEach((t=>{const e=g[t];_[e.key]=e.value})),y.headers=_;const N=function(){let t=null;return{promise:new Promise((function(e,r){w&&(t=setTimeout((()=>{null!=t&&(t=null,r(c.makeError("timeout",a.Yd.errors.TIMEOUT,{requestBody:d(y.body,_["content-type"]),requestMethod:y.method,timeout:w,url:v})))}),w))})),cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),S=function(){return h(this,void 0,void 0,(function*(){for(let t=0;t=300)&&(N.cancel(),c.throwError("bad response",a.Yd.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:d(n,e.headers?e.headers["content-type"]:null),requestBody:d(y.body,_["content-type"]),requestMethod:y.method,url:v})),r)try{const t=yield r(n,e);return N.cancel(),t}catch(r){if(r.throttleRetry&&t"content-type"===t.toLowerCase())).length||(r.headers=(0,o.DC)(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},t=r}return p(t,n,((t,e)=>{let n=null;if(null!=t)try{n=JSON.parse((0,s.ZN)(t))}catch(e){c.throwError("invalid JSON",a.Yd.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n}))}function g(t,e){return e||(e={}),null==(e=(0,o.DC)(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),e.timeout));const a=e.retryLimit;let u=0;!function i(){return t().then((function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(u++,u>a)return void(s()&&n(new Error("retry limit reached")));let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));te.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null}),(function(t){s()&&n(t)}))}()}))}},8659:(t,e,r)=>{"use strict";r.d(e,{D:()=>s});var n=r(2046),i=r(3587);const o=new(r(711).Yd)("wordlists/5.7.0");class s{constructor(t){o.checkAbstract(new.target,s),(0,i.zG)(this,"locale",t)}split(t){return t.toLowerCase().split(/ +/g)}join(t){return t.join(" ")}static check(t){const e=[];for(let r=0;r<2048;r++){const n=t.getWord(r);if(r!==t.getWordIndex(n))return"0x";e.push(n)}return(0,n.id)(e.join("\n")+"\n")}static register(t,e){e||(e=t.locale)}}},9855:(t,e,r)=>{"use strict";r.d(e,{E:()=>u});var n=r(8659);let i=null;function o(t){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(t)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}class s extends n.D{constructor(){super("en")}getWord(t){return o(this),i[t]}getWordIndex(t){return o(this),i.indexOf(t)}}const a=new s;n.D.register(a);const u={en:a}},8099:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7117);function i(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}function o(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}function s(t,e){return void 0===e&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function a(t,e){return void 0===e&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}function u(t,e){return void 0===e&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function l(t,e){return void 0===e&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}function h(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}function c(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}function f(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),h(t/4294967296>>>0,e,r),h(t>>>0,e,r+4),e}function d(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),c(t>>>0,e,r),c(t/4294967296>>>0,e,r+4),e}e.readInt16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16},e.readUint16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])>>>0},e.readInt16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])<<16>>16},e.readUint16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])>>>0},e.writeUint16BE=i,e.writeInt16BE=i,e.writeUint16LE=o,e.writeInt16LE=o,e.readInt32BE=s,e.readUint32BE=a,e.readInt32LE=u,e.readUint32LE=l,e.writeUint32BE=h,e.writeInt32BE=h,e.writeUint32LE=c,e.writeInt32LE=c,e.readInt64BE=function(t,e){void 0===e&&(e=0);var r=s(t,e),n=s(t,e+4);return 4294967296*r+n-4294967296*(n>>31)},e.readUint64BE=function(t,e){return void 0===e&&(e=0),4294967296*a(t,e)+a(t,e+4)},e.readInt64LE=function(t,e){void 0===e&&(e=0);var r=u(t,e);return 4294967296*u(t,e+4)+r-4294967296*(r>>31)},e.readUint64LE=function(t,e){void 0===e&&(e=0);var r=l(t,e);return 4294967296*l(t,e+4)+r},e.writeUint64BE=f,e.writeInt64BE=f,e.writeUint64LE=d,e.writeInt64LE=d,e.readUintBE=function(t,e,r){if(void 0===r&&(r=0),t%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=t/8+r-1;o>=r;o--)n+=e[o]*i,i*=256;return n},e.readUintLE=function(t,e,r){if(void 0===r&&(r=0),t%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=i;s--)r[s]=e/o&255,o*=256;return r},e.writeUintLE=function(t,e,r,i){if(void 0===r&&(r=new Uint8Array(t/8)),void 0===i&&(i=0),t%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(t,e){var r=65535&t,n=65535&e;return r*n+((t>>>16&65535)*n+r*(e>>>16&65535)<<16>>>0)|0},e.add=function(t,e){return t+e|0},e.sub=function(t,e){return t-e|0},e.rotl=function(t,e){return t<>>32-e},e.rotr=function(t,e){return t<<32-e|t>>>e},e.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}},1416:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const n=r(6008),i=r(8099),o=r(7309);function s(t,r=e.defaultRandomSource){return r.randomBytes(t)}e.defaultRandomSource=new n.SystemRandomSource,e.randomBytes=s,e.randomUint32=function(t=e.defaultRandomSource){const r=s(4,t),n=(0,i.readUint32LE)(r);return(0,o.wipe)(r),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(t,r=a,n=e.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const u=r.length,l=256-256%u;for(;t>0;){const e=s(Math.ceil(256*t/l),n);for(let n=0;n0;n++){const o=e[n];o{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0,e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;const n=r(7309);e.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const t=r(5883);t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let e=this._crypto.randomBytes(t);if(e.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(t);for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const n=r(5455),i=r(8871);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},7309:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(t){for(var e=0;e255)return!1;return!0}function i(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function s(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var a,u={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},l=(a="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r>4]+a[15&n])}return e.join("")}}),h={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],E=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],M=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],_=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],N=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(t){for(var e=[],r=0;r>2,this._Ke[r][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var s,a=0,u=i;u>16&255]<<24^f[s>>8&255]<<16^f[255&s]<<8^f[s>>24&255]^c[a]<<24,a+=1,8!=i)for(e=1;e>8&255]<<8^f[s>>16&255]<<16^f[s>>24&255]<<24,e=i/2+1;e>2,d=u%4,this._Ke[l][d]=o[e],this._Kd[t-l][d]=o[e++],u++}for(var l=1;l>24&255]^A[s>>16&255]^_[s>>8&255]^N[255&s]},k.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s>24&255]^m[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^v[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Ke[e][i],u[4*i]=255&(f[n[i]>>24&255]^a>>24),u[4*i+1]=255&(f[n[(i+1)%4]>>16&255]^a>>16),u[4*i+2]=255&(f[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(f[255&n[(i+3)%4]]^a);return u},k.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s>24&255]^b[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^E[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}var a,u=o(16);for(i=0;i<4;i++)a=this._Kd[e][i],u[4*i]=255&(d[n[i]>>24&255]^a>>24),u[4*i+1]=255&(d[n[(i+3)%4]>>16&255]^a>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),u[4*i+3]=255&(d[255&n[(i+1)%4]]^a);return u};var T=function(t){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new k(t)};T.prototype.encrypt=function(t){if((t=i(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=o(t.length),r=o(16),n=0;n=0;--e)this._counter[e]=t%256,t>>=8},I.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},I.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var C=function(t,e){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof I||(e=new I(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new k(t)};C.prototype.encrypt=function(t){for(var e=i(t,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n{t.exports=function(t){const e="api.js: ",n=this,i=r(8737),o=r(979),s=r(1789),a=new(r(3737)),{attributes:u,showAttributes:l,showAttributeErrors:h,showRuleDependencies:c}=r(8862),f=r(2595),d=function(t,e,r){const n=``,o="",s=``,a="";let u,l="";for(;Array.isArray(t)&&0!==t.length;){if("number"!=typeof e)throw new Error("abnfToHtml: beg must be type number");if(e>=t.length)break;u="number"!=typeof r||e+r>=t.length?t.length:e+r;let h=0;for(let r=e;r=32&&e<=126)switch(1===h?(l+=o,h=0):2===h&&(l+=a,h=0),e){case 32:l+=" ";break;case 60:l+="<";break;case 62:l+=">";break;case 38:l+="&";break;case 34:l+=""";break;case 39:l+="'";break;case 92:l+="\";break;default:l+=String.fromCharCode(e)}else 9===e||10===e||13===e?(0===h?(l+=n,h=1):2===h&&(l+=a+n,h=1),9===e&&(l+="TAB"),10===e&&(l+="LF"),13===e&&(l+="CR")):(0===h?(l+=s,h=2):1===h&&(l+=o+s,h=2),l+=`\\x${i.utils.charToHex(e)}`)}2===h&&(l+=a),1===h&&(l+=o);break}return l},p=function(t,e,r){let n="";for(let i=e;i=32&&e<=126)n+=String.fromCharCode(e);else switch(e){case 9:n+="\\t";break;case 10:n+="\\n";break;case 13:n+="\\r";break;default:n+="\\unknown"}}return n};let m,g=!1,v=!1,y=!1,b=!1,w=0;if(this.errors=[],Buffer.isBuffer(t))this.chars=o.decode("BINARY",t);else if(Array.isArray(t))this.chars=t.slice();else{if("string"!=typeof t)throw new Error(`${e}input source is not a string, byte Buffer or character array`);this.chars=o.decode("STRING",t)}this.sabnf=o.encode("STRING",this.chars),this.scan=function(t,e){this.lines=s(this.chars,this.errors,t,e),g=!0},this.parse=function(t,r){if(!g)throw new Error(`${e}grammar not scanned`);a.syntax(this.chars,this.lines,this.errors,t,r),v=!0},this.translate=function(){if(!v)throw new Error(`${e}grammar not scanned and parsed`);const t=a.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=t.rules,this.udts=t.udts,m=t.lineMap,y=!0)},this.attributes=function(){if(!y)throw new Error(`${e}grammar not scanned, parsed and translated`);return w=u(this.rules,this.udts,m,this.errors),b=!0,w},this.generate=function(t){if(this.lines=s(this.chars,this.errors,t),this.errors.length)return;if(a.syntax(this.chars,this.lines,this.errors,t),this.errors.length)return;const e=a.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=e.rules,this.udts=e.udts,m=e.lineMap,w=u(this.rules,this.udts,m,this.errors),b=!0)},this.displayRules=function(t="index"){if(!y)throw new Error(`${e}grammar not scanned, parsed and translated`);return f(this.rules,this.udts,t)},this.displayRuleDependencies=function(t="index"){if(!b)throw new Error(`${e}no attributes - must be preceeded by call to attributes()`);return c(t)},this.displayAttributes=function(t="index"){if(!b)throw new Error(`${e}no attributes - must be preceeded by call to attributes()`);return w&&h(t),l(t)},this.displayAttributeErrors=function(){if(!b)throw new Error(`${e}no attributes - must be preceeded by call to attributes()`);return h()},this.toSource=function(t){if(!b)throw new Error(`${e}can't generate parser source - must be preceeded by call to attributes()`);if(w)throw new Error(`${e}can't generate parser source - attributes have ${w} errors`);return a.generateSource(this.chars,this.lines,this.rules,this.udts,t)},this.toObject=function(){if(!b)throw new Error(`${e}can't generate parser source - must be preceeded by call to attributes()`);if(w)throw new Error(`${e}can't generate parser source - attributes have ${w} errors`);return a.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return function(t,e,r){let n,i,o,s;return n="",t.forEach((t=>{i=e[t.line],n+=`${i.lineNo}: `,n+=`${i.beginChar}: `,n+=t.char-i.beginChar+": ",o=i.beginChar,s=t.char-i.beginChar,n+=p(r,o,s),n+=" >> ",o=t.char,s=i.beginChar+i.length-t.char,n+=p(r,o,s),n+="\n",n+=`${i.lineNo}: `,n+=`${i.beginChar}: `,n+=t.char-i.beginChar+": ",n+="error: ",n+=t.msg,n+="\n"})),n}(this.errors,this.lines,this.chars)},this.errorsToHtml=function(t){return function(t,e,r,n){const[o]=i;let s="";const a=`»`;return s+=`\n`,n&&"string"==typeof n&&(s+=`${n}\n`),s+="line no. | line offset | error offset | text |
\n",t.forEach((t=>{let n,o,u,l,h,c="",f="";0===e.length?(h=a,o=0):(n=e[t.line],u=n.beginChar,t.char>u&&(c=d(r,u,t.char-u)),u=t.char,l=n.beginChar+n.length,u",s+=`${t.line} | ${n.beginChar} | ${o} | ${h} | `,s+="\n",s+="",s+=` | ↑: ${i.utils.stringToAsciiHtml(t.msg)} | `,s+="
\n")})),s+="
\n",s}(this.errors,this.lines,this.chars,t)},this.linesToAscii=function(){return function(t){let e="Annotated Input Grammar";return t.forEach((t=>{e+="\n",e+=`line no: ${t.lineNo}`,e+=` : char index: ${t.beginChar}`,e+=` : length: ${t.length}`,e+=` : abnf: ${p(n.chars,t.beginChar,t.length)}`})),e+="\n",e}(this.lines)},this.linesToHtml=function(){return function(t){let e="";return e+=`\n`,e+="Annotated Input Grammar\n",e+="",e+="line no. | first char | length | text | ",e+="
\n",t.forEach((t=>{e+="",e+=`${t.lineNo}`,e+=` | ${t.beginChar}`,e+=` | ${t.length}`,e+=` | ${d(n.chars,t.beginChar,t.length)}`,e+=" | ",e+="
\n"})),e+="
\n",e}(this.lines)}}},8862:(t,e,r)=>{t.exports=function(){const t=r(8276),{ruleAttributes:e,showAttributes:n,showAttributeErrors:i}=r(4246),{ruleDependencies:o,showRuleDependencies:s}=r(7008);class a{constructor(t,e){this.rules=t,this.udts=e,this.ruleCount=t.length,this.udtCount=e.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 e=0;e0)for(let r=0;r0)for(let r=0;rthis.rules[e].lower?1:0}compUdtsAlpha(t,e){return this.udts[t].lowerthis.udts[e].lower?1:0}compRulesType(t,e){return this.ruleDeps[t].recursiveTypethis.ruleDeps[e].recursiveType?1:0}compRulesGroup(e,r){if(this.ruleDeps[e].recursiveType===t.ATTR_MR&&this.ruleDeps[r].recursiveType===t.ATTR_MR){if(this.ruleDeps[e].groupNumberthis.ruleDeps[r].groupNumber)return 1}return 0}}return{attributes:function(t=[],r=[],n=[],i=[]){const s=new a(t,r);return o(s),e(s),s.attrsErrorCount&&i.push({line:0,char:0,msg:`${s.attrsErrorCount} attribute errors`}),s.attrsErrorCount},showAttributes:n,showAttributeErrors:i,showRuleDependencies:s}}()},3737:(t,e,r)=>{t.exports=function(){const t=r(8737),e=t.ids,n=new(r(4216)),i=new(r(1832)),o=new(r(3610)),s=new t.parser;s.ast=new t.ast,s.callbacks=n.callbacks,s.ast.callbacks=i.callbacks;const a=function(t,e,r){if(e<0||e>=r)return-1;for(let r=0;r=t[r].beginChar&&e{const r=[],n=[];let i=0;t.opcodes.forEach((t=>{t.type===e.ALT&&1===t.children.length||t.type===e.CAT&&1===t.children.length||t.type===e.REP&&1===t.min&&1===t.max?n.push(null):(n.push(i),r.push(t),i+=1)})),n.push(i),r.forEach((t=>{if(t.type===e.ALT||t.type===e.CAT)for(let e=0;e{d.push(t.lower),h+=t.opcodes.length,t.opcodes.forEach((t=>{switch(t.type){case e.ALT:m+=1;break;case e.CAT:g+=1;break;case e.RNM:v+=1;break;case e.UDT:y+=1;break;case e.REP:b+=1;break;case e.AND:w+=1;break;case e.NOT:E+=1;break;case e.BKA:S+=1;break;case e.BKN:k+=1;break;case e.BKR:N+=1;break;case e.ABG:T+=1;break;case e.AEN:R+=1;break;case e.TLS:for(M+=1,s=0;sf&&(f=t.string[s]);break;case e.TBS:for(A+=1,s=0;sf&&(f=t.string[s]);break;case e.TRG:_+=1,t.minf&&(f=t.max);break;default:throw new Error("generateSource: unrecognized opcode")}}))})),d.sort(),i.length>0&&(i.forEach((t=>{p.push(t.lower)})),p.sort());let x,O="module.exports";return o&&"string"==typeof o&&(O=`let ${o}`),l+="// copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved
\n",l+="// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
\n",l+="//\n",l+="// Generated by apg-js, Version 4.0.0 [apg-js](https://github.com/ldthomas/apg-js)\n",l+=`${O} = function grammar(){\n`,l+=" // ```\n",l+=" // SUMMARY\n",l+=` // rules = ${n.length}\n`,l+=` // udts = ${i.length}\n`,l+=` // opcodes = ${h}\n`,l+=" // --- ABNF original opcodes\n",l+=` // ALT = ${m}\n`,l+=` // CAT = ${g}\n`,l+=` // REP = ${b}\n`,l+=` // RNM = ${v}\n`,l+=` // TLS = ${M}\n`,l+=` // TBS = ${A}\n`,l+=` // TRG = ${_}\n`,l+=" // --- SABNF superset opcodes\n",l+=` // UDT = ${y}\n`,l+=` // AND = ${w}\n`,l+=` // NOT = ${E}\n`,l+=` // BKA = ${S}\n`,l+=` // BKN = ${k}\n`,l+=` // BKR = ${N}\n`,l+=` // ABG = ${T}\n`,l+=` // AEN = ${R}\n`,l+=" // characters = [",l+=M+A+_===0?" none defined ]":`${c} - ${f}]`,y>0&&(l+=" + user defined"),l+="\n",l+=" // ```\n",l+=" /* OBJECT IDENTIFIER (for internal parser use) */\n",l+=" this.grammarObject = 'grammarObject';\n",l+="\n",l+=" /* RULES */\n",l+=" this.rules = [];\n",n.forEach(((t,e)=>{let r=" this.rules[";r+=e,r+="] = {name: '",r+=t.name,r+="', lower: '",r+=t.lower,r+="', index: ",r+=t.index,r+=", isBkr: ",r+=t.isBkr,r+="};\n",l+=r})),l+="\n",l+=" /* UDTS */\n",l+=" this.udts = [];\n",i.length>0&&i.forEach(((t,e)=>{let r=" this.udts[";r+=e,r+="] = {name: '",r+=t.name,r+="', lower: '",r+=t.lower,r+="', index: ",r+=t.index,r+=", empty: ",r+=t.empty,r+=", isBkr: ",r+=t.isBkr,r+="};\n",l+=r})),l+="\n",l+=" /* OPCODES */\n",n.forEach(((t,r)=>{r>0&&(l+="\n"),l+=` /* ${t.name} */\n`,l+=` this.rules[${r}].opcodes = [];\n`,t.opcodes.forEach(((t,o)=>{let s;switch(t.type){case e.ALT:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, children: [${t.children.toString()}]};// ALT\n`;break;case e.CAT:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, children: [${t.children.toString()}]};// CAT\n`;break;case e.RNM:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, index: ${t.index}};// RNM(${n[t.index].name})\n`;break;case e.BKR:t.index>=n.length?(a=i[t.index-n.length].name,u=i[t.index-n.length].lower):(a=n[t.index].name,u=n[t.index].lower),s="%i",t.bkrCase===e.BKR_MODE_CS&&(s="%s"),t.bkrMode===e.BKR_MODE_UM?s+="%u":s+="%p",a=s+a,l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, index: ${t.index}, lower: '${u}', bkrCase: ${t.bkrCase}, bkrMode: ${t.bkrMode}};// BKR(\\${a})\n`;break;case e.UDT:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, empty: ${t.empty}, index: ${t.index}};// UDT(${i[t.index].name})\n`;break;case e.REP:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, min: ${t.min}, max: ${t.max}};// REP\n`;break;case e.AND:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// AND\n`;break;case e.NOT:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// NOT\n`;break;case e.ABG:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// ABG(%^)\n`;break;case e.AEN:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// AEN(%$)\n`;break;case e.BKA:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// BKA\n`;break;case e.BKN:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}};// BKN\n`;break;case e.TLS:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, string: [${t.string.toString()}]};// TLS\n`;break;case e.TBS:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, string: [${t.string.toString()}]};// TBS\n`;break;case e.TRG:l+=` this.rules[${r}].opcodes[${o}] = {type: ${t.type}, min: ${t.min}, max: ${t.max}};// TRG\n`;break;default:throw new Error("parser.js: ~143: unrecognized opcode")}}))})),l+="\n",l+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",l+=" this.toString = function toString(){\n",l+=' let str = "";\n',r.forEach((e=>{const r=e.beginChar+e.length;x="",l+=' str += "';for(let n=e.beginChar;n{i.push(t.lower)})),i.sort(),r.length>0&&(r.forEach((t=>{o.push(t.lower)})),o.sort()),n.callbacks=[],i.forEach((t=>{n.callbacks[t]=!1})),r.length>0&&o.forEach((t=>{n.callbacks[t]=!1})),n.rules=e,n.udts=r,n.toString=function(){return s},n}}},4246:(t,e,r)=>{t.exports=function(){const t=r(8276);let e=null;function n(t){return!(t.left||t.nested||t.right||t.cyclic)&&t.empty}function i(t){return!!(t.left||t.nested||t.right||t.cyclic)}function o(e,r,a,u){e.attrInit(u);const l=r[a];switch(l.type){case t.ALT:!function(t,e,r,n){let i=0;const s=e[r],a=s.children.length,u=[];for(i=0;i=0;r-=1){if(t[r].right)return!0;if(!t[r].empty)return!1}return!1}(h,l),s.nested=function(t,e){let r=0,o=0,s=0;for(r=0;r=0;r-=1)if(t[r].left&&!t[r].leaf)for(o=r-1;o>=0;o-=1)if(!n(t[o]))return!0;for(r=0;r=t.ruleCount?(n.empty=t.udts[i.index-t.ruleCount].empty,n.finite=!0):(s(t,i.index,n),n.left=!1,n.nested=!1,n.right=!1,n.cyclic=!1)}(e,r,a,u);break;case t.AND:case t.NOT:case t.BKA:case t.BKN:o(e,r,a+1,u),u.empty=!0;break;case t.TLS:u.empty=!r[a].string.length,u.finite=!0,u.cyclic=!1;break;case t.TBS:case t.TRG:u.empty=!1,u.finite=!0,u.cyclic=!1;break;case t.UDT:u.empty=l.empty,u.finite=!0,u.cyclic=!1;break;case t.ABG:case t.AEN:u.empty=!0,u.finite=!0,u.cyclic=!1;break;default:throw new Error(`unknown opcode type: ${l}`)}}function s(t,e,r){const n=t.attrsWorking[e];n.isComplete?t.attrCopy(r,n):n.isOpen?e===t.startRule?e===t.startRule&&(r.left=!0,r.right=!0,r.cyclic=!0,r.leaf=!0):r.finite=!0:(n.isOpen=!0,o(t,n.rule.opcodes,0,r),n.left=r.left,n.right=r.right,n.nested=r.nested,n.empty=r.empty,n.finite=r.finite,n.cyclic=r.cyclic,n.leaf=!1,n.isOpen=!1,n.isComplete=!0)}const a=t=>t?"t":"f",u=t=>t?"e":"f",l=(r,n,i,o)=>{let s=`${r}:${n}:`;return s+=`${u(i.left)} `,s+=`${a(i.nested)} `,s+=`${a(i.right)} `,s+=`${u(i.cyclic)} `,s+=(i.finite?"t":"e")+" ",s+=`${a(i.empty)}:`,s+=`${e.typeToString(o.recursiveType)}:`,s+=o.recursiveType===t.ATTR_MR?o.groupNumber:"-",s+=`:${i.rule.name}\n`,s},h=()=>{let t="LEGEND - t=true, f=false, e=error\n";return t+="sequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n","LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n"},c=t=>{let r=0,n=0,i=null,o=null,s="",{ruleIndexes:a}=e;for(97===t?a=e.ruleAlphaIndexes:116===t&&(a=e.ruleTypeIndexes),r=0;r{e=t;let r=0,n=0;const i=e.attrGen();for(r=0;r{if(!e.attributesComplete)throw new Error("rule-attributes.js:showAttributes: attributes not available");let r="";const n="RULE ATTRIBUTES\n";return 97===t.charCodeAt(0)?(r+="alphabetical by rule name\n",r+=n,r+=h(),r+=c(97)):116===t.charCodeAt(0)?(r+="ordered by rule type\n",r+=n,r+=h(),r+=c(116)):(r+="ordered by rule index\n",r+=n,r+=h(),r+=c()),r},showAttributeErrors:()=>{let t=null,r=null,n="";if(n+="RULE ATTRIBUTES WITH ERRORS\n",n+=h(),e.attrsErrorCount)for(let i=0;i\n";return n}}}()},7008:(t,e,r)=>{t.exports=(()=>{const t=r(8276);let e=null;const n=(e,r,i,o)=>{let s=0,a=0;const u=r[i];o[i]=!0;const l=u.rule.opcodes;for(s=0;s{let r=0,n=0,i=0,o=0;const s=e.ruleCount-1,a=e.udtCount-1;let u="",l="";const h="=> ";let c=!1,f=null,{ruleIndexes:d}=e,{udtIndexes:p}=e;for(97===t?(d=e.ruleAlphaIndexes,p=e.udtAlphaIndexes):116===t&&(d=e.ruleTypeIndexes,p=e.udtAlphaIndexes),r=0;r-1?f.groupNumber:"-",l+=":"),l+=" ",u+=`${l+e.rules[d[r]].name}\n`,c=!0,i=0,o=u.length,u+=l,n=0;n100&&n!==s&&(u+=`\n${l}${h}`,o=u.length);if(e.udtCount)for(n=0;n100&&n!==a&&(u+=`\n${l}${h}`,o=u.length);for(0===i&&(u+="=> \n"),!1===c&&(u+="\n"),c=!0,i=0,o=u.length,u+=l,n=0;n100&&n!==s&&(u+=`\n${l}${h}`,o=u.length);0===i&&(u+="<= \n"),!1===c&&(u+="\n"),u+="\n"}return u};return{ruleDependencies:r=>{e=r;let i=0,o=0,s=0,a=null,u=null,l=!1;e.dependenciesComplete=!1;const h=e.falseArray(e.ruleCount);for(i=0;i-1,e.ruleAlphaIndexes.sort(e.compRulesAlpha),e.ruleTypeIndexes.sort(e.compRulesAlpha),e.ruleTypeIndexes.sort(e.compRulesType),e.isMutuallyRecursive&&e.ruleTypeIndexes.sort(e.compRulesGroup),e.udtCount&&e.udtAlphaIndexes.sort(e.compUdtsAlpha),e.dependenciesComplete=!0},showRuleDependencies:(t="index")=>{let r="RULE DEPENDENCIES(index:type:[group number:])\n";return r+="=> refers to rule names\n",r+="<= referenced by rule names\n",e.dependenciesComplete?(97===t.charCodeAt(0)?(r+="alphabetical by rule name\n",r+=i(97)):116===t.charCodeAt(0)?(r+="ordered by rule type\n",r+=i(116)):(r+="ordered by rule index\n",r+=i(null)),r):r}}})()},3610:t=>{t.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},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},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]},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},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},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]},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(){let t="";return t+=";\n",t+="; ABNF for JavaScript APG 2.0 SABNF\n",t+="; RFC 5234 with some restrictions and additions.\n",t+="; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n",t+='; - accepts %s"string" as a case-sensitive string\n',t+='; - accepts %i"string" as a case-insensitive string\n',t+='; - accepts "string" as a case-insensitive string\n',t+=";\n",t+="; Some restrictions:\n",t+="; 1. Rules must begin at first character of each line.\n",t+="; Indentations on first rule and rules thereafter are not allowed.\n",t+="; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n",t+="; 3. Prose values, i.e. , are accepted as valid grammar syntax.\n",t+="; However, a working parser cannot be generated from them.\n",t+=";\n",t+="; Super set (SABNF) additions:\n",t+="; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n",t+="; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n",t+="; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n",t+="; e.g. &%d13 or &rule or !(A / B)\n",t+="; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n",t+="; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n",t+="; u_name may be used as an element but no rule definition is given.\n",t+="; e.g. rule = A / u_myUdt\n",t+='; A = "a"\n',t+="; would be a valid grammar.\n",t+="; 3. Case-sensitive, single-quoted strings are accepted.\n",t+="; e.g. 'abc' would be equivalent to %d97.98.99\n",t+='; (kept for backward compatibility, but superseded by %s"abc") \n',t+="; New 12/26/2015\n",t+="; 4. Look-behind operators are accepted as element prefixes.\n",t+="; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n",t+="; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n",t+="; e.g. &&%d13 or &&rule or !!(A / B)\n",t+="; 5. Back reference operators, i.e. \\rulename, are accepted.\n",t+="; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n",t+="; to match is a phrase previously matched by the rule 'rulename'.\n",t+="; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n",t+="; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n",t+="; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n",t+="; Back reference modifiers can be used to specify case and mode.\n",t+="; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n",t+="; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n",t+="; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n",t+="; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n",t+="; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n",t+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",t+="; 8. String end anchor, AEN(%$) matches the end of the input string location.\n",t+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",t+=";\n",t+="File = *(BlankLine / Rule / RuleError)\n",t+="BlankLine = *(%d32/%d9) [comment] LineEnd\n",t+="Rule = RuleLookup owsp Alternation ((owsp LineEnd)\n",t+=" / (LineEndError LineEnd))\n",t+="RuleLookup = RuleNameTest owsp DefinedAsTest\n",t+="RuleNameTest = RuleName/RuleNameError\n",t+="RuleName = alphanum\n",t+="RuleNameError = 1*(%d33-60/%d62-126)\n",t+="DefinedAsTest = DefinedAs / DefinedAsError\n",t+="DefinedAsError = 1*2%d33-126\n",t+="DefinedAs = IncAlt / Defined\n",t+="Defined = %d61\n",t+="IncAlt = %d61.47\n",t+="RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\n",t+="LineEndError = 1*(%d32-126 / %d9 / LineContinue)\n",t+="Alternation = Concatenation *(owsp AltOp Concatenation)\n",t+="Concatenation = Repetition *(CatOp Repetition)\n",t+="Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\n",t+="Modifier = (Predicate [RepOp])\n",t+=" / RepOp\n",t+="Predicate = BkaOp\n",t+=" / BknOp\n",t+=" / AndOp\n",t+=" / NotOp\n",t+="BasicElement = UdtOp\n",t+=" / RnmOp\n",t+=" / TrgOp\n",t+=" / TbsOp\n",t+=" / TlsOp\n",t+=" / ClsOp\n",t+=" / BkrOp\n",t+=" / AbgOp\n",t+=" / AenOp\n",t+=" / ProsVal\n",t+="BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\n",t+="Group = GroupOpen Alternation (GroupClose / GroupError)\n",t+="GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",t+="GroupOpen = %d40 owsp\n",t+="GroupClose = owsp %d41\n",t+="Option = OptionOpen Alternation (OptionClose / OptionError)\n",t+="OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",t+="OptionOpen = %d91 owsp\n",t+="OptionClose = owsp %d93\n",t+="RnmOp = alphanum\n",t+="BkrOp = %d92 [bkrModifier] bkr-name\n",t+="bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\n",t+="cs = '%s'\n",t+="ci = '%i'\n",t+="um = '%u'\n",t+="pm = '%p'\n",t+="bkr-name = uname / ename / rname\n",t+="rname = alphanum\n",t+="uname = %d117.95 alphanum\n",t+="ename = %d101.95 alphanum\n",t+="UdtOp = udt-empty\n",t+=" / udt-non-empty\n",t+="udt-non-empty = %d117.95 alphanum\n",t+="udt-empty = %d101.95 alphanum\n",t+="RepOp = (rep-min StarOp rep-max)\n",t+=" / (rep-min StarOp)\n",t+=" / (StarOp rep-max)\n",t+=" / StarOp\n",t+=" / rep-min-max\n",t+="AltOp = %d47 owsp\n",t+="CatOp = wsp\n",t+="StarOp = %d42\n",t+="AndOp = %d38\n",t+="NotOp = %d33\n",t+="BkaOp = %d38.38\n",t+="BknOp = %d33.33\n",t+="AbgOp = %d37.94\n",t+="AenOp = %d37.36\n",t+="TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\n",t+="TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\n",t+="TlsOp = TlsCase TlsOpen TlsString TlsClose\n",t+='TlsCase = ["%i" / "%s"]\n',t+="TlsOpen = %d34\n",t+="TlsClose = %d34\n",t+="TlsString = *(%d32-33/%d35-126/StringTab)\n",t+="StringTab = %d9\n",t+="ClsOp = ClsOpen ClsString ClsClose\n",t+="ClsOpen = %d39\n",t+="ClsClose = %d39\n",t+="ClsString = *(%d32-38/%d40-126/StringTab)\n",t+="ProsVal = ProsValOpen ProsValString ProsValClose\n",t+="ProsValOpen = %d60\n",t+="ProsValString = *(%d32-61/%d63-126/StringTab)\n",t+="ProsValClose = %d62\n",t+="rep-min = rep-num\n",t+="rep-min-max = rep-num\n",t+="rep-max = rep-num\n",t+="rep-num = 1*(%d48-57)\n",t+="dString = dnum\n",t+="xString = xnum\n",t+="bString = bnum\n",t+="Dec = (%d68/%d100)\n",t+="Hex = (%d88/%d120)\n",t+="Bin = (%d66/%d98)\n",t+="dmin = dnum\n",t+="dmax = dnum\n",t+="bmin = bnum\n",t+="bmax = bnum\n",t+="xmin = xnum\n",t+="xmax = xnum\n",t+="dnum = 1*(%d48-57)\n",t+="bnum = 1*%d48-49\n",t+="xnum = 1*(%d48-57 / %d65-70 / %d97-102)\n",t+=";\n",t+="; Basics\n",t+="alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\n",t+="owsp = *space\n",t+="wsp = 1*space\n",t+="space = %d32\n",t+=" / %d9\n",t+=" / comment\n",t+=" / LineContinue\n",t+="comment = %d59 *(%d32-126 / %d9)\n",t+="LineEnd = %d13.10\n",t+=" / %d10\n",t+=" / %d13\n",t+="LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n",";\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. , are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n; 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) ; 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"}}},3479:(t,e,r)=>{const n=r(8276),i=r(8544),o=[];o.line=function(t,e,r,i,o){return t===n.SEM_PRE?(o.endLength=0,o.textLength=0,o.invalidCount=0):o.lines.push({lineNo:o.lines.length,beginChar:r,length:i,textLength:o.textLength,endType:o.endType,invalidChars:o.invalidCount}),n.SEM_OK},o["line-text"]=function(t,e,r,i,o){return t===n.SEM_PRE&&(o.textLength=i),n.SEM_OK},o["last-line"]=function(t,e,r,i,o){return t===n.SEM_PRE?(o.endLength=0,o.textLength=0,o.invalidCount=0):o.strict?(o.lines.push({lineNo:o.lines.length,beginChar:r,length:i,textLength:i,endType:"none",invalidChars:o.invalidCount}),o.errors.push({line:o.lineNo,char:r+i,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(e.push(10),o.lines.push({lineNo:o.lines.length,beginChar:r,length:i+1,textLength:i,endType:"LF",invalidChars:o.invalidCount})),n.SEM_OK},o.invalid=function(t,e,r,o,s){return t===n.SEM_PRE&&s.errors.push({line:s.lineNo,char:r,msg:`invalid character found '\\x${i.charToHex(e[r])}'`}),n.SEM_OK},o.end=function(t,e,r,i,o){return t===n.SEM_POST&&(o.lineNo+=1),n.SEM_OK},o.lf=function(t,e,r,i,o){return t===n.SEM_PRE&&(o.endType="LF",o.strict&&o.errors.push({line:o.lineNo,char:r,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),n.SEM_OK},o.cr=function(t,e,r,i,o){return t===n.SEM_PRE&&(o.endType="CR",o.strict&&o.errors.push({line:o.lineNo,char:r,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),n.SEM_OK},o.crlf=function(t,e,r,i,o){return t===n.SEM_PRE&&(o.endType="CRLF"),n.SEM_OK},e.callbacks=o},6410:t=>{t.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(){let t="";return t+="file = *line [last-line]\n",t+="line = line-text end\n",t+="line-text = *(valid/invalid)\n",t+="last-line = 1*(valid/invalid)\n",t+="valid = %d32-126 / %d9\n",t+="invalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\n",t+="end = CRLF / LF / CR\n",t+="CRLF = %d13.10\n",t+="LF = %d10\n",t+="CR = %d13\n","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"}}},1789:(t,e,r)=>{t.exports=function(t,e,n,i){const o=r(8737),s=new(r(6410)),{callbacks:a}=r(3479),u=[],l=new o.parser;if(l.ast=new o.ast,l.ast.callbacks=a,i){if("traceObject"!==i.traceObject)throw new TypeError("scanner.js: trace argument is not a trace object");l.trace=i}if(!0!==l.parse(s,"file",t).success)return void e.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});const h={lines:u,lineNo:0,errors:e,strict:!!n};return l.ast.translate(h),u}},1832:(t,e,r)=>{t.exports=function(){const t=r(8737),e=t.ids,n=function(){this.names=[],this.add=function(t){let e=-1;return-1===this.get(t)&&(e={name:t,lower:t.toLowerCase(),index:this.names.length},this.names.push(e)),e},this.get=function(t){let e=-1;const r=t.toLowerCase();for(let t=0;t=48&&e<=57)e-=48;else if(e>=65&&e<=70)e-=55;else{if(!(e>=97&&e<=102))throw new Error("hexnum out of range");e-=87}n=16*n+e}return n};this.callbacks=[],this.callbacks.abgop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.ABG}),s},this.callbacks.aenop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.AEN}),s},this.callbacks.alternation=function(t,r,n,i,o){let s=e.SEM_OK;if(t===e.SEM_PRE){const t=!0;for(;t;){if(null===o.definedas){s=e.SEM_SKIP;break}if(null===o.topStack){if("="===o.definedas){o.topStack={alt:{type:e.ALT,children:[]},cat:null},o.altStack.push(o.topStack),o.opcodes.push(o.topStack.alt);break}o.topStack={alt:o.opcodes[0],cat:null},o.altStack.push(o.topStack);break}o.topStack={alt:{type:e.ALT,children:[]},cat:null},o.altStack.push(o.topStack),o.opcodes.push(o.topStack.alt);break}}else t===e.SEM_POST&&(o.altStack.pop(),o.altStack.length>0?o.topStack=o.altStack[o.altStack.length-1]:o.topStack=null);return s},this.callbacks.andop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.AND}),s},this.callbacks.bmax=function(t,r,n,i,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.max=o(r,n,i)),a},this.callbacks.bmin=function(t,r,n,i,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.min=o(r,n,i)),a},this.callbacks.bkaop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.BKA}),s},this.callbacks.bknop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.BKN}),s},this.callbacks.bkrop=function(r,n,i,o,s){const a=e.SEM_OK;return r===e.SEM_PRE?(s.ci=!0,s.cs=!1,s.um=!0,s.pm=!1):r===e.SEM_POST&&s.opcodes.push({type:e.BKR,bkrCase:!0===s.cs?e.BKR_MODE_CS:e.BKR_MODE_CI,bkrMode:!0===s.pm?e.BKR_MODE_PM:e.BKR_MODE_UM,index:{phraseIndex:s.bkrname.phraseIndex,name:t.utils.charsToString(n,s.bkrname.phraseIndex,s.bkrname.phraseLength)}}),a},this.callbacks["bkr-name"]=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.bkrname={phraseIndex:n,phraseLength:i}),s},this.callbacks.bstring=function(t,r,n,i,s){const a=e.SEM_OK;return t===e.SEM_POST&&s.tbsstr.push(o(r,n,i)),a},this.callbacks.clsop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(i<=2?o.opcodes.push({type:e.TLS,string:[]}):o.opcodes.push({type:e.TBS,string:r.slice(n+1,n+i-1)})),s},this.callbacks.ci=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.ci=!0),s},this.callbacks.cs=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.cs=!0),s},this.callbacks.um=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.um=!0),s},this.callbacks.pm=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.pm=!0),s},this.callbacks.concatenation=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE?(o.topStack.alt.children.push(o.opcodes.length),o.topStack.cat={type:e.CAT,children:[]},o.opcodes.push(o.topStack.cat)):t===e.SEM_POST&&(o.topStack.cat=null),s},this.callbacks.defined=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.definedas="="),s},this.callbacks.dmax=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.max=i(r,n,o)),a},this.callbacks.dmin=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.min=i(r,n,o)),a},this.callbacks.dstring=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&s.tbsstr.push(i(r,n,o)),a},this.callbacks.file=function(t,r,i,o,s){const a=e.SEM_OK;if(t===e.SEM_PRE)s.ruleNames=new n,s.udtNames=new n,s.rules=[],s.udts=[],s.rulesLineMap=[],s.opcodes=[],s.altStack=[],s.topStack=null,s.topRule=null;else if(t===e.SEM_POST){let t;s.rules.forEach((r=>{r.isBkr=!1,r.opcodes.forEach((r=>{r.type===e.RNM&&(t=s.ruleNames.get(r.index.name),-1===t?(s.errors.push({line:s.findLine(s.lines,r.index.phraseIndex,s.charsLength),char:r.index.phraseIndex,msg:`Rule name '${r.index.name}' used but not defined.`}),r.index=-1):r.index=t.index)}))})),s.udts.forEach((t=>{t.isBkr=!1})),s.rules.forEach((r=>{r.opcodes.forEach((n=>{n.type===e.BKR&&(r.hasBkr=!0,t=s.ruleNames.get(n.index.name),-1!==t?(s.rules[t.index].isBkr=!0,n.index=t.index):(t=s.udtNames.get(n.index.name),-1!==t?(s.udts[t.index].isBkr=!0,n.index=s.rules.length+t.index):(s.errors.push({line:s.findLine(s.lines,n.index.phraseIndex,s.charsLength),char:n.index.phraseIndex,msg:`Back reference name '${n.index.name}' refers to undefined rule or unamed UDT.`}),n.index=-1)))}))}))}return a},this.callbacks.incalt=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&(o.definedas="=/"),s},this.callbacks.notop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.NOT}),s},this.callbacks.optionopen=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&o.opcodes.push({type:e.REP,min:0,max:1,char:n}),s},this.callbacks["rep-max"]=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.max=i(r,n,o)),a},this.callbacks["rep-min"]=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.min=i(r,n,o)),a},this.callbacks["rep-min-max"]=function(t,r,n,o,s){const a=e.SEM_OK;return t===e.SEM_POST&&(s.max=i(r,n,o),s.min=s.max),a},this.callbacks.repetition=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE&&o.topStack.cat.children.push(o.opcodes.length),s},this.callbacks.repop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE?(o.min=0,o.max=1/0,o.topRep={type:e.REP,min:0,max:1/0},o.opcodes.push(o.topRep)):t===e.SEM_POST&&(o.min>o.max&&o.errors.push({line:o.findLine(o.lines,n,o.charsLength),char:n,msg:`repetition min cannot be greater than max: min: ${o.min}: max: ${o.max}`}),o.topRep.min=o.min,o.topRep.max=o.max),s},this.callbacks.rnmop=function(r,n,i,o,s){const a=e.SEM_OK;return r===e.SEM_POST&&s.opcodes.push({type:e.RNM,index:{phraseIndex:i,name:t.utils.charsToString(n,i,o)}}),a},this.callbacks.rule=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE&&(o.altStack.length=0,o.topStack=null,o.rulesLineMap.push({line:o.findLine(o.lines,n,o.charsLength),char:n})),s},this.callbacks.rulelookup=function(t,r,n,i,o){const s=e.SEM_OK;if(t===e.SEM_PRE)o.ruleName="",o.definedas="";else if(t===e.SEM_POST){let t;"="===o.definedas?(t=o.ruleNames.add(o.ruleName),-1===t?(o.definedas=null,o.errors.push({line:o.findLine(o.lines,n,o.charsLength),char:n,msg:`Rule name '${o.ruleName}' previously defined.`})):(o.topRule={name:t.name,lower:t.lower,opcodes:[],index:t.index},o.rules.push(o.topRule),o.opcodes=o.topRule.opcodes)):(t=o.ruleNames.get(o.ruleName),-1===t?(o.definedas=null,o.errors.push({line:o.findLine(o.lines,n,o.charsLength),char:n,msg:`Rule name '${o.ruleName}' for incremental alternate not previously defined.`})):(o.topRule=o.rules[t.index],o.opcodes=o.topRule.opcodes))}return s},this.callbacks.rulename=function(r,n,i,o,s){const a=e.SEM_OK;return r===e.SEM_PRE&&(s.ruleName=t.utils.charsToString(n,i,o)),a},this.callbacks.tbsop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE?o.tbsstr=[]:t===e.SEM_POST&&o.opcodes.push({type:e.TBS,string:o.tbsstr}),s},this.callbacks.tlscase=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_POST&&i>0&&(83===r[n+1]||115===r[n+1])&&(o.tlscase=!1),s},this.callbacks.tlsstring=function(t,r,n,i,o){const s=e.SEM_OK;if(t===e.SEM_POST)if(o.tlscase){const t=r.slice(n,n+i);for(let e=0;e=65&&t[e]<=90&&(t[e]+=32);o.opcodes.push({type:e.TLS,string:t})}else o.opcodes.push({type:e.TBS,string:r.slice(n,n+i)});return s},this.callbacks.tlsop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE&&(o.tlscase=!0),s},this.callbacks.trgop=function(t,r,n,i,o){const s=e.SEM_OK;return t===e.SEM_PRE?(o.min=0,o.max=0):t===e.SEM_POST&&(o.min>o.max&&o.errors.push({line:o.findLine(o.lines,n,o.charsLength),char:n,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${o.min}: max: ${o.max}`}),o.opcodes.push({type:e.TRG,min:o.min,max:o.max})),s},this.callbacks["udt-empty"]=function(r,n,i,o,s){const a=e.SEM_OK;if(r===e.SEM_POST){const r=t.utils.charsToString(n,i,o);let a=s.udtNames.add(r);if(-1===a){if(a=s.udtNames.get(r),-1===a)throw new Error("semUdtEmpty: name look up error")}else s.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!0});s.opcodes.push({type:e.UDT,empty:!0,index:a.index})}return a},this.callbacks["udt-non-empty"]=function(r,n,i,o,s){const a=e.SEM_OK;if(r===e.SEM_POST){const r=t.utils.charsToString(n,i,o);let a=s.udtNames.add(r);if(-1===a){if(a=s.udtNames.get(r),-1===a)throw new Error("semUdtNonEmpty: name look up error")}else s.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!1});s.opcodes.push({type:e.UDT,empty:!1,index:a.index,syntax:null,semantic:null})}return a},this.callbacks.xmax=function(t,r,n,i,o){const a=e.SEM_OK;return t===e.SEM_POST&&(o.max=s(r,n,i)),a},this.callbacks.xmin=function(t,r,n,i,o){const a=e.SEM_OK;return t===e.SEM_POST&&(o.min=s(r,n,i)),a},this.callbacks.xstring=function(t,r,n,i,o){const a=e.SEM_OK;return t===e.SEM_POST&&o.tbsstr.push(s(r,n,i)),a}}},2595:t=>{t.exports=function(){const t="show-rules.js";return function(e=[],r=[],n="index"){const i="showRules";let o=[],s=[];const a=[],u=[],l=e,h=r,c=e.length,f=r.length;let d,p="RULE/UDT NAMES";if(!Array.isArray(e)||!e.length)throw new Error(`${t}:${i}: rules arg must be array with length > 0`);if(!Array.isArray(r))throw new Error(`${t}:${i}: udts arg must be array`);for(d=0;dl[e].lower?1:0})),f){for(d=0;dh[e].lower?1:0}))}if(97===n.charCodeAt(0)){for(p+=" - alphabetical by rule/UDT name\n",d=0;d{t.exports=function(){const t="syntax-callbacks.js: ",e=r(8737),n=e.ids;let i;this.callbacks=[],this.callbacks.andop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.basicelementerr=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1===i.basicError&&s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsclose=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),i.clsOpen=null,i.basicError=!0;break;case n.MATCH:s.strict&&s.errors.push({line:s.findLine(s.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),i.clsOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsopen=function(e,r,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.clsOpen=o;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.clsstring=function(e,r,i,o){switch(e.state){case n.ACTIVE:o.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.definedaserror=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.file=function(e,r,i,o){switch(e.state){case n.ACTIVE:o.altStack=[],o.repCount=0;break;case n.EMPTY:o.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case n.MATCH:0===o.ruleCount&&o.errors.push({line:0,char:0,msg:"no rules defined"});break;case n.NOMATCH:throw new Error(`${t}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupclose=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.groupOpen),char:i.groupOpen,msg:'Group "(...)" opened but not closed.'}),i=s.altStack.pop(),i.groupError=!0;break;case n.MATCH:i=s.altStack.pop();break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.groupopen=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i={groupOpen:o,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineenderror=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.lineend=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(1===e.phraseLength&&o.strict){const t=13===r[i]?"CR":"LF";o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Line end '${t}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.notop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionclose=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.optionOpen),char:i.optionOpen,msg:'Option "[...]" opened but not closed.'}),i=s.altStack.pop(),i.optionError=!0;break;case n.MATCH:i=s.altStack.pop();break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.optionopen=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i={groupOpen:null,groupError:!1,optionOpen:o,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalclose=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),i.basicError=!0,i.prosValOpen=null;break;case n.MATCH:s.errors.push({line:s.findLine(s.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),i.prosValOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(e,r,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.prosValOpen=o;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(e,r,i,o){switch(e.state){case n.ACTIVE:o.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.repetition=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:case n.MATCH:o.repCount+=1;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rule=function(e,r,o,s){switch(e.state){case n.ACTIVE:s.altStack.length=0,i={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;case n.EMPTY:throw new Error(`${t}synRule: EMPTY: rule cannot be empty`);case n.NOMATCH:break;case n.MATCH:s.ruleCount+=1;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.stringTabChar=i;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(e,r,o,s){switch(e.state){case n.ACTIVE:case n.EMPTY:break;case n.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.tlsOpen),char:i.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),i.basicError=!0,i.tlsOpen=null;break;case n.MATCH:i.tlsOpen=null;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(e,r,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:i.tlsOpen=o;break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(e,r,i,o){switch(e.state){case n.ACTIVE:o.stringTabChar=!1;break;case n.EMPTY:case n.NOMATCH:break;case n.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.udtop=function(r,i,o,s){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(s.strict){const t=e.utils.charsToString(i,o,r.phraseLength);s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:`UDT operator found(${t}) - strict ABNF specified.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Positive look-behind operator(&&) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bknop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Negative look-behind operator(!!) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(r,i,o,s){switch(r.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:if(s.strict){const t=e.utils.charsToString(i,o,r.phraseLength);s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:`Back reference operator(${t}) found - strict ABNF specified.`})}break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.abgop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Beginning of string anchor(%^) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}},this.callbacks.aenop=function(e,r,i,o){switch(e.state){case n.ACTIVE:case n.EMPTY:case n.NOMATCH:break;case n.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"End of string anchor(%$) found - strict ABNF specified."});break;default:throw new Error(`${t}synFile: unrecognized case.`)}}}},979:function(t,e,r){const n=this,i=r(6322),o="UTF8",s="UTF16",a="UTF16BE",u="UTF16LE",l="UTF32",h="UTF32BE",c="UTF32LE",f="UINT7",d="ASCII",p="BINARY",m="UINT8",g="UINT16",v="UINT16LE",y="UINT16BE",b="UINT32",w="UINT32LE",E="UINT32BE",M="ESCAPED",A="STRING",_=function(t,e){switch(t){case o:return i.utf8.encode(e);case a:return i.utf16be.encode(e);case u:return i.utf16le.encode(e);case h:return i.utf32be.encode(e);case c:return i.utf32le.encode(e);case f:return i.uint7.encode(e);case m:return i.uint8.encode(e);case y:return i.uint16be.encode(e);case v:return i.uint16le.encode(e);case E:return i.uint32be.encode(e);case w:return i.uint32le.encode(e);case A:return i.string.encode(e);case M:return i.escaped.encode(e);default:throw new TypeError(`encode type "${t}" not recognized`)}};e.decode=function(t,e){return function(t){switch(t.type){case o:return i.utf8.decode(t.data,t.bom);case u:return i.utf16le.decode(t.data,t.bom);case a:return i.utf16be.decode(t.data,t.bom);case h:return i.utf32be.decode(t.data,t.bom);case c:return i.utf32le.decode(t.data,t.bom);case f:return i.uint7.decode(t.data);case m:return i.uint8.decode(t.data);case y:return i.uint16be.decode(t.data);case v:return i.uint16le.decode(t.data);case E:return i.uint32be.decode(t.data);case w:return i.uint32le.decode(t.data);case A:return i.string.decode(t.data);case M:return i.escaped.decode(t.data);default:throw new TypeError(`decode type "${t.type}" not recognized`)}}(function(t,e){if("string"!=typeof t||""===t)throw new TypeError(`type: "${t}" not recognized`);const r=function(t){const e={type:"",base64:!1},r=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(t);return r&&(r[2]&&(e.type=r[2].toUpperCase()),r[1]&&(e.base64=!0)),e}(t.toUpperCase());if(r.base64){if(r.type===A)throw new TypeError(`type: "${t} "BASE64:" prefix not allowed with type ${A}`);if(Buffer.isBuffer(e))r.data=i.base64.decode(e);else{if("string"!=typeof e)throw new TypeError(`type: "${t} unrecognized data type: typeof(data): ${typeof e}`);{const t=Buffer.from(e,"ascii");r.data=i.base64.decode(t)}}}else r.data=e;switch(r.type){case o:!function(t){t.type=o;const e=t.data;t.bom=0,e.length>=3&&239===e[0]&&187===e[1]&&191===e[2]&&(t.bom=3)}(r);break;case s:case a:case u:!function(t){const e=t.data;switch(t.bom=0,t.type){case s:t.type=a,e.length>=2&&(254===e[0]&&255===e[1]?t.bom=2:255===e[0]&&254===e[1]&&(t.type=u,t.bom=2));break;case a:if(t.type=a,e.length>=2)if(254===e[0]&&255===e[1])t.bom=2;else if(255===e[0]&&254===e[1])throw new TypeError(`src type: "${a}" specified but BOM is for "${u}"`);break;case u:if(t.type=u,e.length>=0){if(254===e[0]&&255===e[1])throw new TypeError(`src type: "${u}" specified but BOM is for "${a}"`);255===e[0]&&254===e[1]&&(t.bom=2)}break;default:throw new TypeError(`UTF16 BOM: src type "${t.type}" unrecognized`)}}(r);break;case l:case h:case c:!function(t){const e=t.data;switch(t.bom=0,t.type){case l:t.type=h,e.length>=4&&(0===e[0]&&0===e[1]&&254===e[2]&&255===e[3]&&(t.bom=4),255===e[0]&&254===e[1]&&0===e[2]&&0===e[3]&&(t.type=c,t.bom=4));break;case h:if(t.type=h,e.length>=4&&(0===e[0]&&0===e[1]&&254===e[2]&&255===e[3]&&(t.bom=4),255===e[0]&&254===e[1]&&0===e[2]&&0===e[3]))throw new TypeError(`src type: ${h} specified but BOM is for ${c}"`);break;case c:if(t.type=c,e.length>=4){if(0===e[0]&&0===e[1]&&254===e[2]&&255===e[3])throw new TypeError(`src type: "${c}" specified but BOM is for "${h}"`);255===e[0]&&254===e[1]&&0===e[2]&&0===e[3]&&(t.bom=4)}break;default:throw new TypeError(`UTF32 BOM: src type "${t.type}" unrecognized`)}}(r);break;case g:r.type=y;break;case b:r.type=E;break;case d:r.type=f;break;case p:r.type=m;break;case f:case m:case v:case y:case w:case E:case A:case M:break;default:throw new TypeError(`type: "${t}" not recognized`)}if(r.type===A){if("string"!=typeof r.data)throw new TypeError(`type: "${t}" but data is not a string`)}else if(!Buffer.isBuffer(r.data))throw new TypeError(`type: "${t}" but data is not a Buffer`);return r}(t,e))},e.encode=function(t,e){let r,n;const N=function(t,e){if(!Array.isArray(e))throw new TypeError('dst chars: not array: "'+typeof e);if("string"!=typeof t)throw new TypeError('dst type: not string: "'+typeof t);const r=function(t){let e,r;const n={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(r=t,e=t.slice(0,5),"CRLF:"===e){n.crlf=!0,r=t.slice(5);break}if(e=t.slice(0,3),"LF:"===e){n.lf=!0,r=t.slice(3);break}break}return e=r.split(":"),1===e.length?n.type=e[0]:2===e.length&&"BASE64"===e[1]&&(n.base64=!0,n.type=e[0]),n}(t.toUpperCase());switch(r.type){case o:case a:case u:case h:case c:case f:case m:case v:case y:case w:case E:case M:break;case A:if(r.base64)throw new TypeError(`":BASE64" suffix not allowed with type ${A}`);break;case d:r.type=f;break;case p:r.type=m;break;case s:r.type=a;break;case l:r.type=h;break;case g:r.type=y;break;case b:r.type=E;break;default:throw new TypeError(`dst type unrecognized: "${t}" : must have form [crlf:|lf:]type[:base64]`)}return r}(t,e);return N.crlf?(r=i.lineEnds.crlf(e),n=_(N.type,r)):N.lf?(r=i.lineEnds.lf(e),n=_(N.type,r)):n=_(N.type,e),N.base64&&(n=i.base64.encode(n)),n},e.convert=function(t,e,r){return n.encode(r,n.decode(t,e))}},6322:function(t,e){const r=this,n=4294967292,i=4294967293,o=4294967294,s=4294967295,a=[0,1,3,7,15,31,63,127,255,511,1023],u=["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"],l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),h=[];l.forEach((t=>{h.push(t.charCodeAt(0))})),e.utf8={encode(t){const e=[];return t.forEach((t=>{if(t>=0&&t<=127)e.push(t);else if(t<=2047)e.push(192+(t>>6&a[5])),e.push(128+(t&a[6]));else if(t<55296||t>57343&&t<=65535)e.push(224+(t>>12&a[4])),e.push(128+(t>>6&a[6])),e.push(128+(t&a[6]));else{if(!(t>=65536&&t<=1114111))throw new RangeError(`utf8.encode: character out of range: char: ${t}`);{const r=t>>16&a[5];e.push(240+(r>>2)),e.push(128+((r&a[2])<<4)+(t>>12&a[4])),e.push(128+(t>>6&a[6])),e.push(128+(t&a[6]))}}})),Buffer.from(e)},decode(t,e){function r(t,e){if(128!=(192&e))return i;const r=((t&a[5])<<6)+(e&a[6]);return r<128?n:r}function u(t,e,r){if(128!=(192&r)||128!=(192&e))return i;const s=((t&a[4])<<12)+((e&a[6])<<6)+(r&a[6]);return s<2048?n:s>=55296&&s<=57343?o:s}function l(t,e,r,s){if(128!=(192&s)||128!=(192&r)||128!=(192&e))return i;const u=(((t&a[3])<<2)+(e>>4&a[2])<<16)+((e&a[4])<<12)+((r&a[6])<<6)+(s&a[6]);return u<65536?n:u>1114111?o:u}let h,c,f,d,p,m;const g=t.length;let v=e?3:0;const y=[];for(;v=0&&c<=127){h=c,m=1;break}if(f=v+1,f=194&&c<=223){h=r(c,t[f]),m=2;break}if(d=v+2,d=224&&c<=239){h=u(c,t[f],t[d]),m=3;break}if(p=v+3,p=240&&c<=244){h=l(c,t[f],t[d],t[p]),m=4;break}break}if(h>1114111){const t=`byte[${v}]`;if(h===s)throw new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${t}`);if(h===i)throw new RangeError(`utf8.decode: illegal trailing byte found at: ${t}`);if(h===o)throw new RangeError(`utf8.decode: code point out of range found at: ${t}`);if(h===n)throw new RangeError(`utf8.decode: non-shortest form found at: ${t}`);throw new RangeError(`utf8.decode: unrecognized error found at: ${t}`)}y.push(h),v+=m}return y}},e.utf16be={encode(t){const e=[];let r,n,i;for(let o=0;o=0&&r<=55295||r>=57344&&r<=65535)e.push(r>>8&a[8]),e.push(r&a[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${o}]: ${r}`);i=r-65536,n=55296+(i>>10),i=56320+(i&a[10]),e.push(n>>8&a[8]),e.push(n&a[8]),e.push(i>>8&a[8]),e.push(i&a[8])}return Buffer.from(e)},decode(t,e){if(t.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${t.length}`);const r=[],n=t.length;let i,o,s,a,u,l,h=e?2:0,c=0;for(;h57343){i=u,o=2;break}if(a=h+3,a=56320&&l<=57343)){i=65536+(u-55296<<10)+(l-56320),o=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${h}]`)}r[c++]=i,h+=o}return r}},e.utf16le={encode(t){const e=[];let r,n,i;for(let o=0;o=0&&r<=55295||r>=57344&&r<=65535)e.push(r&a[8]),e.push(r>>8&a[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${o}]: ${r}`);i=r-65536,n=55296+(i>>10),i=56320+(i&a[10]),e.push(n&a[8]),e.push(n>>8&a[8]),e.push(i&a[8]),e.push(i>>8&a[8])}return Buffer.from(e)},decode(t,e){if(t.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${t.length}`);const r=[],n=t.length;let i,o,s,a,u,l,h=e?2:0,c=0;for(;h57343){i=u,o=2;break}if(a=h+3,a=56320&&l<=57343)){i=65536+(u-55296<<10)+(l-56320),o=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${h}]`)}r[c++]=i,h+=o}return r}},e.utf32be={encode(t){const e=Buffer.alloc(4*t.length);let r=0;return t.forEach((t=>{if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${r/4}]: ${t}`);e[r++]=t>>24&a[8],e[r++]=t>>16&a[8],e[r++]=t>>8&a[8],e[r++]=t&a[8]})),e},decode(t,e){if(t.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${t.length}`);const r=[];let n=e?4:0;for(;n=55296&&e<=57343||e>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${n/4}]: ${e}`);r.push(e)}return r}},e.utf32le={encode(t){const e=Buffer.alloc(4*t.length);let r=0;return t.forEach((t=>{if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${t}`);e[r++]=t&a[8],e[r++]=t>>8&a[8],e[r++]=t>>16&a[8],e[r++]=t>>24&a[8]})),e},decode(t,e){if(t.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${t.length}`);const r=[];let n=e?4:0;for(;n=55296&&e<=57343||e>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${e}`);r.push(e)}return r}},e.uint7={encode(t){const e=Buffer.alloc(t.length);for(let r=0;r127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${r}]: ${t[r]}`);e[r]=t[r]}return e},decode(t){const e=[];for(let r=0;r127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${r}]: ${t[r]}`);e[r]=t[r]}return e}},e.uint8={encode(t){const e=Buffer.alloc(t.length);for(let r=0;r255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${r}]: ${t[r]}`);e[r]=t[r]}return e},decode(t){const e=[];for(let r=0;r{if(t>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${r/2}]: ${t}`);e[r++]=t>>8&a[8],e[r++]=t&a[8]})),e},decode(t){if(t.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${t.length}`);const e=[];for(let r=0;r{if(t>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${r/2}]: ${t}`);e[r++]=t&a[8],e[r++]=t>>8&a[8]})),e},decode(t){if(t.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${t.length}`);const e=[];for(let r=0;r{e[r++]=t>>24&a[8],e[r++]=t>>16&a[8],e[r++]=t>>8&a[8],e[r++]=t&a[8]})),e},decode(t){if(t.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${t.length}`);const e=[];for(let r=0;r{e[r++]=t&a[8],e[r++]=t>>8&a[8],e[r++]=t>>16&a[8],e[r++]=t>>24&a[8]})),e},decode(t){if(t.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${t.length}`);const e=[];for(let r=0;rr.utf16le.encode(t).toString("utf16le"),decode:t=>r.utf16le.decode(Buffer.from(t,"utf16le"),0)},e.escaped={encode(t){const e=[];for(let r=0;r=32&&n<=126)e.push(n);else{let t="";if(n>=0&&n<=31)t+=`\`x${u[n]}`;else if(n>=127&&n<=255)t+=`\`x${u[n]}`;else if(n>=256&&n<=65535)t+=`\`u${u[n>>8&a[8]]}${u[n&a[8]]}`;else{if(!(n>=65536&&n<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");{t+="`u{";const e=n>>24&a[8];e>0&&(t+=u[e]),t+=`${u[n>>16&a[8]]+u[n>>8&a[8]]+u[n&a[8]]}}`}}Buffer.from(t).forEach((t=>{e.push(t)}))}}return Buffer.from(e)},decode(t){function e(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function r(t,r,n){const i={char:null,nexti:t+2,error:!0};if(t+1=s)break;if(96===t[a]){o.push(96),h+=2,l=!1;break}if(120===t[a]){if(u=r(a+1,s,t),u.error)break;o.push(u.char),h=u.nexti,l=!1;break}if(117===t[a]){if(123===t[a+1]){if(u=i(a+2,s,t),u.error)break;o.push(u.char),h=u.nexti,l=!1;break}if(u=n(a+1,s,t),u.error)break;o.push(u.char),h=u.nexti,l=!1;break}break}if(l)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${h}]`)}return o}};const c=10;e.lineEnds={crlf(t){const e=[];let r=0;for(;r0&&e[e.length-1]!==c&&(e.push(13),e.push(c)),e},lf(t){const e=[];let r=0;for(;r0&&e[e.length-1]!==c&&e.push(c),e}},e.base64={encode(t){if(0===t.length)return Buffer.alloc(0);let e,r,n,i=t.length%3;i=i>0?3-i:0;let o=(t.length+i)/3;const s=Buffer.alloc(4*o);i>0&&(o-=1),e=0,r=0;for(let i=0;i>18&a[6]],s[r++]=h[n>>12&a[6]],s[r++]=h[n>>6&a[6]],s[r++]=h[n&a[6]];return 0===i?s:1===i?(n=t[e++]<<16,n+=t[e]<<8,s[r++]=h[n>>18&a[6]],s[r++]=h[n>>12&a[6]],s[r++]=h[n>>6&a[6]],s[r]=h[64],s):2===i?(n=t[e]<<16,s[r++]=h[n>>18&a[6]],s[r++]=h[n>>12&a[6]],s[r++]=h[64],s[r]=h[64],s):void 0},decode(t){if(0===t.length)return Buffer.alloc(0);const e=function(t){const e=[];let r=0;for(let n=0;n=65&&i<=90){e.push(i-65);break}if(i>=97&&i<=122){e.push(i-71);break}if(i>=48&&i<=57){e.push(i+4);break}if(43===i){e.push(62);break}if(47===i){e.push(63);break}if(61===i){e.push(64),r+=1;break}throw new RangeError(`base64.decode: invalid character buf[${n}]: ${i}`)}}if(e.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${e.length}`);switch(r){case 0:break;case 1:if(64!==e[e.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==e[e.length-1]||64!==e[e.length-2])throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${r}`)}return{tail:r,buf:Buffer.from(e)}}(t),{tail:r}=e,n=e.buf;let i,o,s,u=n.length/4;const l=Buffer.alloc(3*u-r);r>0&&(u-=1),o=0,i=0;for(let t=0;t>16&a[8],l[o++]=s>>8&a[8],l[o++]=s&a[8];return 1===r&&(s=n[i++]<<18,s+=n[i++]<<12,s+=n[i]<<6,l[o++]=s>>16&a[8],l[o]=s>>8&a[8]),2===r&&(s=n[i++]<<18,s+=n[i++]<<12,l[o]=s>>16&a[8]),l},toString(t){if(t.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${t.length}`);let e="",r=0;function n(t,n,i,o){switch(r){case 76:e+=`\r\n${t}${n}${i}${o}`,r=4;break;case 75:e+=`${t}\r\n${n}${i}${o}`,r=3;break;case 74:e+=`${t+n}\r\n${i}${o}`,r=2;break;case 73:e+=`${t+n+i}\r\n${o}`,r=1;break;default:e+=t+n+i+o,r+=4}}for(let e=0;e=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||43===i||47===i||61===i))throw new RangeError(`base64.toString: buf[${r}]: ${t[r]} : not valid base64 character code`);n(String.fromCharCode(t[e]),String.fromCharCode(t[e+1]),String.fromCharCode(t[e+2]),String.fromCharCode(t[e+3]))}var i;return e}}},580:(t,e,r)=>{t.exports=function(){const t=r(8276),e=r(8544),n=this;let i=null,o=null,s=null,a=0;const u=[],l=[],h=[],c=[];function f(t){let e="";for(let r=0;r0?c[t-1].stack:0},this.getLength=function(){return c.length},this.toXml=function(r){let n=e.charsToDec,i="decimal integer character codes";if("string"==typeof r&&r.length>=3){const t=r.slice(0,3).toLowerCase();"asc"===t?(n=e.charsToAscii,i="ASCII for printing characters, hex for non-printing"):"hex"===t?(n=e.charsToHex,i="hexadecimal integer character codes"):"uni"===t&&(n=e.charsToUnicode,i="Unicode UTF-32 integer character codes")}let o="",a=0;return o+='\n',o+=`\n`,o+=`\x3c!-- input string, ${i} --\x3e\n`,o+=f(a+2),o+=n(s),o+="\n",c.forEach((e=>{e.state===t.SEM_PRE?(a+=1,o+=f(a),o+=`\n`,o+=f(a+2),o+=n(s,e.phraseIndex,e.phraseLength),o+="\n"):(o+=f(a),o+=`\x3c!-- name="${e.name}" --\x3e\n`,a-=1)})),o+="\n",o},this.phrases=function(){const e={};let r,n;for(r=0;r{t.exports=function(){let t=-1,e=0;this.init=function(r){if("number"!=typeof r||r<=0)throw new Error("circular-buffer.js: init: circular buffer size must an integer > 0");e=Math.ceil(r),t=-1},this.increment=function(){return t+=1,(t+e)%e},this.maxSize=function(){return e},this.items=function(){return t+1},this.getListIndex=function(r){return-1===t||r<0||r>t||t-r>=e?-1:(r+e)%e},this.forEach=function(r){if(-1!==t)if(t{t.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}\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"}},8276:t=>{t.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}},8737:(t,e,r)=>{t.exports={ast:r(580),circular:r(2761),ids:r(8276),parser:r(8629),stats:r(5403),trace:r(9290),utils:r(8544),emitcss:r(1593),style:r(3932)}},8629:(t,e,r)=>{t.exports=function(){const t=r(8276),e=r(8544),n="parser.js: ",i=this;let o;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let s,a,u,l,h=null,c=null,f=0,d=0,p=0,m=null,g=null,v=null,y=null,b=null,w=0,E=1/0,M=1/0;const A=function(e,r,i){const s=`${n}evaluateRule(): `;if(e>=v.length)throw new Error(`${s}rule index: ${e} out of range`);if(r>=u)throw new Error(`${s}phrase index: ${r} out of range`);const{length:a}=h;h.push({type:t.RNM,index:e}),o(a,r,i),h.pop()},_=function(e,r,i){const s=`${n}evaluateUdt(): `;if(e>=y.length)throw new Error(`${s}udt index: ${e} out of range`);if(r>=u)throw new Error(`${s}phrase index: ${r} out of range`);const{length:a}=h;h.push({type:t.UDT,empty:y[e].empty,index:e}),o(a,r,i),h.pop()},N=function(){f=0,d=0,p=0,w=0,l=[{lookAround:t.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],v=null,y=null,c=null,s=0,a=0,u=0,m=null,g=null,b=null,h=null},S=function(){const t=[];this.push=function(){t.push(function(){const e=t[t.length-1],r={};for(const t in e)r[t]=e[t];return r}())},this.pop=function(e){let r=e;if(r||(r=t.length-1),r<1||r>t.length)throw new Error(`${n}backRef.pop(): bad length: ${r}`);return t.length=r,t[t.length-1]},this.length=function(){return t.length},this.savePhrase=function(e,r,n){t[t.length-1][e]={phraseIndex:r,phraseLength:n}},this.getPhrase=function(e){return t[t.length-1][e]},function(){const e={};v.forEach((t=>{t.isBkr&&(e[t.lower]=null)})),y.length>0&&y.forEach((t=>{t.isBkr&&(e[t.lower]=null)})),t.push(e)}()},k=function(){const e=this;this.state=t.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=l[l.length-1],this.uFrame=new S,this.pFrame=new S,this.evaluateRule=A,this.evaluateUdt=_,this.refresh=function(){e.state=t.ACTIVE,e.phraseLength=0,e.lookAround=l[l.length-1]}},T=function(){return l[l.length-1]},R=function(){return l.length>1},x=function(t,r,i){const o=`${n}initializeInputChars(): `;let l=t,h=r,f=i;if(void 0===l)throw new Error(`${o}input string is undefined`);if(null===l)throw new Error(`${o}input string is null`);if("string"==typeof l)l=e.stringToChars(l);else if(!Array.isArray(l))throw new Error(`${o}input string is not a string or array`);if(l.length>0&&"number"!=typeof l[0])throw new Error(`${o}input string not an array of integers`);if("number"!=typeof h)h=0;else if(h=Math.floor(h),h<0||h>l.length)throw new Error(`${o}input beginning index out of range: ${h}`);if("number"!=typeof f)f=l.length-h;else if(f=Math.floor(f),f<0||f>l.length-h)throw new Error(`${o}input length out of range: ${f}`);c=l,s=h,a=f,u=s+a};this.setMaxTreeDepth=function(t){if("number"!=typeof t)throw new Error(`parser: max tree depth must be integer > 0: ${t}`);if(E=Math.floor(t),E<=0)throw new Error(`parser: max tree depth must be integer > 0: ${t}`)},this.setMaxNodeHits=function(t){if("number"!=typeof t)throw new Error(`parser: max node hits must be integer > 0: ${t}`);if(M=Math.floor(t),M<=0)throw new Error(`parser: max node hits must be integer > 0: ${t}`)};const O=function(e,r,l){let f;const E=`${n}parse(): `;!function(t){const e=`${n}initializeGrammar(): `;if(!t)throw new Error(`${e}grammar object undefined`);if("grammarObject"!==t.grammarObject)throw new Error(`${e}bad grammar object`);v=t.rules,y=t.udts}(e);const M=function(t){const e=`${n}initializeStartRule(): `;let r=null;if("number"==typeof t){if(t>=v.length)throw new Error(`${e}start rule index too large: max: ${v.length}: index: ${t}`);r=t}else{if("string"!=typeof t)throw new Error(`${e}type of start rule '${typeof t}' not recognized`);{const n=t.toLowerCase();for(let t=0;ti){let t=`${n}opRNM(${e.name}): callback function error: `;throw t+=`sysData.phraseLength: ${r.phraseLength}`,t+=` must be <= remaining chars: ${i}`,new Error(t)}switch(r.state){case t.ACTIVE:if(!0!==o)throw new Error(`${n}opRNM(${e.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:r.phraseLength=0;break;case t.MATCH:0===r.phraseLength&&(r.state=t.EMPTY);break;case t.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${n}opRNM(${e.name}): callback function return error. Unrecognized return state: ${r.state}`)}},P=function(e,r,n){let s,a,l,f,d,p;const g=h[e],y=v[g.index],w=m[y.index],E=!R();if(E&&(a=i.ast&&i.ast.ruleDefined(g.index),a&&(s=i.ast.getLength(),i.ast.down(g.index,v[g.index].name)),f=n.uFrame.length(),d=n.pFrame.length(),n.uFrame.push(),n.pFrame.push(),p=n.pFrame,n.pFrame=new S),null===w)l=h,h=y.opcodes,o(0,r,n),h=l;else{const e=u-r;n.ruleIndex=y.index,w(n,c,r,b),C(y,n,e,!0),n.state===t.ACTIVE&&(l=h,h=y.opcodes,o(0,r,n),h=l,n.ruleIndex=y.index,w(n,c,r,b),C(y,n,e,!1))}E&&(a&&(n.state===t.NOMATCH?i.ast.setLength(s):i.ast.up(g.index,y.name,r,n.phraseLength)),n.pFrame=p,n.state===t.NOMATCH?(n.uFrame.pop(f),n.pFrame.pop(d)):y.isBkr&&(n.pFrame.savePhrase(y.lower,r,n.phraseLength),n.uFrame.savePhrase(y.lower,r,n.phraseLength)))},L=function(e,r,o){let s,a,l,f,d,p;const m=h[e],w=y[m.index];o.UdtIndex=w.index;const E=!R();E&&(l=i.ast&&i.ast.udtDefined(m.index),l&&(a=v.length+m.index,s=i.ast.getLength(),i.ast.down(a,w.name)),f=o.uFrame.length(),d=o.pFrame.length(),o.uFrame.push(),o.pFrame.push(),p=o.pFrame,o.pFrame=new S);const M=u-r;g[m.index](o,c,r,b),function(e,r,i){if(r.phraseLength>i){let t=`${n}opUDT(${e.name}): callback function error: `;throw t+=`sysData.phraseLength: ${r.phraseLength}`,t+=` must be <= remaining chars: ${i}`,new Error(t)}switch(r.state){case t.ACTIVE:throw new Error(`${n}opUDT(${e.name}): callback function return error. ACTIVE state not allowed.`);case t.EMPTY:if(!1===e.empty)throw new Error(`${n}opUDT(${e.name}): callback function return error. May not return EMPTY.`);r.phraseLength=0;break;case t.MATCH:if(0===r.phraseLength){if(!1===e.empty)throw new Error(`${n}opUDT(${e.name}): callback function return error. May not return EMPTY.`);r.state=t.EMPTY}break;case t.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${n}opUDT(${e.name}): callback function return error. Unrecognized return state: ${r.state}`)}}(w,o,M),E&&(l&&(o.state===t.NOMATCH?i.ast.setLength(s):i.ast.up(a,w.name,r,o.phraseLength)),o.pFrame=p,o.state===t.NOMATCH?(o.uFrame.pop(f),o.pFrame.pop(d)):w.isBkr&&(o.pFrame.savePhrase(w.lower,r,o.phraseLength),o.uFrame.savePhrase(w.lower,r,o.phraseLength)))},U=function(e,r,n){l.push({lookAround:t.LOOKAROUND_AHEAD,anchor:r,charsEnd:u,charsLength:a}),u=c.length,a=c.length-s,o(e+1,r,n);const i=l.pop();switch(u=i.charsEnd,a=i.charsLength,n.phraseLength=0,n.state){case t.EMPTY:case t.MATCH:n.state=t.EMPTY;break;case t.NOMATCH:n.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${n.state}`)}},B=function(e,r,n){l.push({lookAround:t.LOOKAROUND_AHEAD,anchor:r,charsEnd:u,charsLength:a}),u=c.length,a=c.length-s,o(e+1,r,n);const i=l.pop();switch(u=i.charsEnd,a=i.charsLength,n.phraseLength=0,n.state){case t.EMPTY:case t.MATCH:n.state=t.NOMATCH;break;case t.NOMATCH:n.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${n.state}`)}},D=function(e,r,n){n.state=t.NOMATCH,n.phraseLength=0,n.state=0===r?t.EMPTY:t.NOMATCH},F=function(e,r,n){n.state=t.NOMATCH,n.phraseLength=0,n.state=r===c.length?t.EMPTY:t.NOMATCH},j=function(e,r,n){switch(l.push({lookAround:t.LOOKAROUND_BEHIND,anchor:r}),o(e+1,r,n),l.pop(),n.phraseLength=0,n.state){case t.EMPTY:case t.MATCH:n.state=t.EMPTY;break;case t.NOMATCH:n.state=t.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${n.state}`)}},G=function(e,r,n){switch(l.push({lookAround:t.LOOKAROUND_BEHIND,anchor:r}),o(e+1,r,n),l.pop(),n.phraseLength=0,n.state){case t.EMPTY:case t.MATCH:n.state=t.NOMATCH;break;case t.NOMATCH:n.state=t.EMPTY;break;default:throw new Error(`opBKN: invalid state ${n.state}`)}};o=function(e,r,n){let s=!0;const a=h[e];if(p+=1,p>M)throw new Error(`parser: maximum number of node hits exceeded: ${M}`);if(f+=1,f>d&&(d=f,d>E))throw new Error(`parser: maximum parse tree depth exceeded: ${E}`);if(n.refresh(),null!==i.trace){const t=T();i.trace.down(a,n.state,r,n.phraseLength,t.anchor,t.lookAround)}if(l[l.length-1].lookAround===t.LOOKAROUND_BEHIND)switch(a.type){case t.ALT:I(e,r,n);break;case t.CAT:!function(e,r,n){let s,a,u,l;const c=h[e],f=n.uFrame.length(),d=n.pFrame.length();i.ast&&(a=i.ast.getLength()),s=!0,u=r,l=0;for(let e=c.children.length-1;e>=0;e-=1)if(o(c.children[e],u,n),u-=n.phraseLength,l+=n.phraseLength,n.state===t.NOMATCH){s=!1;break}s?(n.state=0===l?t.EMPTY:t.MATCH,n.phraseLength=l):(n.state=t.NOMATCH,n.phraseLength=0,n.uFrame.pop(f),n.pFrame.pop(d),i.ast&&i.ast.setLength(a))}(e,r,n);break;case t.REP:!function(e,r,n){let s,a,u,l;const c=h[e];a=r,u=0,l=0;const f=n.uFrame.length(),d=n.pFrame.length();for(i.ast&&(s=i.ast.getLength());!(a<=0)&&(o(e+1,a,n),n.state!==t.NOMATCH)&&n.state!==t.EMPTY&&(l+=1,u+=n.phraseLength,a-=n.phraseLength,l!==c.max););n.state===t.EMPTY||l>=c.min?(n.state=0===u?t.EMPTY:t.MATCH,n.phraseLength=u):(n.state=t.NOMATCH,n.phraseLength=0,n.uFrame.pop(f),n.pFrame.pop(d),i.ast&&i.ast.setLength(s))}(e,r,n);break;case t.RNM:P(e,r,n);break;case t.UDT:L(e,r,n);break;case t.AND:U(e,r,n);break;case t.NOT:B(e,r,n);break;case t.TRG:!function(e,r,n){const i=h[e];if(n.state=t.NOMATCH,n.phraseLength=0,r>0){const e=c[r-1];i.min<=e&&e<=i.max&&(n.state=t.MATCH,n.phraseLength=1)}}(e,r,n);break;case t.TBS:!function(e,r,n){let i;const o=h[e];n.state=t.NOMATCH;const s=o.string.length,a=r-s;if(a>=0){for(i=0;i=0){for(let t=0;t=65&&i<=90&&(i+=32),i!==o.string[t])return;n.state=t.MATCH,n.phraseLength=s}}(e,r,n);break;case t.BKR:!function(e,r,n){let i,o,s,a;const u=h[e];n.state=t.NOMATCH,n.phraseLength=0,a=u.index=0){if(f){for(i=0;i=65&&o<=90&&(o+=32),s>=65&&s<=90&&(s+=32),o!==s)return;n.state=t.MATCH,n.phraseLength=p}else for(i=0;i
=u)&&(o(e+1,a,n),n.state!==t.NOMATCH)&&n.state!==t.EMPTY&&(c+=1,l+=n.phraseLength,a+=n.phraseLength,c!==f.max););n.state===t.EMPTY||c>=f.min?(n.state=0===l?t.EMPTY:t.MATCH,n.phraseLength=l):(n.state=t.NOMATCH,n.phraseLength=0,n.uFrame.pop(d),n.pFrame.pop(p),i.ast&&i.ast.setLength(s))}(e,r,n);break;case t.RNM:P(e,r,n);break;case t.UDT:L(e,r,n);break;case t.AND:U(e,r,n);break;case t.NOT:B(e,r,n);break;case t.TRG:!function(e,r,n){const i=h[e];n.state=t.NOMATCH,r=65&&o<=90&&(o+=32),o!==s.string[i])return;n.state=t.MATCH,n.phraseLength=a}}else n.state=t.EMPTY}(e,r,n);break;case t.BKR:!function(e,r,n){let i,o,s,a;const l=h[e];n.state=t.NOMATCH,a=l.index=65&&o<=90&&(o+=32),s>=65&&s<=90&&(s+=32),o!==s)return;n.state=t.MATCH,n.phraseLength=m}else for(i=0;iw&&(w=r+n.phraseLength),null!==i.stats&&i.stats.collect(a,n),null!==i.trace){const t=T();i.trace.up(a,n.state,r,n.phraseLength,t.anchor,t.lookAround)}return f-=1,s}}},5403:(t,e,r)=>{t.exports=function(){const t=r(8276),e=r(8544),n=r(3932);let i=[],o=[];const s=[];let a;const u=[],l=[];this.statsObject="statsObject";const h=function(t,e){return t.lowere.lower?1:0},c=function(t,e){return t.totale.total?-1:h(t,e)},f=function(t,e){return t.indexe.index?1:0},d=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},p=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 new Error(`stats.js: collect(): incStat(): unrecognized state: ${r}`)}},m=function(t,e){let r="";return r+="",r+=`${t} | `,r+=`${e.empty} | `,r+=`${e.match} | `,r+=`${e.nomatch} | `,r+=`${e.total} | `,r+="
\n",r},g=function(){let e="";return e+=m("ALT",s[t.ALT]),e+=m("CAT",s[t.CAT]),e+=m("REP",s[t.REP]),e+=m("RNM",s[t.RNM]),e+=m("TRG",s[t.TRG]),e+=m("TBS",s[t.TBS]),e+=m("TLS",s[t.TLS]),e+=m("UDT",s[t.UDT]),e+=m("AND",s[t.AND]),e+=m("NOT",s[t.NOT]),e+=m("BKR",s[t.BKR]),e+=m("BKA",s[t.BKA]),e+=m("BKN",s[t.BKN]),e+=m("ABG",s[t.ABG]),e+=m("AEN",s[t.AEN]),e+=m("totals",a),e},v=function(){let t="";t+=" | | | | |
\n",t+="rules | | | | |
\n";for(let e=0;e0&&(t+="",t+=`${u[e].name} | `,t+=`${u[e].empty} | `,t+=`${u[e].match} | `,t+=`${u[e].nomatch} | `,t+=`${u[e].total} | `,t+="
\n");if(o.length>0){t+=" | | | | |
\n",t+="udts | | | | |
\n";for(let e=0;e0&&(t+="",t+=`${l[e].name} | `,t+=`${l[e].empty} | `,t+=`${l[e].match} | `,t+=`${l[e].nomatch} | `,t+=`${l[e].total} | `,t+="
\n")}return t};this.validate=function(t){let e=!1;return"string"==typeof t&&"stats"===t&&(e=!0),e},this.init=function(e,r){i=e,o=r,function(){s.length=0,a=new d,s[t.ALT]=new d,s[t.CAT]=new d,s[t.REP]=new d,s[t.RNM]=new d,s[t.TRG]=new d,s[t.TBS]=new d,s[t.TLS]=new d,s[t.UDT]=new d,s[t.AND]=new d,s[t.NOT]=new d,s[t.BKR]=new d,s[t.BKA]=new d,s[t.BKN]=new d,s[t.ABG]=new d,s[t.AEN]=new d,u.length=0;for(let t=0;t0){l.length=0;for(let t=0;t\n`,"string"==typeof e&&(r+=`${e}\n`),r+=`ops | \n`,r+=`EMPTY | \n`,r+=`MATCH | \n`,r+=`NOMATCH | \n`,r+=`totals |
\n`;;){if(void 0===t){r+=g();break}if(null===t){r+=g();break}if("ops"===t){r+=g();break}if("index"===t){u.sort(f),l.length>0&&l.sort(f),r+=g(),r+=v();break}if("hits"===t){u.sort(c),l.length>0&&l.sort(f),r+=g(),r+=v();break}if("alpha"===t){u.sort(h),l.length>0&&l.sort(h),r+=g(),r+=v();break}break}return r+="\n",r},this.toHtmlPage=function(t,r,n){return e.htmlToPage(this.toHtml(t,r),n)}}},3932:t=>{t.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"}},9290:(t,e,r)=>{t.exports=function(){const t=r(8544),e=r(3932),n=new(r(2761)),i=r(8276),o="trace.js: ",s=this,a=16,u=80,l=[];let h=5e3,c=-1,f=0,d=0;const p=[];let m=null,g=null,v=null;const y=[],b=[],w=`•`,E=`…`,M=`𝜺`;this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(t,e){c=-1,"number"==typeof t&&t>0?(h=Math.ceil(t),"number"==typeof e&&(c=Math.floor(e),c<0&&(c=-1))):h=0},this.getMaxRecords=function(){return h},this.getLastRecord=function(){return c},this.init=function(t,e,r){l.length=0,p.length=0,f=0,d=0,m=r,g=t,v=e,function(){const t=function(t){y[i.ALT]=t,y[i.CAT]=t,y[i.REP]=t,y[i.TLS]=t,y[i.TBS]=t,y[i.TRG]=t,y[i.AND]=t,y[i.NOT]=t,y[i.BKR]=t,y[i.BKA]=t,y[i.BKN]=t,y[i.ABG]=t,y[i.AEN]=t};let e=0;for(const t in s.filter.operators)e+=1;if(0!==e){for(const e in s.filter.operators){const r=e.toUpperCase();if(""===r)return void t(!0);if(""===r)return void t(!1)}t(!1);for(const t in s.filter.operators){const e=t.toUpperCase();if("ALT"===e)y[i.ALT]=!0===s.filter.operators[t];else if("CAT"===e)y[i.CAT]=!0===s.filter.operators[t];else if("REP"===e)y[i.REP]=!0===s.filter.operators[t];else if("AND"===e)y[i.AND]=!0===s.filter.operators[t];else if("NOT"===e)y[i.NOT]=!0===s.filter.operators[t];else if("TLS"===e)y[i.TLS]=!0===s.filter.operators[t];else if("TBS"===e)y[i.TBS]=!0===s.filter.operators[t];else if("TRG"===e)y[i.TRG]=!0===s.filter.operators[t];else if("BKR"===e)y[i.BKR]=!0===s.filter.operators[t];else if("BKA"===e)y[i.BKA]=!0===s.filter.operators[t];else if("BKN"===e)y[i.BKN]=!0===s.filter.operators[t];else if("ABG"===e)y[i.ABG]=!0===s.filter.operators[t];else{if("AEN"!==e)throw new Error(`${o}initOpratorFilter: '${t}' not a valid operator name. Must be , , alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`);y[i.AEN]=!0===s.filter.operators[t]}}}else t(!1)}(),function(){const t=function(t){y[i.RNM]=t,y[i.UDT]=t;const e=g.length+v.length;b.length=0;for(let r=0;r"===r)return void t(!0);if(""===r)return void t(!1)}t(!1),y[i.RNM]=!0,y[i.UDT]=!0;for(const t in s.filter.rules){const e=t.toLowerCase();if(r=n.indexOf(e),r<0)throw new Error(`${o}initRuleFilter: '${t}' not a valid rule or udt name`);b[r]=!0===s.filter.rules[t]}}else t(!0)}(),n.init(h)};const A=function(t){let e=!1;return e=t.type===i.RNM?!(!y[t.type]||!b[t.index]):t.type===i.UDT?!(!y[t.type]||!b[g.length+t.index]):y[t.type],e},_=function(t){return-1===c||t<=c};this.down=function(t,e,r,i,o,s){_(f)&&A(t)&&(p.push(f),l[n.increment()]={dirUp:!1,depth:d,thisLine:f,thatLine:void 0,opcode:t,state:e,phraseIndex:r,phraseLength:i,lookAnchor:o,lookAround:s},f+=1,d+=1)},this.up=function(t,e,r,i,o,s){if(_(f)&&A(t)){const a=f,u=p.pop(),h=n.getListIndex(u);-1!==h&&(l[h].thatLine=a),d-=1,l[n.increment()]={dirUp:!0,depth:d,thisLine:a,thatLine:u,opcode:t,state:e,phraseIndex:r,phraseLength:i,lookAnchor:o,lookAround:s},f+=1}},this.toTree=function(e){const r=function(){function e(e,r){let n,o,s;if(r)switch(e.op={id:r.type,name:t.opcodeToString(r.type)},e.opData=void 0,r.type){case i.RNM:e.opData=g[r.index].name;break;case i.UDT:e.opData=v[r.index].name;break;case i.BKR:n=r.index{if(w=l[t],E&&(E=!1,w.depth>0)){const t=w.dirUp?w.depth+1:w.depth;for(let e=0;e1;)y=f.pop(),a(y,null);if(0===M.children.length)throw new Error("trace.toTree(): parse tree has no nodes");if(0===f.length)throw new Error("trace.toTree(): integrity check: dummy root node disappeared?");p=M.children[0];let A=p;for(;p&&!p.down&&!p.up;)A=p,p=p.children[0];p=A,p.leftMost=!0,p.rightMost=!0,function t(e){if(h+=1,e.branch=c,h>d&&(d=h),0===e.children.length)u+=1;else for(let r=0;r0&&(c+=1),e.children[r].leftMost=!1,e.children[r].rightMost=!1,e.leftMost&&(e.children[r].leftMost=0===r),e.rightMost&&(e.children[r].rightMost=r===e.children.length-1),t(e.children[r]);h-=1}(p),p.branch=0;const _={string:[]};for(let t=0;t`,g="";let v=!1;switch(n){case i.EMPTY:d+=M;case i.NOMATCH:case i.ACTIVE:l=o,h=0,c=o,f=r.length-c;break;case i.MATCH:l=o,h=s,c=o+h,f=r.length-c;break;default:throw new Error("unrecognized state")}return p=w,h>u?(h=u,p=E,f=0):h+f>u&&(p=E,f=u-h),h>0&&(d+=a,d+=N(t,r,l,h,v),d+=g,v=!0),f>0&&(d+=m,d+=N(t,r,c,f,v),d+=g),d+p};this.toHtml=function(r,h){let c=8;if("string"==typeof r&&r.length>=3){const t=r.toLowerCase().slice(0,3);"hex"===t?c=a:"dec"===t?c=10:"uni"===t&&(c=32)}let f="";return f+=function(t,r){let n;switch(t){case a:n="hexadecimal";break;case 10:n="decimal";break;case 8:n="ASCII";break;case 32:n="UNICODE";break;default:throw new Error(`${o}htmlHeader: unrecognized mode: ${t}`)}let i="";return i+=`display mode: ${n}
\n`,i+=`\n`,"string"==typeof r&&(i+=`${r}`),i}(c,h),f+=function(r){if(null===g)return"";let o,h,c,f,d,p,y="";return y+="(a) | (b) | (c) | (d) | (e) | (f) | ",y+="operator | phrase |
\n",n.forEach((n=>{const b=l[n];switch(o=b.thisLine,h=void 0!==b.thatLine?b.thatLine:"--",c=!1,f=!1,d=!1,b.lookAround===i.LOOKAROUND_AHEAD&&(c=!0,d=!0,p=b.lookAnchor),b.opcode.type!==i.AND&&b.opcode.type!==i.NOT||(c=!0,d=!0,p=b.phraseIndex),b.lookAround===i.LOOKAROUND_BEHIND&&(f=!0,d=!0,p=b.lookAnchor),b.opcode.type!==i.BKA&&b.opcode.type!==i.BKN||(f=!0,d=!0,p=b.phraseIndex),y+="",y+=`${o} | ${h} | `,y+=`${b.phraseIndex} | `,y+=`${b.phraseLength} | `,y+=`${b.depth} | `,y+="",b.state){case i.ACTIVE:y+=`↓ `;break;case i.MATCH:y+=`↑M`;break;case i.NOMATCH:y+=`↑N`;break;case i.EMPTY:y+=`↑E`;break;default:y+=`--`}if(y+=" | ",y+="",y+=s.indent(b.depth),c?y+=``:f&&(y+=``),y+=t.opcodeToString(b.opcode.type),b.opcode.type===i.RNM&&(y+=`(${g[b.opcode.index].name}) `),b.opcode.type===i.BKR){const t=b.opcode.bkrCase===i.BKR_MODE_CI?"%i":"%s",e=b.opcode.bkrMode===i.BKR_MODE_UM?"%u":"%p";y+=`(\\${t}${e}${g[b.opcode.index].name}) `}b.opcode.type===i.UDT&&(y+=`(${v[b.opcode.index].name}) `),b.opcode.type===i.TRG&&(y+=`(${function(t,e){let r="";if(e.type===i.TRG)if(t===a||32===t){let n=e.min.toString(16).toUpperCase();n.length%2!=0&&(n=`0${n}`),r+=t===a?"%x":"U+",r+=n,n=e.max.toString(16).toUpperCase(),n.length%2!=0&&(n=`0${n}`),r+=`–${n}`}else r=`%d${e.min.toString(10)}–${e.max.toString(10)}`;return r}(r,b.opcode)}) `),b.opcode.type===i.TBS&&(y+=`(${function(t,e){let r="";if(e.type===i.TBS){const n=Math.min(e.string.length,10);if(t===a||32===t){r+=t===a?"%x":"U+";for(let t=0;t0&&(r+="."),n=e.string[t].toString(16).toUpperCase(),n.length%2!=0&&(n=`0${n}`),r+=n}}else{r="%d";for(let t=0;t0&&(r+="."),r+=e.string[t].toString(10)}n0&&(n+="."),o=r.string[e],o>=97&&o<=122?(t=o-32,n+=`${t.toString(s)}/${o.toString(s)}`.toUpperCase()):o>=65&&o<=90?(t=o,o+=32,n+=`${t.toString(s)}/${o.toString(s)}`.toUpperCase()):n+=o.toString(s).toUpperCase();i |