@openhps/rdf 0.1.10 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.eslintrc.js +39 -0
  2. package/.prettierrc.js +8 -0
  3. package/commitlint.config.js +1 -0
  4. package/dist/cjs/rdf/RDFSerializer.d.ts +2 -1
  5. package/dist/cjs/rdf/RDFSerializer.js +47 -0
  6. package/dist/cjs/rdf/RDFSerializer.js.map +1 -1
  7. package/dist/cjs/rdf/SerializableNamedNode.d.ts +0 -2
  8. package/dist/cjs/rdf/SerializableNamedNode.js +1 -8
  9. package/dist/cjs/rdf/SerializableNamedNode.js.map +1 -1
  10. package/dist/cjs/rdf/types.d.ts +10 -0
  11. package/dist/esm/rdf/RDFSerializer.d.ts +2 -1
  12. package/dist/esm/rdf/RDFSerializer.js +47 -0
  13. package/dist/esm/rdf/RDFSerializer.js.map +1 -1
  14. package/dist/esm/rdf/SerializableNamedNode.d.ts +0 -2
  15. package/dist/esm/rdf/SerializableNamedNode.js +1 -8
  16. package/dist/esm/rdf/SerializableNamedNode.js.map +1 -1
  17. package/dist/esm/rdf/types.d.ts +10 -0
  18. package/dist/types/rdf/RDFSerializer.d.ts +2 -1
  19. package/dist/types/rdf/SerializableNamedNode.d.ts +0 -2
  20. package/dist/types/rdf/types.d.ts +10 -0
  21. package/dist/web/openhps-rdf.all.es.js +57 -17
  22. package/dist/web/openhps-rdf.all.es.js.map +1 -1
  23. package/dist/web/openhps-rdf.all.es.min.js +1 -1
  24. package/dist/web/openhps-rdf.all.es.min.js.map +1 -1
  25. package/dist/web/openhps-rdf.all.js +57 -17
  26. package/dist/web/openhps-rdf.all.js.map +1 -1
  27. package/dist/web/openhps-rdf.all.min.js +1 -1
  28. package/dist/web/openhps-rdf.all.min.js.map +1 -1
  29. package/dist/web/openhps-rdf.serialization.es.js +60 -18
  30. package/dist/web/openhps-rdf.serialization.es.js.map +1 -1
  31. package/dist/web/openhps-rdf.serialization.es.min.js +1 -1
  32. package/dist/web/openhps-rdf.serialization.es.min.js.map +1 -1
  33. package/dist/web/openhps-rdf.serialization.js +60 -18
  34. package/dist/web/openhps-rdf.serialization.js.map +1 -1
  35. package/dist/web/openhps-rdf.serialization.min.js +1 -1
  36. package/dist/web/openhps-rdf.serialization.min.js.map +1 -1
  37. package/dist/web/openhps-rdf.sparql.es.js +56 -9
  38. package/dist/web/openhps-rdf.sparql.es.js.map +1 -1
  39. package/dist/web/openhps-rdf.sparql.es.min.js +1 -1
  40. package/dist/web/openhps-rdf.sparql.es.min.js.map +1 -1
  41. package/dist/web/openhps-rdf.sparql.js +56 -9
  42. package/dist/web/openhps-rdf.sparql.js.map +1 -1
  43. package/dist/web/openhps-rdf.sparql.min.js +1 -1
  44. package/dist/web/openhps-rdf.sparql.min.js.map +1 -1
  45. package/package.json +4 -2
  46. package/serialization.d.ts +1 -0
  47. package/serialization.js +1 -0
  48. package/src/rdf/RDFSerializer.ts +53 -1
  49. package/src/rdf/SerializableNamedNode.ts +3 -7
  50. package/src/rdf/types.ts +13 -0
  51. package/vocab.d.ts +1 -0
  52. package/vocab.js +1 -0
  53. package/webpack.config.js +87 -0
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see openhps-rdf.sparql.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],t):"object"==typeof exports?exports.OpenHPS=t(require("@openhps/core")):(e.OpenHPS=e.OpenHPS||{},e.OpenHPS.rdf=t(e.OpenHPS.core))}("undefined"!=typeof self?self:this,(function(e){return(()=>{var t={8635:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SPARQLDataDriver:()=>SPARQLDataDriver,SPARQLDriverBase:()=>SPARQLDriverBase,SPARQLGenerator:()=>SPARQLGenerator});var n={};r.r(n),r.d(n,{Alt:()=>j,Bag:()=>R,CompoundLiteral:()=>F,HTML:()=>O,JSON__workaround:()=>D,List:()=>A,PlainLiteral:()=>I,Property:()=>x,Seq:()=>N,Statement:()=>k,XMLLiteral:()=>P,direction:()=>T,first:()=>v,langString:()=>L,language:()=>S,nil:()=>C,object:()=>m,predicate:()=>_,rest:()=>E,subject:()=>y,type:()=>g,value:()=>w});var i=r(3700),s=r(7562),a=r.n(s),o=r(0),u=r(8391);const h="http://www.w3.org/2001/XMLSchema#boolean",l="http://www.w3.org/2001/XMLSchema#dateTime",c="http://www.w3.org/2001/XMLSchema#date",f="http://www.w3.org/2001/XMLSchema#decimal",d="http://www.w3.org/2001/XMLSchema#string";function p(e,t){const r=Object.assign({},e);return b(e)&&b(t)&&Object.keys(t).forEach((n=>{Array.isArray(t[n])?(r[n]=t[n],r[n].push(...e[n]||[])):b(t[n])?n in e?r[n]=p(e[n],t[n]):Object.assign(r,{[n]:t[n]}):Object.assign(r,{[n]:t[n]})})),r}function b(e){return e&&"object"==typeof e&&!Array.isArray(e)}class InternalRDFSerializer extends o.Serializer{constructor(){super(...arguments),this.serializationStrategy=new Map([[Number,this.serializeLiteral.bind(this)],[String,this.serializeLiteral.bind(this)],[Boolean,this.serializeLiteral.bind(this)],[Date,this.serializeDate.bind(this)],[Array,this.serializeArray.bind(this)],[Map,this.serializeMap.bind(this)],[Set,this.serializeSet.bind(this)]])}convertSingleValue(e,t,r,n,i){if(this.retrievePreserveNull(n)&&null===e)return null;if(null==e)return;if(n&&n.options&&n.options.rdf&&n.options.rdf.serializer)return n.options.rdf.serializer(e);const s=this.serializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,this,n,i);if("object"==typeof e)return this.serializeObject(e,t,r,this,n,i);let a=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}serializeObject(e,t,r,n,i,s){let a;const h=o.DataSerializer.getRootMetadata(e.constructor);a=e.constructor!==t.ctor&&e instanceof t.ctor?o.DataSerializer.getMetadata(e.constructor):o.DataSerializer.getMetadata(t.ctor);const l=a.options&&a.options.rdf?a.options.rdf:h.options&&h.options.rdf?h.options.rdf:void 0;if(!l)return;const c=Array.from(a.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];let f;if(c){const t=c.options.rdf;f=t.serializer?t.serializer(e[c.key],e.constructor):e[c.key]}f=f&&!f.startsWith("http")&&s.rdf.baseUri?s.rdf.baseUri+f:u.ZP.blankNode(f).value;let d={value:f,predicates:l.predicates?Object.entries(l.predicates).map((([e,t])=>({[e]:t.map(u.ZP.namedNode)}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))):{}};return l.serializer&&(d=p(d,l.serializer(e,s.rdf.baseUri))),d.termType=d.value.startsWith("http")?"NamedNode":"BlankNode",a.dataMembers.forEach((t=>{const r=h.dataMembers.get(t.key),i=t.options&&t.options.rdf?t:r&&r.options&&r.options.rdf?r:void 0;if(!i||!i.options.rdf.predicate)return;const a=n.convertSingleValue(e[i.key],i.type(),`${i.name}`,i,s);if(a){const e=i.options.rdf.predicate;[...Array.isArray(e)?e:[e]].forEach((e=>{const t=d.predicates[e]||[];t.push(...(Array.isArray(a)?a:[a]).filter((e=>e))),d.predicates[e]=t}))}})),d}serializeArray(e,t,r,n,i,s){return e.map((e=>this.convertSingleValue(e,t.elementType,r,i,s)))}serializeMap(e,t,r,n,i,s){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,s)))}serializeSet(e,t,r,n,i,s){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,s)))}serializeLiteral(e,t,r,n,i){var s;let a;const o=i.options.rdf;if(o&&o.datatype)switch(a=o.datatype,o.datatype){case c:case l:return this.serializeDate(e,t,r,n,i)}else switch(typeof e){case"bigint":case"number":a=f;break;case"boolean":a=h;break;default:a=d}const p=this.iriToNode(a);return u.ZP.literal(e,o&&null!==(s=o.language)&&void 0!==s?s:p)}serializeDate(e,t,r,n,i){var s;const a=i.options.rdf,o=l,h=new Date(e).toISOString(),c=this.iriToNode(o);return u.ZP.literal(h,a&&null!==(s=a.language)&&void 0!==s?s:c)}iriToNode(e){return u.ZP.namedNode(e)}}const g="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",y="http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",_="http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",m="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",w="http://www.w3.org/1999/02/22-rdf-syntax-ns#value",v="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",E="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",S="http://www.w3.org/1999/02/22-rdf-syntax-ns#language",T="http://www.w3.org/1999/02/22-rdf-syntax-ns#direction",x="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",k="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",R="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",N="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq",j="http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt",A="http://www.w3.org/1999/02/22-rdf-syntax-ns#List",F="http://www.w3.org/1999/02/22-rdf-syntax-ns#CompoundLiteral",O="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",L="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",I="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",P="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",D="http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON",C="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",B=n;class InternalRDFDeserializer extends o.Deserializer{constructor(){super(...arguments),this.deserializationStrategy=new Map([[Number,this.deserializeLiteral.bind(this)],[String,this.deserializeLiteral.bind(this)],[Boolean,this.deserializeLiteral.bind(this)],[Date,this.deserializeLiteral.bind(this)],[Array,this.deserializeArray.bind(this)],[Map,this.deserializeMap.bind(this)],[Set,this.deserializeSet.bind(this)]])}rdfTypeResolver(e,t,r){if(void 0!==e.predicates){const n=Object.entries(e.predicates).filter((([e,t])=>e===B.type)).map((([e,t])=>t)).flat().map((e=>e.value)).map((e=>r.get(e))).flat().map((e=>t.get(e)));return n[0]}return Object}convertSingleValue(e,t,r,n="object",i,s){if(this.retrievePreserveNull(i)&&null===e)return null;if(null==e)return;const a=this.deserializationStrategy.get(t.ctor);if(void 0!==a)return a(e,t,r,n,this,i,s);if("object"==typeof e)return this.deserializeObject(e,t,r,n,this,s);let o=`Could not deserialize '${n}'; don't know how to deserialize type`;t.hasFriendlyName()&&(o+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${o}.`))}deserializeObject(e,t,r,n,i,s){const a=t.ctor,u=this.rdfTypeResolver(e,r,s.rdf.knownTypes)||a,h=o.DataSerializer.getMetadata(u),l=o.DataSerializer.getRootMetadata(u);if(!h&&!l)return;const c=h.options&&h.options.rdf?h.options.rdf:l.options&&l.options.rdf?l.options.rdf:void 0;if(!c)return;const f=c.deserializer?c.deserializer(e):this.instantiateType(u),d=Array.from(h.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];if(d){const t=d.options.rdf;f[d.key]=t.deserializer?t.deserializer(e,u):e.value}return h.dataMembers.forEach((t=>{const n=l.dataMembers.get(t.key),a=t.options&&t.options.rdf?t:n&&n.options&&n.options.rdf?n:void 0;if(!a||!a.options.rdf.predicate)return;const o=a.options.rdf.predicate;[...Array.isArray(o)?o:[o]].forEach((t=>{e.predicates[t]&&(a.type().ctor===Array?f[a.key]=i.convertSingleValue(e.predicates[t],a.type(),r,a.name,a,s):f[a.key]=e.predicates[t].map((e=>i.convertSingleValue(e,a.type(),r,a.name,a,s))).filter((e=>this.isInstanceOf(e,a.type().ctor)))[0])}))})),f}deserializeLiteral(e,t,r,n,i,s,a){return e.datatype.value===l?new Date(e.value).getTime():e.value}deserializeDate(e,t,r,n,i,s,a){return new Date(e.value)}deserializeArray(e,t,r,n,i,s,a){return e?e.map((e=>i.convertSingleValue(e,t.elementType,r,n,s,a))).filter((e=>this.isInstanceOf(e,t.elementType.ctor))):[]}isInstanceOf(e,t){return"number"==typeof e?t===Number:"string"==typeof e?t===String:"boolean"==typeof e?t===Boolean:"object"==typeof e&&e instanceof t}deserializeMap(e,t,r,n,i,s,a){}deserializeSet(e,t,r,n,i,s,a){}}var M=r(5403);const U={geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",schema:"http://schema.org/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",vcard:"http://www.w3.org/2006/vcard/ns#",owl:"http://www.w3.org/2002/07/owl#",time:"http://www.w3.org/2006/time#",dcterms:"http://purl.org/dc/terms/",dcmi:"http://purl.org/dc/terms/",dqm:"http://purl.org/dqm-vocabulary/v1/dqm#",foaf:"http://xmlns.com/foaf/0.1/",qudt:"http://qudt.org/schema/qudt/",qudt_unit:"http://qudt.org/vocab/unit/",quantitykind:"http://qudt.org/vocab/quantitykind/",sosa:"http://www.w3.org/ns/sosa/",ssn:"http://www.w3.org/ns/ssn/",ssns:"http://www.w3.org/ns/ssn/systems/",openhps:"http://openhps.org/terms#",ogc:"http://www.opengis.net/ont/geosparql#"};var $,q=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,o)}u((n=n.apply(e,t||[])).next())}))};class RDFSerializer extends o.DataSerializer{static get options(){return{serializer:new InternalRDFSerializer,deserializer:new InternalRDFDeserializer}}static registerRDFType(e){const t=this.getMetadata(e);if(!t.options||!t.options.rdf)return;const r=t.options.rdf;r.predicates&&Object.entries(r.predicates).filter((([e,t])=>e===B.type)).map((([e,t])=>t.flat())).flat().forEach((t=>{var r;const n=null!==(r=this.knownRDFTypes.get(t))&&void 0!==r?r:[];n.push(e.name),this.knownRDFTypes.set(t,n)}))}static serialize(e,t){return super.serialize(e,Object.assign({rdf:{baseUri:t}},this.options))}static deserializeFromStore(e,t){const r=function e(t,r){return{termType:t.termType,value:t.value,predicates:Object.assign({},r.getPredicates(t,null,null).map((n=>({[n.value]:r.getObjects(t,n,null).map((t=>"BlankNode"===t.constructor.name||"NamedNode"===t.constructor.name?e(t,r):t))}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))}}(e,t);return this.deserialize(r)}static serializeToQuads(e,t){const r=void 0!==e.predicates?e:this.serialize(e,t),n="BlankNode"===r.termType?u.ZP.blankNode(r.value):u.ZP.namedNode(r.value);return Object.keys(r.predicates).map((e=>{const t=u.ZP.namedNode(e);return r.predicates[e].map((e=>void 0!==e.predicates?[u.ZP.quad(n,t,e),...this.serializeToQuads(e)]:[u.ZP.quad(n,t,e)]))})).flat().flat()}static stringify(e,t={}){return q(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const s=this.serializeToQuads(e,t.baseUri),a=new i.Z(s),o=Object.assign({xsd:"http://www.w3.org/2001/XMLSchema#"},U),u=Object.keys(o).map((e=>({[o[e]]:e}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))),h={};s.map((e=>{[e.subject.value,e.predicate.value,"NamedNode"===e.object.termType?e.object.termType:"Literal"===e.object.termType?e.object.datatype.value:e.object.value].map((e=>{Object.keys(u).forEach((t=>{e.includes(t)&&(h[u[t]]=t)}))}))})),t.prefixes=Object.assign(Object.assign({},h),t.prefixes);const l=new M.Z(t);t.prettyPrint?a.getSubjects(null,null,null).forEach((e=>{"BlankNode"!==e.termType&&a.getPredicates(e,null,null).forEach((t=>{a.getObjects(e,t,null).forEach((r=>{"BlankNode"===r.termType?l.addQuad(e,t,this.writeBlankNode(l,r,a)):l.addQuad(e,t,r)}))}))})):l.addQuads(s),l.end(((e,t)=>{if(e)return n(e);r(t)}))}))}))}static writeBlankNode(e,t,r){const n=r.getPredicates(t,null,null);return e.blank(n.map((n=>r.getObjects(t,n,null).map((t=>"BlankNode"===t.termType?{predicate:n,object:this.writeBlankNode(e,t,r)}:{predicate:n,object:t})))).flat())}static deserialize(e,t){if(void 0===e.predicates)return super.deserialize(e,t);const r=new InternalRDFDeserializer,n=null!=t?t:r.rdfTypeResolver(e,this.knownTypes,this.knownRDFTypes);return n===Object?e:r.convertSingleValue(e,this.ensureTypeDescriptor(n),this.knownTypes,void 0,void 0,{rdf:{knownTypes:this.knownRDFTypes}})}static getUriMetadata(e){const t=o.DataSerializer.getMetadata(e),r=o.DataSerializer.getRootMetadata(e);if(!(t.options&&t.options.rdf?t.options.rdf:r.options&&r.options.rdf?r.options.rdf:void 0))return;return Array.from(t.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0]}static normalizeUri(e,t,r){const n=this.getUriMetadata(e);let i;if(!n)return r;{const s=n.options.rdf;i=s.serializer?s.serializer(t,e):t,i=i&&!i.startsWith("http")&&r?r+i:u.ZP.blankNode(i).value}}}$=RDFSerializer,RDFSerializer.knownRDFTypes=new Map,$.eventEmitter.on("updateSerializableObject",((e,t)=>{if(t&&t.rdf&&t.rdf.type){t.rdf.predicates=t.rdf.predicates||{};const e=t.rdf.predicates[B.type]||[];e.push(t.rdf.type),t.rdf.predicates[B.type]=e}})),$.eventEmitter.on("registerType",(e=>{RDFSerializer.registerRDFType(e)}));var G=r(9619);class SPARQLGenerator{constructor(e,t){this._counter=0,this.dataType=e,this.baseUri=t}get next(){return this._counter++}createInsert(e){const t=RDFSerializer.serializeToQuads(e,this.baseUri),r=new G.Generator,n={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insert",insert:[{type:"bgp",triples:t}]}]};return r.stringify(n)}createDelete(e){const t=new G.Generator,r=RDFSerializer.getUriMetadata(this.dataType),n={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insertdelete",insert:[],delete:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]}],where:this.createQuery({[r.key]:e})}]};return t.stringify(n)}createDeleteAll(e){const t=new G.Generator,r={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insertdelete",insert:[],delete:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]}],where:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]},...this.createQuery(e)]}]};return t.stringify(r)}createFindAll(e){return(new G.Generator).stringify(this.createConstruct(e))}createConstruct(e){const t=this.createQuery(e),r=u.ZP.variable("subject"),n=u.ZP.variable("prop"),i=u.ZP.variable("val"),s=u.ZP.variable("child"),a=u.ZP.variable("childProp"),o=u.ZP.variable("childPropVal"),h=u.ZP.variable("someSubj"),l=u.ZP.variable("incomingChildProp"),c=u.ZP.namedNode("http://example.org#overrides");return{queryType:"CONSTRUCT",template:[{subject:r,predicate:n,object:i},{subject:s,predicate:a,object:o},{subject:h,predicate:l,object:s}],where:[{type:"bgp",triples:[{subject:r,predicate:n,object:i},{subject:r,predicate:{type:"path",pathType:"+",items:[{type:"path",pathType:"|",items:[c,{type:"path",pathType:"!",items:[c]}]}]},object:s},{subject:s,predicate:a,object:o},{subject:h,predicate:l,object:s}]},{type:"group",patterns:t}],type:"query",prefixes:{"":this.baseUri}}}isRegexQuery(e){return"[object RegExp]"===Object.prototype.toString.call(e)}generatePath(e,t,r){return this.createQuery(e.split(".").reverse().reduce(((e,t)=>({[t]:e})),t),r)}generateOp(e,t){const r=[];switch(e){case"$and":r.push(...t.map((e=>({type:"group",patterns:this.createQuery(e)}))));break;case"$or":r.push({type:"union",patterns:t.map((e=>this.createQuery(e))).flat()})}return r}generateComponent(e,t,r){const n=[];if(e.startsWith("$"))n.push(...this.generateOp(e,t));else if(e.includes("."))n.push(...this.generatePath(e,t,r));else{const i=o.DataSerializer.getRootMetadata(r);let s;i.knownTypes.forEach((t=>{if(!s){const r=o.DataSerializer.getMetadata(t);if(s=Array.from(r.dataMembers.values()).filter((t=>t.key===e))[0],s)return}}));const a=i.dataMembers.get(e),h=s.options&&s.options.rdf?s:a&&a.options&&a.options.rdf?a:void 0;if(!h&&h.options.rdf)return;if(h.options.rdf.identifier){const e=h.options.rdf,i={type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]},{type:"filter",expression:{type:"operation",operator:"=",args:[u.ZP.variable("subject"),u.ZP.namedNode(this.baseUri+e.serializer(t,r))]}}]};return n.push(i),n}const l=h.options.rdf,c=Array.isArray(l.predicate)?l.predicate[0]:l.predicate;if(this.isRegexQuery(t)){const e=t.toString();n.push({type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:u.ZP.variable("object")}]},{type:"filter",expression:{type:"operation",operator:"regex",args:[u.ZP.variable("object"),u.ZP.literal(e.substring(e.indexOf("/")+1,e.lastIndexOf("/"))),u.ZP.literal("i")]}}]})}else if("object"==typeof t){const e=this.generateSelector(t,c,r);if(e.length>0)n.push(...e);else{const e=u.ZP.blankNode(),r={type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:e}]}]};r.patterns.push(...this.createQuery(t,s.type().ctor).map((e=>"bgp"===e.type?[e]:"group"===e.type?e.patterns:[])).flat().map((t=>"bgp"===t.type?(t.triples.map((t=>(t.subject=e,t))),t):t))),n.push(r)}}else{const e=l,r={type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:u.ZP.literal(t,e.language?e.language:e.datatype?u.ZP.namedNode(e.datatype):void 0)}]};n.push(r)}}return n}generateSelector(e,t,r){const n=[];for(const i of Object.keys(e))n.push(...this.generateComparisonSelector(i,e,t,r)),n.push(...this.generateArraySelector(i,e,t,r));return n}generateComparisonSelector(e,t,r,n){const i=[];let s;switch(e){case"$gt":s=">";break;case"$gte":s=">=";break;case"$lt":s="<";break;case"$lte":s="<=";break;case"$eq":s="="}if(s){const n=u.ZP.variable(`s${this.next}`),a=u.ZP.variable(`o${this.next}`);i.push({type:"group",patterns:[{type:"bgp",triples:[{subject:n,predicate:u.ZP.namedNode(r),object:a}]},{type:"filter",expression:{type:"operation",operator:s,args:[a,u.ZP.literal(t[e])]}}]})}return i}generateArraySelector(e,t,r,n){const i=[];switch(e){case"$in":case"$nin":break;case"$elemMatch":i.push({type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(r),object:u.ZP.namedNode(this.baseUri+"dataobject_mvdewync")}]}]})}return i}createQuery(e,t=this.dataType){const r=[];if(e)for(const n of Object.keys(e))r.push(...this.generateComponent(n,e[n],t));return r}}class SPARQLDriverBase extends o.DataServiceDriver{constructor(e,t){super(e,t),this.generator=new SPARQLGenerator(this.dataType,this.options.baseUri)}findByUID(e){return new Promise(((t,r)=>{const n=RDFSerializer.getUriMetadata(this.dataType);this.findOne({[n.key]:e}).then(t).catch(r)}))}findOne(e,t={}){return new Promise(((r,n)=>{this.findAll(e,{limit:1,sort:t.sort}).then((e=>{r(e[0])})).catch(n)}))}findAll(e,t={}){return new Promise(((r,n)=>{this.findAllSerialized(e).then((e=>{if(0===e.size)return r([]);const n=e.getSubjects(u.ZP.namedNode(B.type),null,null).filter((e=>"NamedNode"===e.termType));let i=n.map((t=>RDFSerializer.deserializeFromStore(t,e))).filter((e=>e.constructor.name===this.dataType.name));t.sort&&(i=i.sort(((e,r)=>t.sort.map((t=>{const n=o.MemoryQueryEvaluator.getValueFromPath(t[1]>0?e:r,t[0])[1],i=o.MemoryQueryEvaluator.getValueFromPath(t[1]>0?r:e,t[0])[1];return"number"==typeof n?n-i:"string"==typeof n?n.localeCompare(i):0})).reduce(((e,t)=>e+t)))).slice(0,t.limit)),r(i)})).catch(n)}))}count(e){return new Promise(((t,r)=>{this.findAllSerialized(e).then((e=>{if(0===e.size)return t(0);const r=e.getSubjects(u.ZP.namedNode(B.type),null,null).filter((e=>"NamedNode"===e.termType));t(r.length)})).catch(r)}))}}class SPARQLDataDriver extends SPARQLDriverBase{constructor(e,t){super(e,t),this.once("build",this._onBuild.bind(this))}_onBuild(){return new Promise((e=>{this.client=new(a())({endpointUrl:this.options.endpointUrl,storeUrl:this.options.storeUrl,updateUrl:this.options.updateUrl,user:this.options.user,password:this.options.password}),e()}))}findAllSerialized(e){return new Promise(((t,r)=>{this.client.query.construct(this.generator.createFindAll(e)).then((e=>{const r=new i.Z;e.on("data",(e=>{r.addQuad(e)})),e.on("end",(()=>{t(r)}))})).catch(r)}))}insert(e,t){return new Promise(((e,r)=>{this.client.query.update(this.generator.createInsert(t),{headers:this.options.headers,operation:this.options.operation}).then((()=>{e(t)})).catch(r)}))}delete(e){return new Promise(((t,r)=>{this.client.query.update(this.generator.createDelete(e),{headers:this.options.headers,operation:this.options.operation}).then(t).catch(r)}))}deleteAll(e){return new Promise(((t,r)=>{this.client.query.update(this.generator.createDeleteAll(e),{headers:this.options.headers,operation:this.options.operation}).then(t).catch(r)}))}}},8825:(e,t,r)=>{const n=r(8295);e.exports=n},2225:e=>{class BlankNode{constructor(e){this.value=e||"b"+ ++BlankNode.nextId}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}BlankNode.prototype.termType="BlankNode",BlankNode.nextId=0,e.exports=BlankNode},8295:(e,t,r)=>{const n=r(2225),i=r(5805),s=r(2542),a=r(1694),o=r(1358),u=r(8790),h=r(5895);const l={namedNode:function(e){return new o(e)},blankNode:function(e){return new n(e)},literal:function(e,t){return"string"==typeof t?-1===t.indexOf(":")?new a(e,t):new a(e,null,l.namedNode(t)):new a(e,null,t)},variable:function(e){return new h(e)},defaultGraph:function(){return l.defaultGraphInstance},triple:function(e,t,r){return l.quad(e,t,r)},quad:function(e,t,r,n){return new u(e,t,r,n||l.defaultGraphInstance)},fromTerm:function(e){return s.call(l,e)},fromQuad:function(e){return s.call(l,e)},defaultGraphInstance:new i};e.exports=l},5805:e=>{class DefaultGraph{equals(e){return!!e&&e.termType===this.termType}}DefaultGraph.prototype.termType="DefaultGraph",DefaultGraph.prototype.value="",e.exports=DefaultGraph},1694:(e,t,r)=>{const n=r(1358);class Literal{constructor(e,t,r){this.value=e,this.datatype=Literal.stringDatatype,this.language="",t?(this.language=t,this.datatype=Literal.langStringDatatype):r&&(this.datatype=r)}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}Literal.prototype.termType="Literal",Literal.langStringDatatype=new n("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Literal.stringDatatype=new n("http://www.w3.org/2001/XMLSchema#string"),e.exports=Literal},1358:e=>{class NamedNode{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}NamedNode.prototype.termType="NamedNode",e.exports=NamedNode},8790:(e,t,r)=>{const n=r(5805);class Quad{constructor(e,t,r,i){this.subject=e,this.predicate=t,this.object=r,this.graph=i||new n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}Quad.prototype.termType="Quad",Quad.prototype.value="",e.exports=Quad},5895:e=>{class Variable{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Variable.prototype.termType="Variable",e.exports=Variable},2542:e=>{e.exports=function(e){if(!e)return null;if("BlankNode"===e.termType)return this.blankNode(e.value);if("DefaultGraph"===e.termType)return this.defaultGraph();if("Literal"===e.termType)return this.literal(e.value,e.language||this.namedNode(e.datatype.value));if("NamedNode"===e.termType)return this.namedNode(e.value);if("Quad"===e.termType){const t=this.fromTerm(e.subject),r=this.fromTerm(e.predicate),n=this.fromTerm(e.object),i=this.fromTerm(e.graph);return this.quad(t,r,n,i)}if("Variable"===e.termType)return this.variable(e.value);throw new Error(`unknown termType ${e.termType}`)}},2919:(e,t,r)=>{const n=r(4509),i=r(1605);e.exports=class Parser extends i{constructor(e){super(n,e)}}},4509:(e,t,r)=>{const n=r(9600),i=r(8825),{finished:s}=r(8473),a=r(6650);e.exports=class ParserStream extends a{constructor(e,{baseIRI:t="",factory:r=i}={}){const a=new n.StreamParser({baseIRI:t,factory:r});super(a,{objectMode:!0}),a.on("prefix",((e,t)=>{this.emit("prefix",e,t)})),a.on("error",(e=>{this.destroy(e)})),s(this,(()=>{a.end()})),e.pipe(a)}}},1605:e=>{e.exports=class Sink{constructor(e,t){this.Impl=e,this.options=t}import(e,t){const r=new this.Impl(e,Object.assign({},this.options,t));return e.on("end",(()=>{r.readable||r.emit("end")})),e.on("error",(e=>{r.emit("error",e)})),r}}},6083:(e,t,r)=>{const n=r(4182),i=r(8117);e.exports={quadToNTriples:n,termToNTriples:i}},9360:e=>{e.exports=function(e){return"_:"+e.value}},3457:e=>{e.exports=function(e){return""}},4546:(e,t,r)=>{const n=r(6648),i=new RegExp('["\\\\\n\r]'),s=new RegExp('["\\\\\n\r]',"g"),a={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function o(e){return a[e]}e.exports=function(e){const t=(r=e.value,i.test(r)?r.replace(s,o):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+n(e.datatype)}},6648:e=>{e.exports=function(e){return"<"+e.value+">"}},4182:(e,t,r)=>{const n=r(8117);e.exports=function(e){const t=n(e.subject),r=n(e.predicate),i=n(e.object),s=n(e.graph);return`${t} ${r} ${i} ${s?s+" ":""}.`}},8117:(e,t,r)=>{const n=r(9360),i=r(3457),s=r(4546),a=r(6648),o=r(5296);e.exports=function(e){switch(e.termType){case"BlankNode":return n(e);case"DefaultGraph":return i(e);case"Literal":return s(e);case"NamedNode":return a(e);case"Variable":return o(e);default:return}}},5296:e=>{e.exports=function(e){return"?"+e.value}},258:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=u(e),a=s[0],o=s[1],h=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,o)),l=0,c=o>0?a-4:a;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],h[l++]=t>>16&255,h[l++]=t>>8&255,h[l++]=255&t;2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,h[l++]=255&t);1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,h[l++]=t>>8&255,h[l++]=255&t);return h},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=16383,o=0,u=n-i;o<u;o+=a)s.push(h(e,o,o+a>u?u:o+a));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=s.length;a<o;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e,t,n){for(var i,s,a=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5420:e=>{var t=Object.prototype.toString,r="function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;e.exports=function(e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return s=e,"ArrayBuffer"===t.call(s).slice(8,-1)?function(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}(e,n,i):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return r?Buffer.from(e,t):new Buffer(e,t)}(e,n):r?Buffer.from(e):new Buffer(e);var s}},8764:(e,t,r)=>{"use strict";const n=r(258),i=r(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return h(e,t,r)}function h(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=o(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?o(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=o(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function b(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:Q(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return N(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}function h(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(s=r;s<o;s++)if(h(e,s)===h(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+u>o&&(r=o-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(h(e,s+n)!==h(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Y(n))return a;e[r+a]=n}return a}function v(e,t,r,n){return V(Q(t,e.length-r),e,r,n)}function E(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return V(H(t),e,r,n)}function T(e,t,r,n){return V(function(e,t){let r,n,i;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,o,u;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],o=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&o)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&o,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return h(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=b,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const o=Math.min(s,a),h=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<o;++e)if(h[e]!==l[e]){s=h[e],a=l[e];break}return s<a?-1:a<s?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return _(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return _(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=X[e[n]];return i}function F(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n,i){q(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,i){q(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K((function(e,t=0){return I(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=K((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K((function(e,t=0){return I(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=K((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const s=u.isBuffer(e)?e:u.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};const M={};function U(e,t,r){M[e]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,i,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,i,s)}function G(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},6497:(e,t)=>{function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Buffer.isBuffer},4098:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,a="ArrayBuffer"in e;if(a)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,r,n=d(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=p(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=h(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},f.prototype.delete=function(e){delete this.map[h(e)]},f.prototype.get=function(e){return e=h(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(h(e))},f.prototype.set=function(e,t){this.map[h(e)]=l(t)},f.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),c(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),c(e)},n&&(f.prototype[Symbol.iterator]=f.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){var r,n,i=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),_.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,s){var a=new m(e,r);if(a.signal&&a.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new v(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&i&&(o.responseType="blob"),a.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&a.signal.removeEventListener("abort",u)}),o.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=m,e.Response=v),t.Headers=f,t.Request=m,t.Response=v,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,s,a,h;if(o(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]),void 0===a)a=s[t]=r,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,h=l,console&&console.warn&&console.warn(h)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var h=u.length,l=p(u,h);for(r=0;r<h;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,a;if(o(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,h=u>>1,l=-7,c=r?i-1:0,f=r?-1:1,d=e[t+c];for(c+=f,s=d&(1<<-l)-1,d>>=-l,l+=o;l>0;s=256*s+e[t+c],c+=f,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+c],c+=f,l-=8);if(0===s)s=1-h;else{if(s===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=h}return(d?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,h=8*s-i-1,l=(1<<h)-1,c=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?f/u:f*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=l?(o=0,a=l):a+c>=1?(o=(t*u-1)*Math.pow(2,i),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&o,d+=p,o/=256,i-=8);for(a=a<<i|o,h+=i;h>0;e[r+d]=255&a,d+=p,a/=256,h-=8);e[r+d-p]|=128*b}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},5826:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},2222:e=>{var t={},r=t.LEFT_BRACE=1,n=t.RIGHT_BRACE=2,i=t.LEFT_BRACKET=3,s=t.RIGHT_BRACKET=4,a=t.COLON=5,o=t.COMMA=6,u=t.TRUE=7,h=t.FALSE=8,l=t.NULL=9,c=t.STRING=10,f=t.NUMBER=11,d=t.START=17,p=t.STOP=18,b=t.TRUE1=33,g=t.TRUE2=34,y=t.TRUE3=35,_=t.FALSE1=49,m=t.FALSE2=50,w=t.FALSE3=51,v=t.FALSE4=52,E=t.NULL1=65,S=t.NULL2=66,T=t.NULL3=67,x=t.NUMBER1=81,k=t.NUMBER3=83,R=t.STRING1=97,N=t.STRING2=98,j=t.STRING3=99,A=t.STRING4=100,F=t.STRING5=101,O=t.STRING6=102,L=t.VALUE=113,I=t.KEY=114,P=t.OBJECT=129,D=t.ARRAY=130,C="\\".charCodeAt(0),B="/".charCodeAt(0),M="\b".charCodeAt(0),U="\f".charCodeAt(0),$="\n".charCodeAt(0),q="\r".charCodeAt(0),G="\t".charCodeAt(0),z=65536;function W(){this.tState=d,this.value=void 0,this.string=void 0,this.stringBuffer=Buffer.alloc?Buffer.alloc(z):new Buffer(z),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=L,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.offset=-1}W.toknam=function(e){for(var r=Object.keys(t),n=0,i=r.length;n<i;n++){var s=r[n];if(t[s]===e)return s}return e&&"0x"+e.toString(16)};var Q=W.prototype;Q.onError=function(e){throw e},Q.charError=function(e,t){this.tState=p,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(e[t]))+" at position "+t+" in state "+W.toknam(this.tState)))},Q.appendStringChar=function(e){this.stringBufferOffset>=z&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},Q.appendStringBuf=function(e,t,r){var n=e.length;"number"==typeof t&&(n="number"==typeof r?r<0?e.length-t+r:r-t:e.length-t),n<0&&(n=0),this.stringBufferOffset+n>z&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},Q.write=function(e){var t;"string"==typeof e&&(e=new Buffer(e));for(var p=0,L=e.length;p<L;p++)if(this.tState===d){if(t=e[p],this.offset++,123===t)this.onToken(r,"{");else if(125===t)this.onToken(n,"}");else if(91===t)this.onToken(i,"[");else if(93===t)this.onToken(s,"]");else if(58===t)this.onToken(a,":");else if(44===t)this.onToken(o,",");else if(116===t)this.tState=b;else if(102===t)this.tState=_;else if(110===t)this.tState=E;else if(34===t)this.string="",this.stringBufferOffset=0,this.tState=R;else if(45===t)this.string="-",this.tState=x;else if(t>=48&&t<64)this.string=String.fromCharCode(t),this.tState=k;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,p)}else if(this.tState===R)if(t=e[p],this.bytes_remaining>0){for(var I=0;I<this.bytes_remaining;I++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+I]=e[I];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,p=p+I-1}else if(0===this.bytes_remaining&&t>=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+p+" in state "+W.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+p>e.length){for(var P=0;P<=e.length-1-p;P++)this.temp_buffs[this.bytes_in_sequence][P]=e[p+P];this.bytes_remaining=p+this.bytes_in_sequence-e.length,p=e.length-1}else this.appendStringBuf(e,p,p+this.bytes_in_sequence),p=p+this.bytes_in_sequence-1}else if(34===t)this.tState=d,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(c,this.string),this.offset+=Buffer.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=N;else{if(!(t>=32))return this.charError(e,p);this.appendStringChar(t)}else if(this.tState===N)if(34===(t=e[p]))this.appendStringChar(t),this.tState=R;else if(92===t)this.appendStringChar(C),this.tState=R;else if(47===t)this.appendStringChar(B),this.tState=R;else if(98===t)this.appendStringChar(M),this.tState=R;else if(102===t)this.appendStringChar(U),this.tState=R;else if(110===t)this.appendStringChar($),this.tState=R;else if(114===t)this.appendStringChar(q),this.tState=R;else if(116===t)this.appendStringChar(G),this.tState=R;else{if(117!==t)return this.charError(e,p);this.unicode="",this.tState=j}else if(this.tState===j||this.tState===A||this.tState===F||this.tState===O){if(!((t=e[p])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,p);if(this.unicode+=String.fromCharCode(t),this.tState++===O){var D=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&D>=56320&&D<57344?(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate,D))),this.highSurrogate=void 0):void 0===this.highSurrogate&&D>=55296&&D<56320?this.highSurrogate=D:(void 0!==this.highSurrogate&&(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Buffer(String.fromCharCode(D)))),this.tState=R}}else if(this.tState===x||this.tState===k)switch(t=e[p]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=k;break;default:this.tState=d;var z=Number(this.string);if(isNaN(z))return this.charError(e,p);this.string.match(/[0-9]+/)==this.string&&z.toString()!=this.string?this.onToken(c,this.string):this.onToken(f,z),this.offset+=this.string.length-1,this.string=void 0,p--}else if(this.tState===b){if(114!==e[p])return this.charError(e,p);this.tState=g}else if(this.tState===g){if(117!==e[p])return this.charError(e,p);this.tState=y}else if(this.tState===y){if(101!==e[p])return this.charError(e,p);this.tState=d,this.onToken(u,!0),this.offset+=3}else if(this.tState===_){if(97!==e[p])return this.charError(e,p);this.tState=m}else if(this.tState===m){if(108!==e[p])return this.charError(e,p);this.tState=w}else if(this.tState===w){if(115!==e[p])return this.charError(e,p);this.tState=v}else if(this.tState===v){if(101!==e[p])return this.charError(e,p);this.tState=d,this.onToken(h,!1),this.offset+=4}else if(this.tState===E){if(117!==e[p])return this.charError(e,p);this.tState=S}else if(this.tState===S){if(108!==e[p])return this.charError(e,p);this.tState=T}else if(this.tState===T){if(108!==e[p])return this.charError(e,p);this.tState=d,this.onToken(l,null),this.offset+=3}},Q.onToken=function(e,t){},Q.parseError=function(e,t){this.tState=p,this.onError(new Error("Unexpected "+W.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+W.toknam(this.state)))},Q.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Q.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=L)},Q.emit=function(e){this.mode&&(this.state=o),this.onValue(e)},Q.onValue=function(e){},Q.onToken=function(e,t){if(this.state===L)if(e===c||e===f||e===u||e===h||e===l)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===r)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=I,this.mode=P;else if(e===i)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=D,this.state=L;else if(e===n){if(this.mode!==P)return this.parseError(e,t);this.pop()}else{if(e!==s)return this.parseError(e,t);if(this.mode!==D)return this.parseError(e,t);this.pop()}else if(this.state===I)if(e===c)this.key=t,this.state=a;else{if(e!==n)return this.parseError(e,t);this.pop()}else if(this.state===a){if(e!==a)return this.parseError(e,t);this.state=L}else{if(this.state!==o)return this.parseError(e,t);if(e===o)this.mode===D?(this.key++,this.state=L):this.mode===P&&(this.state=I);else{if(!(e===s&&this.mode===D||e===n&&this.mode===P))return this.parseError(e,t);this.pop()}}},W.C=t,e.exports=W},3944:(e,t,r)=>{var n=r(8473).Transform,i=r(5717);function s(e){n.call(this,e),this._destroyed=!1}function a(e,t,r){r(null,e)}function o(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=a),"function"!=typeof n&&(n=null),e(t,r,n)}}i(s,n),s.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},e.exports=o((function(e,t,r){var n=new s(e);return n._transform=t,r&&(n._flush=r),n})),e.exports.ctor=o((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=Object.assign({},e,t),s.call(this,this.options)}return i(n,s),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),e.exports.obj=o((function(e,t,r){var n=new s(Object.assign({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))},6176:(e,t,r)=>{var n=r(9650),i=r(3944),s=r(2222),a=function(e,t){return"string"===n(e)?t===e:e&&"function"===n(e.exec)?e.exec(t):"boolean"===n(e)?e:"function"===n(e)&&e(t)};e.exports.parse=function(e,t){var r=new s,o=i.obj((function(e,t,i){"string"===n(e)&&(e=Buffer.from(e)),r.write(e),i()}));return"string"===n(e)&&(e=e.split(".").map((function(e){return"*"===e||(""===e?{recurse:!0}:e)}))),Array.isArray(e)&&e.length||(e=null),r.onValue=function(){if(this.root||1!==this.stack.length||(o.root=this.value),e){for(var r=0,n=0;r<e.length;){var i,s=e[r];if(n+=1,r+=1,s&&!s.recurse){if(!(i=this.stack.length===n?this:this.stack[n]))return;if(!a(s,i.key))return}else{var u=e[r];if(!u)return;for(;;){if(!(i=this.stack.length===n?this:this.stack[n]))return;if(a(u,i.key)){this.stack[n].value=null,r+=1;break}n+=1}}}if(this.stack.length===n){var h=this.value[this.key],l=this.stack.slice(1).map((function(e){return e.key})).concat([this.key]);for(var c in null!==h&&null!==(h=t?t(h,l):h)&&o.push(h),delete this.value[this.key],this.stack)this.stack[c].value=null}}},r.onError=function(e){o.emit("error",e)},r._onToken=r.onToken,r.onToken=function(t,n){r._onToken(t,n),0===this.stack.length&&o.root&&(e||o.push(o.root),o.emit("root",o.root),o.root=null)},o},e.exports.stringify=function(e,t,r,s){s=s||0,!1===e?(e="",t="\n",r=""):["null","undefined"].indexOf(n(e))>=0&&(e="[\n",t="\n,\n",r="\n]\n");var a=!0;return i.obj((function(r,n,i){var o=JSON.stringify(r,null,s);a?(a=!1,this.push(e+o)):this.push(t+o),i()}),(function(t){a&&this.push(e),a=!1,this.push(r),t()}))},t.stringifyObject=function(e,t,r,s){s=s||0,!1===e?(e="",t="\n",r=""):["null","undefined"].indexOf(n(e))>=0&&(e="{\n",t="\n,\n",r="\n}\n");var a=!0;return i.obj((function(r,n,i){var o=JSON.stringify(r[0])+":"+JSON.stringify(r[1],null,s);a?(a=!1,this.push(e+o)):this.push(t+o),i()}),(function(t){a&&this.push(e),a=!1,this.push(r),t()}))}},2431:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",a={xsd:{decimal:`${i}decimal`,boolean:`${i}boolean`,double:`${i}double`,integer:`${i}integer`,string:`${i}string`},rdf:{type:`${n}type`,nil:`${n}nil`,first:`${n}first`,rest:`${n}rest`,langString:`${n}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`}}},8391:(e,t,r)=>{"use strict";r.d(t,{DP:()=>BlankNode,LQ:()=>d,PL:()=>Quad,Rh:()=>Term,Xy:()=>DefaultGraph,ZP:()=>f,_w:()=>Variable,dW:()=>p,jJ:()=>NamedNode,lD:()=>Quad,t$:()=>Literal});var n=r(2431),i=r(2099);const{rdf:s,xsd:a}=n.Z;let o,u=0;const h=/^"(.*".*)(?="[^"]*$)/,l=/^<<("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ?("(?:""|[^"])*"[^ ]*|[^ ]+)?>>$/,c={namedNode:function(e){return new NamedNode(e)},blankNode:function(e){return new BlankNode(e||"n3-"+u++)},variable:function(e){return new Variable(e)},literal:function(e,t){if("string"==typeof t)return new Literal(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";""===r&&("boolean"==typeof e?r=a.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?a.integer:a.double:(r=a.double,Number.isNaN(e)||(e=e>0?"INF":"-INF"))));return""===r||r===a.string?new Literal(`"${e}"`):new Literal(`"${e}"^^${r}`)},defaultGraph:function(){return o},quad:y,triple:y},f=c;class Term{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Term?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class NamedNode extends Term{get termType(){return"NamedNode"}}class Literal extends Term{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new NamedNode(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?a.string:s.langString}equals(e){return e instanceof Literal?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class BlankNode extends Term{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Variable extends Term{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class DefaultGraph extends Term{constructor(){return super(""),o||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}function d(e,t){if(t=t||c,!e)return t.defaultGraph();switch(e[0]){case"?":return t.variable(e.substr(1));case"_":return t.blankNode(e.substr(2));case'"':if(t===c)return new Literal(e);if('"'===e[e.length-1])return t.literal(e.substr(1,e.length-2));const r=e.lastIndexOf('"',e.length-1);return t.literal(e.substr(1,r-1),"@"===e[r+1]?e.substr(r+2):t.namedNode(e.substr(r+3)));case"<":const n=l.exec(e);return t.quad(d(g(n[1]),t),d(g(n[2]),t),d(g(n[3]),t),n[4]&&d(g(n[4]),t));default:return t.namedNode(e)}}function p(e){if("string"==typeof e)return e;if(e instanceof Term&&"Quad"!==e.termType)return e.id;if(!e)return o.id;switch(e.termType){case"NamedNode":return e.value;case"BlankNode":return`_:${e.value}`;case"Variable":return`?${e.value}`;case"DefaultGraph":return"";case"Literal":return`"${e.value}"${e.language?`@${e.language}`:e.datatype&&e.datatype.value!==a.string?`^^${e.datatype.value}`:""}`;case"Quad":return`<<${b(p(e.subject))} ${b(p(e.predicate))} ${b(p(e.object))}${(0,i.isDefaultGraph)(e.graph)?"":` ${p(e.graph)}`}>>`;default:throw new Error(`Unexpected termType: ${e.termType}`)}}o=new DefaultGraph;class Quad extends Term{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||o}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function b(e){return e.replace(h,((e,t)=>`"${t.replace(/"/g,'""')}`))}function g(e){return e.replace(h,((e,t)=>`"${t.replace(/""/g,'"')}`))}function y(e,t,r,n){return new Quad(e,t,r,n)}},3700:(e,t,r)=>{"use strict";r.d(t,{Z:()=>N3Store});var n=r(8391),i=r(8473),s=r(2431);class N3Store{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._ids["><"]=0,this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||n.ZP,e&&this.addQuads(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const s in r=t[i].subjects)for(const t in n=r[s])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),s=i[r]||(i[r]={}),a=n in s;return a||(s[n]=null),!a}_removeFromIndex(e,t,r,n){const i=e[t],s=i[r];delete s[n];for(const e in s)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,i,s,a,o,u){let h,l,c;const f=!t+!r+!i>1?Object.keys(this._ids):this._entities,d=(0,n.LQ)(u,this._factory);t&&((h=e,e={})[t]=h[t]);for(const t in e){const u=f[t];if(l=e[t]){r&&((h=l,l={})[r]=h[r]);for(const e in l){const t=f[e];if(c=l[e]){const e=i?i in c?[i]:[]:Object.keys(c);for(let r=0;r<e.length;r++){const i={subject:null,predicate:null,object:null};i[s]=(0,n.LQ)(u,this._factory),i[a]=(0,n.LQ)(t,this._factory),i[o]=(0,n.LQ)(f[e[r]],this._factory),yield this._factory.quad(i.subject,i.predicate,i.object,d)}}}}}}_loop(e,t){for(const r in e)t(r)}_loopByKey0(e,t,r){let n,i;if(n=e[t])for(i in n)r(i)}_loopByKey1(e,t,r){let n,i;for(n in e)i=e[n],i[t]&&r(n)}_loopBy2Keys(e,t,r,n){let i,s,a;if((i=e[t])&&(s=i[r]))for(a in s)n(a)}_countInIndex(e,t,r,n){let i,s,a,o=0;t&&((i=e,e={})[t]=i[t]);for(const t in e)if(s=e[t]){r&&((i=s,s={})[r]=i[r]);for(const e in s)(a=s[e])&&(n?n in a&&o++:o+=Object.keys(a).length)}return o}_getGraphs(e){if(!a(e))return this._graphs;const t={};return t[e]=this._graphs[e],t}_uniqueEntities(e){const t=Object.create(null);return r=>{r in t||(t[r]=!0,e((0,n.LQ)(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,i){t||(i=e.graph,r=e.object,t=e.predicate,e=e.subject),e=(0,n.dW)(e),t=(0,n.dW)(t),r=(0,n.dW)(r),i=(0,n.dW)(i);let s=this._graphs[i];s||(s=this._graphs[i]={subjects:{},predicates:{},objects:{}},Object.freeze(s));const a=this._ids,o=this._entities;e=a[e]||(a[o[++this._id]=e]=this._id),t=a[t]||(a[o[++this._id]=t]=this._id),r=a[r]||(a[o[++this._id]=r]=this._id);const u=this._addToIndex(s.subjects,e,t,r);return this._addToIndex(s.predicates,t,r,e),this._addToIndex(s.objects,r,e,t),this._size=null,u}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}delete(e){return this.removeQuad(e),this}has(e,t,r,n){return e&&e.subject&&({subject:e,predicate:t,object:r,graph:n}=e),!this.readQuads(e,t,r,n).next().done}import(e){return e.on("data",(e=>{this.addQuad(e)})),e}removeQuad(e,t,r,i){t||(i=e.graph,r=e.object,t=e.predicate,e=e.subject),e=(0,n.dW)(e),t=(0,n.dW)(t),r=(0,n.dW)(r),i=(0,n.dW)(i);const s=this._ids,a=this._graphs;let o,u,h;if(!((e=s[e])&&(t=s[t])&&(r=s[r])&&(o=a[i])&&(u=o.subjects[e])&&(h=u[t])&&r in h))return!1;for(e in this._removeFromIndex(o.subjects,e,t,r),this._removeFromIndex(o.predicates,t,r,e),this._removeFromIndex(o.objects,r,e,t),null!==this._size&&this._size--,o.subjects)return!0;return delete a[i],!0}removeQuads(e){for(let t=0;t<e.length;t++)this.removeQuad(e[t])}remove(e){return e.on("data",(e=>{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const s=new i.Readable({objectMode:!0});return s._read=()=>{for(const i of this.readQuads(e,t,r,n))s.push(i);s.push(null)},this.remove(s)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,i){e=e&&(0,n.dW)(e),t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._getGraphs(i),o=this._ids;let u,h,l,c;if(!(a(e)&&!(h=o[e])||a(t)&&!(l=o[t])||a(r)&&!(c=o[r])))for(const e in s)(u=s[e])&&(h?c?yield*this._findInIndex(u.objects,c,h,l,"object","subject","predicate",e,null,!0):yield*this._findInIndex(u.subjects,h,l,null,"subject","predicate","object",e,null,!0):l?yield*this._findInIndex(u.predicates,l,c,null,"predicate","object","subject",e,null,!0):c?yield*this._findInIndex(u.objects,c,null,null,"object","subject","predicate",e,null,!0):yield*this._findInIndex(u.subjects,null,null,null,"subject","predicate","object",e,null,!0))}match(e,t,r,n){return new DatasetCoreAndReadableStream(this,e,t,r,n)}countQuads(e,t,r,i){e=e&&(0,n.dW)(e),t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._getGraphs(i),o=this._ids;let u,h,l,c,f=0;if(a(e)&&!(h=o[e])||a(t)&&!(l=o[t])||a(r)&&!(c=o[r]))return 0;for(const n in s)(u=s[n])&&(f+=e?r?this._countInIndex(u.objects,c,h,l):this._countInIndex(u.subjects,h,l,c):t?this._countInIndex(u.predicates,l,c,h):this._countInIndex(u.objects,c,h,l));return f}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let s=!1;const a=!this.some((t=>(s=!0,!e(t))),t,r,n,i);return s&&a}some(e,t,r,n,i){for(const s of this.readQuads(t,r,n,i))if(e(s))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.predicates,h,l,e):this._loopByKey1(u.subjects,h,e):l?this._loopByKey0(u.objects,l,e):this._loop(u.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.objects,l,h,e):this._loopByKey0(u.subjects,h,e):l?this._loopByKey1(u.predicates,l,e):this._loop(u.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.subjects,h,l,e):this._loopByKey1(u.objects,h,e):l?this._loopByKey0(u.predicates,l,e):this._loop(u.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,i)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,s.Z.rdf.rest,s.Z.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,u,h=!1;const l=t.graph;let c=t.subject;for(;c&&!h;){const e=this.getQuads(null,null,c,null),t=this.getQuads(c,null,null,null);let r,f=null,d=null,p=null;for(let i=0;i<t.length&&!h;i++)r=t[i],r.graph.equals(l)?o?h=n(c,"has non-list arcs out"):r.predicate.value===s.Z.rdf.first?f?h=n(c,"has multiple rdf:first arcs"):a.push(f=r):r.predicate.value===s.Z.rdf.rest?d?h=n(c,"has multiple rdf:rest arcs"):a.push(d=r):e.length?h=n(c,"can't be subject and object"):(o=r,u="subject"):h=n(c,"not confined to single graph");for(let t=0;t<e.length&&!h;++t)r=e[t],o?h=n(c,"can't have coreferences"):r.predicate.value===s.Z.rdf.rest?p?h=n(c,"has incoming rdf:rest arcs"):p=r:(o=r,u="object");f?i.unshift(f.object):h=n(c,"has no list head"),c=p&&p.subject}h?e=!1:o&&(r[o[u].value]=i)})),e&&this.removeQuads(a),r}*[Symbol.iterator](){yield*this.readQuads()}}function a(e){return"string"==typeof e||e instanceof String}class DatasetCoreAndReadableStream extends i.Readable{constructor(e,t,r,n,i){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:t,predicate:r,object:n,graph:i})}get filtered(){if(!this._filtered){const{n3Store:e,graph:t,object:r,predicate:n,subject:i}=this,s=e.getQuads(i,n,r,t);this._filtered=new N3Store(s,{factory:e._factory})}return this._filtered}get size(){return this.filtered.size}_read(){for(const e of this)this.push(e);this.push(null)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,t,r,n){return new DatasetCoreAndReadableStream(this.filtered,e,t,r,n)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}},2099:(e,t,r)=>{"use strict";r.r(t),r.d(t,{inDefaultGraph:()=>h,isBlankNode:()=>s,isDefaultGraph:()=>u,isLiteral:()=>a,isNamedNode:()=>i,isVariable:()=>o,prefix:()=>l,prefixes:()=>c});var n=r(8391);function i(e){return!!e&&"NamedNode"===e.termType}function s(e){return!!e&&"BlankNode"===e.termType}function a(e){return!!e&&"Literal"===e.termType}function o(e){return!!e&&"Variable"===e.termType}function u(e){return!!e&&"DefaultGraph"===e.termType}function h(e){return u(e.graph)}function l(e,t){return c({"":e.value||e},t)("")}function c(e,t){const r=Object.create(null);for(const t in e)i(t,e[t]);function i(e,n){if("string"==typeof n){const i=Object.create(null);r[e]=e=>i[e]||(i[e]=t.namedNode(n+e))}else if(!(e in r))throw new Error(`Unknown prefix: ${e}`);return r[e]}return t=t||n.ZP,i}},5403:(e,t,r)=>{"use strict";r.d(t,{Z:()=>N3Writer});var n=r(2431),i=r(8391),s=r(2099);const a=i.ZP.defaultGraph(),{rdf:o,xsd:u}=n.Z,h=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,l=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,c={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class SerializedTerm extends i.Rh{equals(){return!1}}class N3Writer{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=a,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${d(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return a.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(a.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),h.test(t)&&(t=t.replace(l,f));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(h.test(t)&&(t=t.replace(l,f)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===u.string)return`"${t}"`}else switch(e.datatype.value){case u.string:return`"${t}"`;case u.boolean:if("true"===t||"false"===t)return t;break;case u.integer:if(/^[+-]?\d+$/.test(t))return t;break;case u.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case u.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===o.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${(0,s.isDefaultGraph)(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,a,n):this._writeQuad(e,t,r,n||a,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=d(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new SerializedTerm("[]");case 1:if(r=i[0],!(r.object instanceof SerializedTerm))return new SerializedTerm(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let s=0;s<n;s++)r=i[s],r.predicate.equals(e)?t+=`, ${this._encodeObject(r.object)}`:(t+=`${(s?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new SerializedTerm(`${t}\n]`)}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new SerializedTerm(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function f(e){let t=c[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function d(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}},9600:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>f.DP,DataFactory:()=>f.ZP,DefaultGraph:()=>f.Xy,Lexer:()=>N3Lexer,Literal:()=>f.t$,NamedNode:()=>f.jJ,Parser:()=>N3Parser,Quad:()=>f.lD,Store:()=>y.Z,StreamParser:()=>N3StreamParser,StreamWriter:()=>N3StreamWriter,Term:()=>f.Rh,Triple:()=>f.PL,Util:()=>m,Variable:()=>f._w,Writer:()=>g.Z,default:()=>w,termFromId:()=>f.LQ,termToId:()=>f.dW});var n=r(2431),i=r(4375),s=r.n(i);const{xsd:a}=n.Z,o=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,u={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},h=/[\x00-\x20<>\\"\{\}\|\^\`]/,l={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},c=/$0^/;class N3Lexer{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in l)&&this[e]instanceof RegExp&&(this[e]=c)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,o;for(;e=this._newline.exec(r);)this._comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(o=this._comment.exec(r))&&i("comment",o[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const u=this._line,l=r[0];let c="",f="",d="",p=null,b=0,g=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(b=1,c="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(p=this._unescapedIri.exec(r))c="IRI",f=p[1];else if(p=this._iri.exec(r)){if(f=this._unescape(p[1]),null===f||h.test(f))return s(this);c="IRI"}else r.length>1&&"<"===r[1]?(c="<<",b=2):this._n3Mode&&r.length>1&&"="===r[1]&&(c="inverse",b=2,f=">");break;case">":r.length>1&&">"===r[1]&&(c=">>",b=2);break;case"_":((p=this._blank.exec(r))||t&&(p=this._blank.exec(`${r} `)))&&(c="blank",d="_",f=p[1]);break;case'"':if(p=this._simpleQuotedString.exec(r))f=p[1];else if(({value:f,matchLength:b}=this._parseLiteral(r)),null===f)return s(this);null===p&&0===b||(c="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(p=this._simpleApostropheString.exec(r))f=p[1];else if(({value:f,matchLength:b}=this._parseLiteral(r)),null===f)return s(this);null===p&&0===b||(c="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(p=this._variable.exec(r))&&(c="var",f=p[0]);break;case"@":"literal"===this._previousMarker&&(p=this._langcode.exec(r))?(c="langcode",f=p[1]):(p=this._keyword.exec(r))&&(c=p[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){c=".",b=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(p=this._number.exec(r)||t&&(p=this._number.exec(`${r} `)))&&(c="literal",f=p[0],d="string"==typeof p[1]?a.double:"string"==typeof p[2]?a.decimal:a.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(p=this._sparqlKeyword.exec(r))?c=p[0].toUpperCase():g=!0;break;case"f":case"t":(p=this._boolean.exec(r))?(c="literal",f=p[0],d=a.boolean):g=!0;break;case"a":(p=this._shortPredicates.exec(r))?(c="abbreviation",f="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(c="abbreviation",">"!==r[1]?(b=1,f="="):(b=2,f=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(b=1,c=l);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(p=this._prefix.exec(r))?((p=this._prefixed.exec(r))||t&&(p=this._prefixed.exec(`${r} `)))&&(c="prefixed",d=p[1]||"",f=this._unescape(p[2])):(c="prefix",f=p[1]||"")),"^^"===this._previousMarker)switch(c){case"prefixed":c="type";break;case"IRI":c="typeIRI";break;default:c=""}if(!c)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?s(this):this._input=r;const y=b||p[0].length,_=i(c,f,d,u,y);this.previousToken=_,this._previousMarker=c,r=r.substr(y,r.length)}function i(t,i,s,a,o){const u=r?n-r.length:n,h={type:t,value:i,prefix:s,line:a,start:u,end:u+o};return e(null,h),h}function s(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(o,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in u?u[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,s=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:s}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}s()((()=>this._tokenizeToEnd(t,!0)))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",(e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))})),e.on("end",(()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)})),e.on("error",t)}}var f=r(8391);let d=0;class N3Parser{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&b(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),s=/quad/.test(t),a=this._n3Mode=/n3/.test(t),o=i||s;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),this._supportsRDFStar=""===t||/star|\*$/.test(t),o&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new N3Lexer({lineMode:o,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){d=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const s=this._n3Mode;this._contextStack.push({subject:r,predicate:n,object:i,graph:t,type:e,inverse:!!s&&this._inversePredicate,blankPrefix:s?this._prefixes._:"",quantified:s?this._quantified:null}),s&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.id.substr(2)}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(){const e=this._contextStack.pop(),t=this._n3Mode;this._subject=e.subject,this._predicate=e.predicate,this._object=e.object,this._graph=e.graph,t&&(this._inversePredicate=e.inverse,this._prefixes._=e.blankPrefix,this._quantified=e.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext(),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,s=this._contextStack,a=s[s.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext(),0!==s.length&&"list"===s[s.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext(),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const e=this._subject;this._restoreContext(),this._emit(this._subject,this.RDF_FIRST,e,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext(),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=p}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,s=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(s,n-1),s=n+1;break;case void 0:case"?":case"#":return r+e.substring(s,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(s,n-2),(s=r.lastIndexOf("/"))>=i&&(r=r.substr(0,s)),"/"!==a)return`${r}/${e.substr(n+1)}`;s=n+1}}}a=e[++n]}return r+e.substring(s)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${d++}_`,this._prefixCallback=r||p,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=p):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function p(){}function b(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(n.Z.rdf.first),e.RDF_REST=r(n.Z.rdf.rest),e.RDF_NIL=r(n.Z.rdf.nil),e.N3_FORALL=r(n.Z.r.forAll),e.N3_FORSOME=r(n.Z.r.forSome),e.ABBREVIATIONS={a:r(n.Z.rdf.type),"=":r(n.Z.owl.sameAs),">":r(n.Z.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}b(N3Parser.prototype,f.ZP);var g=r(5403),y=r(3700),_=r(8473);class N3StreamParser extends _.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;let t,r;new N3Parser(e).parse({on:(e,n)=>{switch(e){case"data":t=n;break;case"end":r=n}}},((e,t)=>{e&&this.emit("error",e)||t&&this.push(t)}),((e,t)=>{this.emit("prefix",e,t)})),this._transform=(e,r,n)=>{t(e),n()},this._flush=e=>{r(),e()}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),this}}class N3StreamWriter extends _.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new g.Z({write:(e,t,r)=>{this.push(e),r&&r()},end:e=>{this.push(null),e&&e()}},e);this._transform=(e,r,n)=>{t.addQuad(e,n)},this._flush=e=>{t.end(e)}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),e.on("prefix",((e,t)=>{this._writer.addPrefix(e,t)})),this}}var m=r(2099);const w={Lexer:N3Lexer,Parser:N3Parser,Writer:g.Z,Store:y.Z,StreamParser:N3StreamParser,StreamWriter:N3StreamWriter,Util:m,DataFactory:f.ZP,Term:f.Rh,NamedNode:f.jJ,Literal:f.t$,BlankNode:f.DP,Variable:f._w,DefaultGraph:f.Xy,Quad:f.lD,Triple:f.PL,termFromId:f.LQ,termToId:f.dW}},8952:(e,t,r)=>{const n=r(4098),i=r(3662),s=r(4498);function a(e,t){return i(t).then((t=>n(e,t).then((e=>s(e)))))}a.Headers=n.Headers,e.exports=a},6422:(e,t,r)=>{const n=r(8473);e.exports=class ArrayBufferReadable extends n{constructor(e){let t=!1;super({read:()=>{t||(t=!0,e().then((e=>{this.push(Buffer.from(e)),this.push(null)})))}})}}},1376:e=>{class PatchableResponse{constructor(e,t){this.obj=e,Object.keys(t).forEach((e=>{this[e]=t[e]})),PatchableResponse.properties(e).forEach((t=>{t in this||("function"==typeof this.obj[t]?this[t]=(...r)=>{this.obj[t].call(e,r)}:Object.defineProperty(this,t,{get:()=>this.obj[t],set:e=>{this.obj[t]=e},enumerable:!0,configurable:!0}))}))}static properties(e){return Object.getOwnPropertyNames(Object.getPrototypeOf(e))}}e.exports=PatchableResponse},8631:(e,t,r)=>{const n=r(8473);e.exports=class WhatwgReadable extends n{constructor(e){super({read:()=>{e.read().then((e=>{e.done?this.push(null):this.push(Buffer.from(e.value))})).catch((e=>{this.emit("error",e)}))}})}}},3662:(e,t,r)=>{const n=r(1991);e.exports=function(e){return(e=e||{}).body&&e.body.readable?n(e.body).then((t=>(e.body=t,e))):Promise.resolve(e)}},4498:(e,t,r)=>{const n=r(6422),i=r(1376),s=r(2902),a=r(8631);e.exports=function(e){return e.bodyUsed?e.body=new s(new Error("body already in use")):e.body&&e.body.getReader?e=new i(e,{body:new a(e.body.getReader())}):e.body&&e.body.readable||(e.body=new n((()=>e.arrayBuffer()))),e}},1991:(e,t,r)=>{const n=r(5797);e.exports=function(e){return new Promise(((t,r)=>{const i=n();e.on("error",r),e.on("end",(()=>{t(i.getBody())})),e.pipe(i)}))}},5797:(e,t,r)=>{var n=r(4110).Writable,i=r(5717),s=r(5420);if("undefined"==typeof Uint8Array)var a=r(1666).U2;else a=Uint8Array;function o(e,t){if(!(this instanceof o))return new o(e,t);"function"==typeof e&&(t=e,e={}),e||(e={});var r=e.encoding,i=!1;r?"u8"!==(r=String(r).toLowerCase())&&"uint8"!==r||(r="uint8array"):i=!0,n.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=i,t&&this.on("finish",(function(){t(this.getBody())})),this.body=[]}e.exports=o,i(o,n),o.prototype._write=function(e,t,r){this.body.push(e),r()},o.prototype.inferEncoding=function(e){var t=void 0===e?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":"undefined"!=typeof Uint8Array&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":"string"==typeof t?"string":"[object Object]"===Object.prototype.toString.call(t)?"object":"buffer"},o.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r]);return t}(this.body):"string"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];"string"==typeof n||Buffer.isBuffer(n)?t.push(n):u(n)?t.push(s(n)):t.push(s(String(n)))}t=Buffer.isBuffer(e[0])?(t=Buffer.concat(t)).toString("utf8"):t.join("");return t}(this.body):"buffer"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];Buffer.isBuffer(n)?t.push(n):u(n)?t.push(s(n)):t.push(s(String(n)))}return Buffer.concat(t)}(this.body):"uint8array"===this.encoding?function(e){for(var t=0,r=0;r<e.length;r++)"string"==typeof e[r]&&(e[r]=s(e[r])),t+=e[r].length;for(var n=new a(t),i=(r=0,0);r<e.length;r++)for(var o=e[r],u=0;u<o.length;u++)n[i++]=o[u];return n}(this.body):this.body):[]};Array.isArray;function u(e){return"string"==typeof e||(t=e,/Array\]$/.test(Object.prototype.toString.call(t)))||e&&"function"==typeof e.subarray;var t}},2639:(e,t,r)=>{"use strict";var n=r(8212),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var s=Object.create(r(6497));s.inherits=r(5717);var a=r(8217),o=r(5928);s.inherits(c,a);for(var u=i(o.prototype),h=0;h<u.length;h++){var l=u[h];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},4845:(e,t,r)=>{"use strict";e.exports=s;var n=r(2006),i=Object.create(r(6497));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(5717),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},8217:(e,t,r)=>{"use strict";var n=r(8212);e.exports=_;var i,s=r(5826);_.ReadableState=y;r(7187).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r(9742),u=r(6175).Buffer,h=r.g.Uint8Array||function(){};var l=Object.create(r(6497));l.inherits=r(5717);var c=r(8906),f=void 0;f=c&&c.debuglog?c.debuglog("stream"):function(){};var d,p=r(4544),b=r(7373);l.inherits(_,o);var g=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(i=i||r(2639));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var s=e.highWaterMark,a=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(6295).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||r(2639),!(this instanceof _))return new _(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function m(e,t,r,n,i){var s,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=b.destroy,_.prototype._undestroy=b.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},_.prototype.unshift=function(e){return m(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return d||(d=r(6295).s),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var v=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){f("emit readable"),e.emit("readable"),j(e)}function x(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function R(e){f("readable nexttick read 0"),e.read(0)}function N(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?h:_;function u(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",h),r.removeListener("end",_),r.removeListener("data",p),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function h(){f("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",l);var c=!1;var d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!c&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){f("onerror",t),_(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),_()}function y(){f("onfinish"),e.removeListener("close",g),_()}function _(){f("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=L(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&S(this):n.nextTick(R,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),this},_.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=A},2006:(e,t,r)=>{"use strict";e.exports=a;var n=r(2639),i=Object.create(r(6497));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},5928:(e,t,r)=>{"use strict";var n=r(8212);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick;g.WritableState=b;var o=Object.create(r(6497));o.inherits=r(5717);var u={deprecate:r(4927)},h=r(9742),l=r(6175).Buffer,c=r.g.Uint8Array||function(){};var f,d=r(7373);function p(){}function b(e,t){s=s||r(2639),e=e||{};var o=t instanceof s;this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,h=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(h||0===h)?h:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,s){--t.pendingcb,r?(n.nextTick(s,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(s(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,s);else{var o=w(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?a(_,e,r,o,s):_(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function g(e){if(s=s||r(2639),!(f.call(g,this)||this instanceof s))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function y(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,y(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(y(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=w(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(v,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):f=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,s=this._writableState,a=!1,o=!s.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var s=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(i,a),s=!1),s}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else y(e,t,!1,o,n,i,s);return u}(this,s,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},4544:(e,t,r)=>{"use strict";var n=r(6175).Buffer,i=r(3081);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=s,i=o,t.copy(r,i),o+=a.data.length,a=a.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},7373:(e,t,r)=>{"use strict";var n=r(8212);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},9742:(e,t,r)=>{e.exports=r(7187).EventEmitter},4110:(e,t,r)=>{(t=e.exports=r(8217)).Stream=t,t.Readable=t,t.Writable=r(5928),t.Duplex=r(2639),t.Transform=r(2006),t.PassThrough=r(4845)},6175:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6295:(e,t,r)=>{"use strict";var n=r(6175).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8212:e=>{"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(a-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:e.exports=process},6654:e=>{e.exports=function(e){return new Promise((t=>{setTimeout(t,e)}))}},4375:(e,t,r)=>{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},1640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7970),t),i(r(7498),t),i(r(6381),t),i(r(2808),t),i(r(2016),t),i(r(3387),t),i(r(1573),t)},7970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0;t.BlankNode=class BlankNode{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},7498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(7970),i=r(6381),s=r(2808),a=r(2016),o=r(3387),u=r(1573);let h=0;t.DataFactory=class DataFactory{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${h++}_`}namedNode(e){return new a.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new s.Literal(e,t)}variable(e){return new u.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new o.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(s.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},6381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class DefaultGraph{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=DefaultGraph,DefaultGraph.INSTANCE=new DefaultGraph},2808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(2016);class Literal{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=Literal.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=Literal.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}t.Literal=Literal,Literal.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Literal.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},2016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0;t.NamedNode=class NamedNode{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},3387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0;t.Quad=class Quad{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},1573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;t.Variable=class Variable{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},8850:(e,t,r)=>{const n=r(8825),i=r(8473).Transform;e.exports=class TripleToQuadTransform extends i{constructor(e,t){super(),t=t||{},this._writableState.objectMode=!0,this._readableState.objectMode=!0,this.factory=t.factory||n,this.graph=e||this.factory.defaultGraph(),this.on("pipe",(e=>{e.on("error",(e=>{this.emit("error",e)}))}))}_transform(e,t,r){this.push(this.factory.quad(e.subject,e.predicate,e.object,this.graph)),r()}}},2902:(e,t,r)=>{const n=r(7299);e.exports=class ReadableError extends n{constructor(e){super({read:()=>{this.emit("error",e)}})}}},2214:(e,t,r)=>{"use strict";var n=r(8212),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var s=Object.create(r(6497));s.inherits=r(5717);var a=r(507),o=r(1766);s.inherits(c,a);for(var u=i(o.prototype),h=0;h<u.length;h++){var l=u[h];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},3323:(e,t,r)=>{"use strict";e.exports=s;var n=r(2530),i=Object.create(r(6497));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(5717),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},507:(e,t,r)=>{"use strict";var n=r(8212);e.exports=_;var i,s=r(5826);_.ReadableState=y;r(7187).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r(6267),u=r(8036).Buffer,h=r.g.Uint8Array||function(){};var l=Object.create(r(6497));l.inherits=r(5717);var c=r(147),f=void 0;f=c&&c.debuglog?c.debuglog("stream"):function(){};var d,p=r(5004),b=r(465);l.inherits(_,o);var g=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(i=i||r(2214));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var s=e.highWaterMark,a=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(5697).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||r(2214),!(this instanceof _))return new _(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function m(e,t,r,n,i){var s,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=b.destroy,_.prototype._undestroy=b.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},_.prototype.unshift=function(e){return m(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return d||(d=r(5697).s),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var v=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){f("emit readable"),e.emit("readable"),j(e)}function x(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function R(e){f("readable nexttick read 0"),e.read(0)}function N(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?h:_;function u(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",h),r.removeListener("end",_),r.removeListener("data",p),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function h(){f("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",l);var c=!1;var d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!c&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){f("onerror",t),_(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),_()}function y(){f("onfinish"),e.removeListener("close",g),_()}function _(){f("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=L(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&S(this):n.nextTick(R,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),this},_.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=A},2530:(e,t,r)=>{"use strict";e.exports=a;var n=r(2214),i=Object.create(r(6497));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},1766:(e,t,r)=>{"use strict";var n=r(8212);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick;g.WritableState=b;var o=Object.create(r(6497));o.inherits=r(5717);var u={deprecate:r(4927)},h=r(6267),l=r(8036).Buffer,c=r.g.Uint8Array||function(){};var f,d=r(465);function p(){}function b(e,t){s=s||r(2214),e=e||{};var o=t instanceof s;this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,h=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(h||0===h)?h:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,s){--t.pendingcb,r?(n.nextTick(s,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(s(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,s);else{var o=w(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?a(_,e,r,o,s):_(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function g(e){if(s=s||r(2214),!(f.call(g,this)||this instanceof s))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function y(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,y(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(y(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=w(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(v,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):f=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,s=this._writableState,a=!1,o=!s.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var s=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(i,a),s=!1),s}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else y(e,t,!1,o,n,i,s);return u}(this,s,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},5004:(e,t,r)=>{"use strict";var n=r(8036).Buffer,i=r(6965);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=s,i=o,t.copy(r,i),o+=a.data.length,a=a.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},465:(e,t,r)=>{"use strict";var n=r(8212);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},6267:(e,t,r)=>{e.exports=r(7187).EventEmitter},7299:(e,t,r)=>{(t=e.exports=r(507)).Stream=t,t.Readable=t,t.Writable=r(1766),t.Duplex=r(2214),t.Transform=r(2530),t.PassThrough=r(3323)},8036:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},5697:(e,t,r)=>{"use strict";var n=r(8036).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,s,a,o;if("string"==typeof t&&(s="not ",t.substr(!a||a<0?0:+a,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var i=r(9481),s=r(4229);r(5717)(h,i);for(var a=n(s.prototype),o=0;o<a.length;o++){var u=a[o];h.prototype[u]||(h.prototype[u]=s.prototype[u])}function h(e){if(!(this instanceof h))return new h(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n;e.exports=T,T.ReadableState=S;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},s=r(2503),a=r(8764).Buffer,o=r.g.Uint8Array||function(){};var u,h=r(4616);u=h&&h.debuglog?h.debuglog("stream"):function(){};var l,c,f,d=r(7327),p=r(1195),b=r(2457).getHighWaterMark,g=r(4281).q,y=g.ERR_INVALID_ARG_TYPE,_=g.ERR_STREAM_PUSH_AFTER_EOF,m=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(T,s);var v=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(2553).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function T(e){if(n=n||r(6753),!(this instanceof T))return new T(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function x(e,t,r,n,i){u("readableAddChunk",t);var s,h=e._readableState;if(null===t)h.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}(e,h);else if(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof o||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(h,t)),s)v(e,s);else if(h.objectMode||t&&t.length>0)if("string"==typeof t||h.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)h.endEmitted?v(e,new w):k(e,h,t,!0);else if(h.ended)v(e,new _);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(t=h.decoder.write(t),h.objectMode||0!==t.length?k(e,h,t,!1):F(e,h)):k(e,h,t,!1)}else n||(h.reading=!1,F(e,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),F(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},T.prototype.unshift=function(e){return x(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){l||(l=r(2553).s);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(A,e))}function A(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function F(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){u("readable nexttick read 0"),e.read(0)}function P(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(M,t,e))}function M(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}T.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):j(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(e){v(this,new m("_read()"))},T.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?o:b;function a(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",f),e.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",c),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function o(){u("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,D(e))}}(r);e.on("drain",h);var l=!1;function c(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!l&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){u("onerror",t),b(),e.removeListener("error",f),0===i(e,"error")&&v(e,t)}function d(){e.removeListener("finish",p),b()}function p(){u("onfinish"),e.removeListener("close",d),b()}function b(){u("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?j(this):n.reading||process.nextTick(I,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(L,this),r},T.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(L,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(P,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5850)),c(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=C,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===f&&(f=r(5167)),f(T,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=l;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function h(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}r(5717)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=T,T.WritableState=S;var s={deprecate:r(4927)},a=r(2503),o=r(8764).Buffer,u=r.g.Uint8Array||function(){};var h,l=r(1195),c=r(2457).getHighWaterMark,f=r(4281).q,d=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,b=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,_=f.ERR_STREAM_NULL_VALUES,m=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,v=l.errorOrDestroy;function E(){}function S(e,t,s){i=i||r(6753),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(A,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),A(e,t))}(e,r,n,t,i);else{var s=N(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?process.nextTick(k,e,r,s,i):k(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(e){var t=this instanceof(i=i||r(6753));if(!t&&!h.call(T,this))return new T(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function x(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,x(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(x(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=N(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(T,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===T&&(e&&e._writableState instanceof S)}})):h=function(e){return e instanceof this},T.prototype.pipe=function(){v(this,new g)},T.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,o.isBuffer(n)||n instanceof u);return a&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new m;v(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new _:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(v(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,u,n,i,s);return h}(this,i,a,e,t,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new p("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(8610),a=Symbol("lastResolve"),o=Symbol("lastReject"),u=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[f].read();null!==r&&(e[l]=null,e[a]=null,e[o]=null,t(d(r,!1)))}}function b(e){process.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(d(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(y,(i(t={},f,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,h,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[a]=null,r[o]=null,e(d(n,!1))):(r[a]=e,r[o]=t)},writable:!0}),t));return r[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[o];return null!==t&&(r[l]=null,r[a]=null,r[o]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[o]=null,n(d(void 0,!0))),r[h]=!0})),e.on("readable",b.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(8764).Buffer,o=r(2361).inspect,u=o&&o.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,h;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,a.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&s(t.prototype,r),h&&s(t,h),e}()},1195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var s=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?s._writableState?s._writableState.errorEmitted?process.nextTick(r,s):(s._writableState.errorEmitted=!0,process.nextTick(t,s,e)):process.nextTick(t,s,e):i?(process.nextTick(r,s),i(e)):process.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var a=r.readable||!1!==r.readable&&t.readable,o=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},h=t._writableState&&t._writableState.finished,l=function(){o=!1,h=!0,a||s.call(t)},c=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,c=!0,o||s.call(t)},d=function(e){s.call(t,e)},p=function(){var e;return a&&!c?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):o&&!h?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},b=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?o&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?b():t.on("request",b)),t.on("end",f),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",f),t.removeListener("error",d),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n;var i=r(4281).q,s=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function u(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var o=!1;e.on("close",(function(){o=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return s(e);o=!0,s()}));var u=!1;return function(t){if(!o&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new a("pipe"))}}function h(e){e()}function l(e,t){return e.pipe(t)}function c(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var a=t.map((function(e,r){var s=r<t.length-1;return u(e,s,r>0,(function(e){n||(n=e),e&&a.forEach(h),s||(a.forEach(h),i(n))}))}));return t.reduce(l)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725),t.finished=r(8610),t.pipeline=r(9946)},6650:(e,t,r)=>{const{finished:n,Readable:i}=r(8473);class ReadableToReadable extends i{constructor(e,{end:t=!0,map:r,...n}={}){super({read:ReadableToReadable.readFrom(e,{end:t,map:r}),...n})}static readFrom(e,{end:t=!0,map:r=(e=>e)}={}){let i=!1;n(e,(()=>{i=!0}));return async function(){for(;;){const n=e.read();if(n){if(!this.push(r(n)))return!1}else{if(i&&t&&this.push(null),i)return!0;await new Promise((e=>setTimeout(e,0)))}}}}}e.exports=ReadableToReadable},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2044:(e,t,r)=>{const{promisify:n}=r(6028),{PassThrough:i,Writable:s}=r(8473);e.exports=class SeparateStream extends s{constructor({change:e=(()=>{}),map:t=(e=>e),split:r=(()=>!1)}={}){super({objectMode:!0}),this.change=e,this.map=t,this.split=r,this.output=null}async _write(e,t,r){try{let t=!1;this.output?this.split(e)&&(await this._endOutput(),t=!0):t=!0,t&&(this.output=new i({objectMode:!0}),await this.change(this.output,e)),this.output.write(this.map(e),null,r)}catch(e){r(e)}}async _final(e){this.output&&await this._endOutput(),e()}async _endOutput(){return n(this.output.end.bind(this.output))()}}},4317:e=>{e.exports=class BaseClient{constructor({endpoint:e,Query:t,Store:r,factory:n,...i}){this.query=t?new t({endpoint:e,factory:n,...i}):null,this.store=r?new r({endpoint:e,factory:n,...i}):null}}},9846:(e,t,r)=>{const n=r(8952);e.exports=class Endpoint{constructor({endpointUrl:e,fetch:t,headers:r,password:i,storeUrl:s,updateUrl:a,user:o}){this.endpointUrl=e,this.fetch=t||n,this.headers=new this.fetch.Headers(r),this.storeUrl=s,this.updateUrl=a,"string"==typeof o&&"string"==typeof i&&this.headers.set("authorization","Basic "+Buffer.from(`${o}:${i}`).toString("base64"))}async get(e,{headers:t,update:r=!1}={}){let n=null;return r?(n=new URL(this.updateUrl),n.searchParams.append("update",e)):(n=new URL(this.endpointUrl),n.searchParams.append("query",e)),this.fetch(n.toString().replace(/\+/g,"%20"),{method:"GET",headers:this.mergeHeaders(t)})}async postDirect(e,{headers:t,update:r=!1}={}){let n=null;return n=r?new URL(this.updateUrl):new URL(this.endpointUrl),(t=this.mergeHeaders(t)).has("content-type")||t.set("content-type","application/sparql-query; charset=utf-8"),this.fetch(n,{method:"POST",headers:t,body:e})}async postUrlencoded(e,{headers:t,update:r=!1}={}){let n=null,i=null;return r?(n=new URL(this.updateUrl),i="update="+encodeURIComponent(e)):(n=new URL(this.endpointUrl),i="query="+encodeURIComponent(e)),(t=this.mergeHeaders(t)).has("content-type")||t.set("content-type","application/x-www-form-urlencoded"),this.fetch(n,{method:"POST",headers:t,body:i})}mergeHeaders(e={}){const t=new this.fetch.Headers;for(const[e,r]of this.headers)t.set(e,r);for(const[r,n]of new this.fetch.Headers(e))t.set(r,n);return t}}},3952:e=>{e.exports=class RawQuery{constructor({endpoint:e}){this.endpoint=e}async ask(e,{headers:t,operation:r="get"}={}){return(t=this.endpoint.mergeHeaders(t)).has("accept")||t.set("accept","application/sparql-results+json"),this.endpoint[r](e,{headers:t})}async construct(e,{headers:t,operation:r="get"}={}){return(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","application/n-triples"),this.endpoint[r](e,{headers:t})}async select(e,{headers:t,operation:r="get"}={}){return(t=this.endpoint.mergeHeaders(t)).has("accept")||t.set("accept","application/sparql-results+json"),this.endpoint[r](e,{headers:t})}async update(e,{headers:t,operation:r="postUrlencoded"}={}){return(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","*/*"),this.endpoint[r](e,{headers:t,update:!0})}}},5912:(e,t,r)=>{const n=r(6176),i=r(6654),s=r(8825),{Duplex:a,finished:o}=r(8473);e.exports=class ResultParser extends a{constructor({factory:e=s}={}){super({readableObjectMode:!0}),this.factory=e,this.jsonParser=n.parse("results.bindings.*"),o(this.jsonParser,(e=>{this.destroy(e)}))}_write(e,t,r){this.jsonParser.write(e,t,r)}async _read(){const e=this.jsonParser.read();if(e&&0!==Object.keys(e).length){const t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=this.valueToTerm(r),e)),{});if(!this.push(t))return}else{if(!this.writable)return this.push(null);await i(0)}this._read()}valueToTerm(e){if("uri"===e.type)return this.factory.namedNode(e.value);if("bnode"===e.type)return this.factory.blankNode(e.value);if("literal"===e.type||"typed-literal"===e.type){const t=e.datatype&&this.factory.namedNode(e.datatype);return this.factory.literal(e.value,t||e["xml:lang"])}return null}}},4913:(e,t,r)=>{const n=r(4317),i=r(9846),s=r(6740),a=r(8516);e.exports=class StreamClient extends n{constructor(e){super({endpoint:new i(e),factory:e.factory,Query:s,Store:a,...e})}}},6740:(e,t,r)=>{const n=r(8825),i=r(2919),s=r(1279),a=r(3952),o=r(5912);e.exports=class StreamQuery extends a{constructor({endpoint:e,factory:t=n}){super({endpoint:e}),this.factory=t}async ask(e,{headers:t,operation:r}={}){const n=await super.ask(e,{headers:t,operation:r});await s(n);return(await n.json()).boolean}async construct(e,{headers:t,operation:r}={}){(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","application/n-triples, text/turtle");const n=await super.construct(e,{headers:t,operation:r});await s(n);return new i({factory:this.factory}).import(n.body)}async select(e,{headers:t,operation:r}={}){const n=await super.select(e,{headers:t,operation:r});await s(n);const i=new o({factory:this.factory});return n.body.pipe(i)}async update(e,{headers:t,operation:r}={}){const n=await super.update(e,{headers:t,operation:r});await s(n)}}},8516:(e,t,r)=>{const{promisify:n}=r(7298),i=r(8850),s=r(8825),a=r(2919),{finished:o}=r(8473),u=r(1279),h=r(8884);e.exports=class StreamStore{constructor({endpoint:e,factory:t=s,maxQuadsPerRequest:r}){this.endpoint=e,this.factory=t,this.maxQuadsPerRequest=r}async get(e){return this.read({method:"GET",graph:e})}async post(e){return this.write({method:"POST",stream:e})}async put(e){return this.write({firstMethod:"PUT",method:"POST",stream:e})}async read({method:e,graph:t}){const r=new URL(this.endpoint.storeUrl);return"DefaultGraph"!==t.termType&&r.searchParams.append("graph",t.value),this.endpoint.fetch(r,{method:e,headers:this.endpoint.mergeHeaders({accept:"application/n-triples"})}).then((async e=>{await u(e);const r=new a({factory:this.factory}),n=new i(t,{factory:this.factory});return r.import(e.body).pipe(n)}))}async write({firstMethod:e,method:t,stream:r}){const i=new Set;let s=null;const a=new h({maxQuadsPerStream:this.maxQuadsPerRequest,change:async r=>{s&&await s;const n=i.has(a.graph.value)?t:e||t;s=this.writeRequest(n,a.graph,r),i.add(a.graph.value)}});r.pipe(a),await n(o)(a),await s}writeRequest(e,t,r){const n=new URL(this.endpoint.storeUrl);return"DefaultGraph"!==t.termType&&n.searchParams.append("graph",t.value),this.endpoint.fetch(n,{method:e,headers:this.endpoint.mergeHeaders({"content-type":"application/n-triples"}),body:r}).then((async e=>{await u(e)}))}}},7562:(e,t,r)=>{const n=r(4913);e.exports=n},8884:(e,t,r)=>{const n=r(8825),{quadToNTriples:i}=r(6083),s=r(2044);e.exports=class QuadStreamSeparator extends s{constructor({change:e,maxQuadsPerStream:t=1/0}){super({change:async(t,r)=>(this.graph=r.graph,e(t)),map:e=>i(n.quad(e.subject,e.predicate,e.object))+"\n",split:e=>(this.count++,this.count>=t?(this.count=0,!0):!e.graph.equals(this.graph))}),this.count=0,this.graph=null}}},1279:e=>{e.exports=async function(e){if(e.ok)return;const t=await e.text(),r=new Error(`${e.statusText} (${e.status}): ${t}`);throw r.status=e.status,r}},4404:e=>{function t(e){this._options=e=e||{};var t=e.prefixes||{};this._prefixByIri={};var r=[];for(var n in t){var i=t[n];a(i)&&(this._prefixByIri[i]=n,r.push(i))}var s=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=a(e.indent)?e.indent:" ",this._newline=a(e.newline)?e.newline:"\n",this._explicitDatatype=Boolean(e.explicitDatatype)}t.prototype.toQuery=function(e){var t="";return e.queryType&&(t+=e.queryType.toUpperCase()+" "),e.reduced&&(t+="REDUCED "),e.distinct&&(t+="DISTINCT "),e.variables?t+=h(e.variables,void 0,(function(e){return o(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+s(e.variable)+")"}),this)+" ":e.template&&(t+=this.group(e.template,!0)+this._newline),e.from&&(t+=this.graphs("FROM ",e.from.default)+this.graphs("FROM NAMED ",e.from.named)),e.where&&(t+="WHERE "+this.group(e.where,!0)+this._newline),e.updates&&(t+=h(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+h(e.group,void 0,(function(e){var t=o(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+s(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+h(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+h(e.order,void 0,(function(e){var t="("+this.toExpression(e.expression)+")";return e.descending?"DESC "+t:t}),this)+this._newline),e.offset&&(t+="OFFSET "+e.offset+this._newline),e.limit&&(t+="LIMIT "+e.limit+this._newline),e.values&&(t+=this.values(e)),(t=this.baseAndPrefixes(e)+t).trim()},t.prototype.baseAndPrefixes=function(e){var t=e.base?"BASE <"+e.base+">"+this._newline:"",r="";for(var n in e.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+e.prefixes[n]+">"+this._newline);return t+r},t.prototype.toPattern=function(e){var t=e.type||e instanceof Array&&"array"||(e.subject&&e.predicate&&e.object?"triple":"");if(!(t in this))throw new Error("Unknown entry type: "+t);return this[t](e)},t.prototype.triple=function(e){return this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+"."},t.prototype.array=function(e){return h(e,this._newline,this.toPattern,this)},t.prototype.bgp=function(e){return this.encodeTriples(e.triples)},t.prototype.encodeTriples=function(e){if(!e.length)return"";for(var t=[],r=void 0,n=void 0,i=0;i<e.length;i++){var s=e[i];u(s.subject,r)?u(s.predicate,n)?t.push(","):(n=s.predicate,t.push(";"+this._newline,this._indent,this.toEntity(n))):(r&&t.push("."+this._newline),r=s.subject,n=s.predicate,t.push(this.toEntity(r)," ",this.toEntity(n))),t.push(" ",this.toEntity(s.object))}return t.push("."),t.join("")},t.prototype.graph=function(e){return"GRAPH "+this.toEntity(e.name)+" "+this.group(e)},t.prototype.graphs=function(e,t){return t&&0!==t.length?h(t,"",(function(t){return e+this.toEntity(t)+this._newline}),this):""},t.prototype.group=function(e,t){return-1===(e=!0!==t?this.array(e.patterns||e.triples):this.toPattern("group"!==e.type?e:e.patterns)).indexOf(this._newline)?"{ "+e+" }":"{"+this._newline+this.indent(e)+this._newline+"}"},t.prototype.query=function(e){return this.toQuery(e)},t.prototype.filter=function(e){return"FILTER("+this.toExpression(e.expression)+")"},t.prototype.bind=function(e){return"BIND("+this.toExpression(e.expression)+" AS "+s(e.variable)+")"},t.prototype.optional=function(e){return"OPTIONAL "+this.group(e)},t.prototype.union=function(e){return h(e.patterns,this._newline+"UNION"+this._newline,(function(e){return this.group(e,!0)}),this)},t.prototype.minus=function(e){return"MINUS "+this.group(e)},t.prototype.values=function(e){var t,r,n=Object.keys(e.values.reduce((function(e,t){for(var r in t)e[r]=!0;return e}),{}));return 1===n.length?t=r="":(t="(",r=")"),"VALUES "+t+n.join(" ")+r+" {"+this._newline+h(e.values,this._newline,(function(e){return" "+t+h(n,void 0,(function(t){return e[t]?this.toEntity(e[t]):"UNDEF"}),this)+r}),this)+this._newline+"}"},t.prototype.service=function(e){return"SERVICE "+(e.silent?"SILENT ":"")+this.toEntity(e.name)+" "+this.group(e)},t.prototype.toExpression=function(e){if(o(e))return this.toEntity(e);switch(e.type.toLowerCase()){case"aggregate":return e.aggregation.toUpperCase()+"("+(e.distinct?"DISTINCT ":"")+this.toExpression(e.expression)+(e.separator?'; SEPARATOR = "'+e.separator.replace(r,n)+'"':"")+")";case"functioncall":return this.toEntity(e.function)+"("+h(e.args,", ",this.toExpression,this)+")";case"operation":var t=e.operator.toUpperCase(),i=e.args||[];switch(e.operator.toLowerCase()){case"<":case">":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(o(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(o(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uminus":return"-("+this.toExpression(i[0])+")";case"notin":t="NOT IN";case"in":return this.toExpression(i[0])+" "+t+"("+(a(i[1])?i[1]:h(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+h(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(o(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return s(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",a=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(a){if(!this._explicitDatatype)switch(a.value){case"http://www.w3.org/2001/XMLSchema#string":return e;case"http://www.w3.org/2001/XMLSchema#integer":if(/^\d+$/.test(t))return t+" "}e+="^^"+this.encodeIRI(a.value)}return e;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return e.graph&&"DefaultGraph"!==e.graph.termType?"<< GRAPH "+this.toEntity(e.graph)+" { "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" } >>":"<< "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" >>";default:return this.encodeIRI(e.value)}else{var u=e.items.map(this.toEntity,this),h=e.pathType;switch(h){case"^":case"!":return h+u[0];case"*":case"+":case"?":return"("+u[0]+h+")";default:return"("+u.join(h)+")"}}};var r=/["\\\t\n\r\b\f]/g,n=function(e){return i[e]},i={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function s(e){return"?"+e.value}function a(e){return"string"==typeof e}function o(e){return"string"==typeof e.termType}function u(e,t){if(!e||!o(e))return!1;if(!t||!o(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&u(e.datatype,t.datatype);case"Quad":return u(e.subject,t.subject)&&u(e.predicate,t.predicate)&&u(e.object,t.object)&&u(e.graph,t.graph);default:return e.value===t.value}}function h(e,t,r,n){return e.map(r,n).join(a(t)?t:" ")}t.prototype.encodeIRI=function(e){var t=this._prefixRegex.exec(e);if(t){var r=this._prefixByIri[t[1]];return this._usedPrefixes[r]=!0,r+":"+t[2]}return"<"+e+">"},t.prototype.toUpdate=function(e){switch(e.type||e.updateType){case"load":return"LOAD"+(e.source?" "+this.toEntity(e.source):"")+(e.destination?" INTO GRAPH "+this.toEntity(e.destination):"");case"insert":return"INSERT DATA "+this.group(e.insert,!0);case"delete":return"DELETE DATA "+this.group(e.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(e.delete,!0);case"insertdelete":return(e.graph?"WITH "+this.toEntity(e.graph)+this._newline:"")+(e.delete.length?"DELETE "+this.group(e.delete,!0)+this._newline:"")+(e.insert.length?"INSERT "+this.group(e.insert,!0)+this._newline:"")+(e.using?this.graphs("USING ",e.using.default):"")+(e.using?this.graphs("USING NAMED ",e.using.named):"")+"WHERE "+this.group(e.where,!0);case"add":case"copy":case"move":return e.type.toUpperCase()+(e.source.default?" DEFAULT ":" ")+"TO "+this.toEntity(e.destination.name);case"create":case"clear":case"drop":return e.type.toUpperCase()+(e.silent?" SILENT ":" ")+(e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.all?"ALL":"GRAPH "+this.toEntity(e.graph.name));default:throw new Error("Unknown update query type: "+e.type)}},t.prototype.indent=function(e){return e.replace(/^/gm,this._indent)},e.exports=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new t(n).toQuery(r)},createGenerator:function(){return new t(e)}}}},7107:(e,t,r)=>{e=r.nmd(e);var n=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[6,12,15,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],n=[2,209],i=[107,117,120,122,123,132,133,138,322,323,324,325,326],s=[1,20],a=[1,29],o=[6,90],u=[45,46,58],h=[45,58],l=[1,58],c=[1,60],f=[1,56],d=[1,59],p=[1,65],b=[1,66],g=[26,34,35],y=[13,16,312],_=[119,141,320,327],m=[13,16,119,141,312],w=[1,88],v=[1,92],E=[1,94],S=[119,141,320,321,327],T=[13,16,119,141,312,321],x=[1,100],k=[2,251],R=[1,99],N=[13,16,34,35,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],j=[6,45,46,58,68,75,78,86,88,90],A=[6,13,16,34,45,46,58,68,75,78,86,88,90,312],F=[6,13,16,26,34,35,37,38,45,46,48,58,68,75,78,86,87,88,90,93,100,116,119,132,133,135,140,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,330,331,333,334,335,336,337,338,339,340],O=[34,35,45,46,58],L=[13,16,34,35,87,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,340,341,342,343,344,345],I=[2,454],P=[1,123],D=[1,117],C=[1,124],B=[1,125],M=[6,13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],U=[2,310],$=[1,142],q=[1,140],G=[6,191],z=[2,327],W=[2,315],Q=[45,135],H=[6,48,78,86,88,90],V=[2,255],Z=[1,156],Y=[1,158],X=[6,48,75,78,86,88,90],K=[2,253],J=[1,164],ee=[1,176],te=[1,174],re=[1,184],ne=[1,182],ie=[1,175],se=[1,180],ae=[1,181],oe=[1,185],ue=[1,186],he=[1,189],le=[1,190],ce=[1,191],fe=[1,192],de=[1,193],pe=[1,194],be=[1,195],ge=[1,196],ye=[1,197],_e=[1,198],me=[1,199],we=[6,68,75,78,86,88,90],ve=[37,38,191,250,278],Ee=[37,38,191,250,254,278],Se=[37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,334,335,336,337,338,339,340],Te=[26,37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,331,334,335,336,337,338,339,340],xe=[1,229],ke=[1,230],Re=[1,232],Ne=[1,233],je=[1,234],Ae=[1,235],Fe=[1,237],Oe=[1,238],Le=[2,461],Ie=[1,240],Pe=[1,241],De=[1,242],Ce=[1,248],Be=[1,243],Me=[1,244],Ue=[1,245],$e=[1,246],qe=[1,247],Ge=[13,16,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],ze=[48,93],We=[34,38],Qe=[6,116,191],He=[48,119],Ve=[6,48,86,88,90],Ze=[2,339],Ye=[2,331],Xe=[1,293],Ke=[1,295],Je=[48,119,328],et=[13,16,34,195,312],tt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],rt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],nt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],it=[13,16,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],st=[1,329],at=[1,330],ot=[1,332],ut=[1,331],ht=[6,13,16,26,34,35,37,38,46,48,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],lt=[1,340],ct=[1,339],ft=[35,93],dt=[1,353],pt=[1,354],bt=[1,367],gt=[6,48,90],yt=[6,13,16,35,48,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],_t=[6,13,16,34,35,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,226,231,245,246,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,340,341,342,343,344,345],mt=[46,48,90,119,167,168,170,173,174],wt=[1,386],vt=[1,387],Et=[1,393],St=[1,392],Tt=[48,119,191,227,328],xt=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],kt=[13,16,34,35,38,48,87,93,119,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Rt=[13,16,26,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],Nt=[13,16,38,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],jt=[35,48],At=[2,330],Ft=[1,451],Ot=[1,448],Lt=[1,449],It=[6,13,16,26,34,35,37,38,46,48,68,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,329,331,334,335,336,337,338,339,340,341,342,343,344,345],Pt=[13,16,35,195,219,224,312],Dt=[2,387],Ct=[1,469],Bt=[46,48,90,119,167,168,170,173,174,328],Mt=[13,16,34,35,195,219,224,312],Ut=[6,13,16,34,35,48,75,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],$t=[13,16,34,35,38,48,87,93,119,191,195,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],qt=[6,13,16,34,35,48,81,83,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],Gt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],zt=[13,16,34,312],Wt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Qt=[2,342],Ht=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Vt=[13,16,34,35,37,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Zt=[2,337],Yt=[13,16,35,195,219,312],Xt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Kt=[13,16,38,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Jt=[46,48,90,119,167,168,170,173,174,191,227,328],er=[13,16,34,38,48,87,100,195,231,235,299,300,301,302,303,304,305,306,307,308,309,310,311,312],tr=[13,16,34,35,48,87,93,119,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],rr=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331],nr=[13,16,26,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331,333,334],ir=[1,630],sr=[1,631],ar=[2,325],or=[13,16,38,195,224,312],ur={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Prologue_repetition0:7,Query:8,Query_group0:9,Query_option0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectQuery:17,SelectClauseWildcard:18,SelectQuery_repetition0:19,WhereClause:20,SolutionModifierNoGroup:21,SelectClauseVars:22,SelectQuery_repetition1:23,SolutionModifier:24,SelectClauseBase:25,"*":26,SelectClauseVars_repetition_plus0:27,SELECT:28,SelectClauseBase_option0:29,SubSelect:30,SubSelect_option0:31,SubSelect_option1:32,SelectClauseItem:33,VAR:34,"(":35,Expression:36,AS:37,")":38,VarTriple:39,ConstructQuery:40,CONSTRUCT:41,ConstructTemplate:42,ConstructQuery_repetition0:43,ConstructQuery_repetition1:44,WHERE:45,"{":46,ConstructQuery_option0:47,"}":48,DescribeQuery:49,DESCRIBE:50,DescribeQuery_group0:51,DescribeQuery_repetition0:52,DescribeQuery_option0:53,AskQuery:54,ASK:55,AskQuery_repetition0:56,DatasetClause:57,FROM:58,DatasetClause_option0:59,iri:60,WhereClause_option0:61,GroupGraphPattern:62,SolutionModifier_option0:63,SolutionModifierNoGroup_option0:64,SolutionModifierNoGroup_option1:65,SolutionModifierNoGroup_option2:66,GroupClause:67,GROUP:68,BY:69,GroupClause_repetition_plus0:70,GroupCondition:71,BuiltInCall:72,FunctionCall:73,HavingClause:74,HAVING:75,HavingClause_repetition_plus0:76,OrderClause:77,ORDER:78,OrderClause_repetition_plus0:79,OrderCondition:80,ASC:81,BrackettedExpression:82,DESC:83,Constraint:84,LimitOffsetClauses:85,LIMIT:86,INTEGER:87,OFFSET:88,ValuesClause:89,VALUES:90,InlineData:91,InlineData_repetition0:92,NIL:93,InlineData_repetition1:94,InlineData_repetition_plus2:95,InlineData_repetition3:96,DataBlockValue:97,Literal:98,ConstTriple:99,UNDEF:100,DataBlockValueList:101,DataBlockValueList_repetition_plus0:102,Update:103,Update_repetition0:104,Update1:105,Update_option0:106,LOAD:107,Update1_option0:108,Update1_option1:109,Update1_group0:110,Update1_option2:111,GraphRefAll:112,Update1_group1:113,Update1_option3:114,GraphOrDefault:115,TO:116,CREATE:117,Update1_option4:118,GRAPH:119,INSERTDATA:120,QuadPattern:121,DELETEDATA:122,DELETEWHERE:123,Update1_option5:124,InsertClause:125,Update1_option6:126,Update1_repetition0:127,Update1_option7:128,DeleteClause:129,Update1_option8:130,Update1_repetition1:131,DELETE:132,INSERT:133,UsingClause:134,USING:135,UsingClause_option0:136,WithClause:137,WITH:138,IntoGraphClause:139,INTO:140,DEFAULT:141,GraphOrDefault_option0:142,GraphRefAll_group0:143,QuadPattern_option0:144,QuadPattern_repetition0:145,QuadsNotTriples:146,QuadsNotTriples_group0:147,QuadsNotTriples_option0:148,QuadsNotTriples_option1:149,QuadsNotTriples_option2:150,TriplesTemplate:151,TriplesTemplate_repetition0:152,TriplesSameSubject:153,TriplesTemplate_option0:154,GroupGraphPatternSub:155,GroupGraphPatternSub_option0:156,GroupGraphPatternSub_repetition0:157,GroupGraphPatternSubTail:158,GraphPatternNotTriples:159,GroupGraphPatternSubTail_option0:160,GroupGraphPatternSubTail_option1:161,TriplesBlock:162,TriplesBlock_repetition0:163,TriplesSameSubjectPath:164,TriplesBlock_option0:165,GraphPatternNotTriples_repetition0:166,OPTIONAL:167,MINUS:168,GraphPatternNotTriples_group0:169,SERVICE:170,GraphPatternNotTriples_option0:171,GraphPatternNotTriples_group1:172,FILTER:173,BIND:174,FunctionCall_option0:175,FunctionCall_repetition0:176,ExpressionList:177,ExpressionList_repetition0:178,ConstructTemplate_option0:179,ConstructTriples:180,ConstructTriples_repetition0:181,ConstructTriples_option0:182,TriplesSameSubject_group0:183,PropertyListNotEmpty:184,TriplesNode:185,PropertyList:186,PropertyList_option0:187,VerbObjectList:188,PropertyListNotEmpty_repetition0:189,SemiOptionalVerbObjectList:190,";":191,SemiOptionalVerbObjectList_option0:192,Verb:193,ObjectList:194,a:195,ObjectList_repetition0:196,GraphNode:197,ObjectListPath:198,ObjectListPath_repetition0:199,GraphNodePath:200,TriplesSameSubjectPath_group0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,PropertyListPathNotEmpty_group0:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmpty_repetition1:207,PropertyListPathNotEmptyTail:208,PropertyListPathNotEmptyTail_group0:209,Path:210,Path_repetition0:211,PathSequence:212,PathSequence_repetition0:213,PathEltOrInverse:214,PathElt:215,PathPrimary:216,PathElt_option0:217,PathEltOrInverse_option0:218,"!":219,PathNegatedPropertySet:220,PathOneInPropertySet:221,PathNegatedPropertySet_repetition0:222,PathNegatedPropertySet_option0:223,"^":224,TriplesNode_repetition_plus0:225,"[":226,"]":227,TriplesNodePath_repetition_plus0:228,GraphNode_group0:229,GraphNodePath_group0:230,"<<":231,VarTriple_group0:232,VarTriple_group1:233,VarTriple_group2:234,">>":235,VarTriple_group3:236,VarTriple_group4:237,ConstTriple_group0:238,ConstTriple_group1:239,ConstTriple_group2:240,ConstTriple_group3:241,ConstTriple_group4:242,VarOrTerm:243,Term:244,BLANK_NODE_LABEL:245,ANON:246,ConditionalAndExpression:247,Expression_repetition0:248,ExpressionTail:249,"||":250,RelationalExpression:251,ConditionalAndExpression_repetition0:252,ConditionalAndExpressionTail:253,"&&":254,AdditiveExpression:255,RelationalExpression_group0:256,RelationalExpression_option0:257,IN:258,MultiplicativeExpression:259,AdditiveExpression_repetition0:260,AdditiveExpressionTail:261,AdditiveExpressionTail_group0:262,NumericLiteralPositive:263,AdditiveExpressionTail_repetition0:264,NumericLiteralNegative:265,AdditiveExpressionTail_repetition1:266,UnaryExpression:267,MultiplicativeExpression_repetition0:268,MultiplicativeExpressionTail:269,MultiplicativeExpressionTail_group0:270,UnaryExpression_option0:271,PrimaryExpression:272,"-":273,Aggregate:274,FUNC_ARITY0:275,FUNC_ARITY1:276,FUNC_ARITY2:277,",":278,IF:279,BuiltInCall_group0:280,BOUND:281,BNODE:282,BuiltInCall_option0:283,EXISTS:284,COUNT:285,Aggregate_option0:286,Aggregate_group0:287,FUNC_AGGREGATE:288,Aggregate_option1:289,GROUP_CONCAT:290,Aggregate_option2:291,Aggregate_option3:292,GroupConcatSeparator:293,SEPARATOR:294,"=":295,String:296,LANGTAG:297,"^^":298,DECIMAL:299,DOUBLE:300,BOOLEAN:301,STRING_LITERAL1:302,STRING_LITERAL2:303,STRING_LITERAL_LONG1:304,STRING_LITERAL_LONG2:305,INTEGER_POSITIVE:306,DECIMAL_POSITIVE:307,DOUBLE_POSITIVE:308,INTEGER_NEGATIVE:309,DECIMAL_NEGATIVE:310,DOUBLE_NEGATIVE:311,PNAME_LN:312,QueryOrUpdate_group0_option0:313,Prologue_repetition0_group0:314,SelectClauseBase_option0_group0:315,DISTINCT:316,REDUCED:317,DescribeQuery_group0_repetition_plus0_group0:318,DescribeQuery_group0_repetition_plus0:319,NAMED:320,SILENT:321,CLEAR:322,DROP:323,ADD:324,MOVE:325,COPY:326,ALL:327,".":328,UNION:329,"|":330,"/":331,PathElt_option0_group0:332,"?":333,"+":334,"!=":335,"<":336,">":337,"<=":338,">=":339,NOT:340,CONCAT:341,COALESCE:342,SUBSTR:343,REGEX:344,REPLACE:345,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",26:"*",28:"SELECT",34:"VAR",35:"(",37:"AS",38:")",41:"CONSTRUCT",45:"WHERE",46:"{",48:"}",50:"DESCRIBE",55:"ASK",58:"FROM",68:"GROUP",69:"BY",75:"HAVING",78:"ORDER",81:"ASC",83:"DESC",86:"LIMIT",87:"INTEGER",88:"OFFSET",90:"VALUES",93:"NIL",100:"UNDEF",107:"LOAD",116:"TO",117:"CREATE",119:"GRAPH",120:"INSERTDATA",122:"DELETEDATA",123:"DELETEWHERE",132:"DELETE",133:"INSERT",135:"USING",138:"WITH",140:"INTO",141:"DEFAULT",167:"OPTIONAL",168:"MINUS",170:"SERVICE",173:"FILTER",174:"BIND",191:";",195:"a",219:"!",224:"^",226:"[",227:"]",231:"<<",235:">>",245:"BLANK_NODE_LABEL",246:"ANON",250:"||",254:"&&",258:"IN",273:"-",275:"FUNC_ARITY0",276:"FUNC_ARITY1",277:"FUNC_ARITY2",278:",",279:"IF",281:"BOUND",282:"BNODE",284:"EXISTS",285:"COUNT",288:"FUNC_AGGREGATE",290:"GROUP_CONCAT",294:"SEPARATOR",295:"=",297:"LANGTAG",298:"^^",299:"DECIMAL",300:"DOUBLE",301:"BOOLEAN",302:"STRING_LITERAL1",303:"STRING_LITERAL2",304:"STRING_LITERAL_LONG1",305:"STRING_LITERAL_LONG2",306:"INTEGER_POSITIVE",307:"DECIMAL_POSITIVE",308:"DOUBLE_POSITIVE",309:"INTEGER_NEGATIVE",310:"DECIMAL_NEGATIVE",311:"DOUBLE_NEGATIVE",312:"PNAME_LN",316:"DISTINCT",317:"REDUCED",320:"NAMED",321:"SILENT",322:"CLEAR",323:"DROP",324:"ADD",325:"MOVE",326:"COPY",327:"ALL",328:".",329:"UNION",330:"|",331:"/",333:"?",334:"+",335:"!=",336:"<",337:">",338:"<=",339:">=",340:"NOT",341:"CONCAT",342:"COALESCE",343:"SUBSTR",344:"REGEX",345:"REPLACE"},productions_:[0,[3,3],[4,1],[8,2],[11,2],[14,3],[17,4],[17,4],[18,2],[22,2],[25,2],[30,4],[30,4],[33,1],[33,5],[33,5],[40,5],[40,7],[49,5],[54,4],[57,3],[20,2],[24,2],[21,3],[67,3],[71,1],[71,1],[71,3],[71,5],[71,1],[74,2],[77,3],[80,2],[80,2],[80,1],[80,1],[85,2],[85,2],[85,4],[85,4],[89,2],[91,4],[91,4],[91,6],[97,1],[97,1],[97,1],[97,1],[101,3],[103,3],[105,4],[105,3],[105,5],[105,4],[105,2],[105,2],[105,2],[105,6],[105,6],[129,2],[125,2],[134,3],[137,2],[139,3],[115,1],[115,2],[112,2],[112,1],[121,4],[146,7],[151,3],[62,3],[62,3],[155,2],[158,3],[162,3],[159,2],[159,2],[159,2],[159,3],[159,4],[159,2],[159,6],[159,6],[159,1],[84,1],[84,1],[84,1],[73,2],[73,6],[177,1],[177,4],[42,3],[180,3],[153,2],[153,2],[186,1],[184,2],[190,2],[188,2],[193,1],[193,1],[193,1],[194,2],[198,2],[164,2],[164,2],[202,4],[208,1],[208,3],[210,2],[212,2],[215,2],[214,2],[216,1],[216,1],[216,2],[216,3],[220,1],[220,1],[220,4],[221,1],[221,1],[221,2],[221,2],[185,3],[185,3],[203,3],[203,3],[197,1],[197,1],[200,1],[200,1],[39,9],[39,5],[99,9],[99,5],[243,1],[243,1],[244,1],[244,1],[244,1],[244,1],[244,1],[36,2],[249,2],[247,2],[253,2],[251,1],[251,3],[251,4],[255,2],[261,2],[261,2],[261,2],[259,2],[269,2],[267,2],[267,2],[267,2],[272,1],[272,1],[272,1],[272,1],[272,1],[272,1],[82,3],[72,1],[72,2],[72,4],[72,6],[72,8],[72,2],[72,4],[72,2],[72,4],[72,3],[274,5],[274,5],[274,6],[293,4],[98,1],[98,2],[98,3],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[296,1],[296,1],[296,1],[296,1],[263,1],[263,1],[263,1],[265,1],[265,1],[265,1],[60,1],[60,1],[60,1],[313,0],[313,1],[5,1],[5,1],[314,1],[314,1],[7,0],[7,2],[9,1],[9,1],[9,1],[9,1],[10,0],[10,1],[19,0],[19,2],[23,0],[23,2],[27,1],[27,2],[315,1],[315,1],[29,0],[29,1],[31,0],[31,1],[32,0],[32,1],[43,0],[43,2],[44,0],[44,2],[47,0],[47,1],[318,1],[318,1],[319,1],[319,2],[51,1],[51,1],[52,0],[52,2],[53,0],[53,1],[56,0],[56,2],[59,0],[59,1],[61,0],[61,1],[63,0],[63,1],[64,0],[64,1],[65,0],[65,1],[66,0],[66,1],[70,1],[70,2],[76,1],[76,2],[79,1],[79,2],[92,0],[92,2],[94,0],[94,2],[95,1],[95,2],[96,0],[96,2],[102,1],[102,2],[104,0],[104,4],[106,0],[106,2],[108,0],[108,1],[109,0],[109,1],[110,1],[110,1],[111,0],[111,1],[113,1],[113,1],[113,1],[114,0],[114,1],[118,0],[118,1],[124,0],[124,1],[126,0],[126,1],[127,0],[127,2],[128,0],[128,1],[130,0],[130,1],[131,0],[131,2],[136,0],[136,1],[142,0],[142,1],[143,1],[143,1],[143,1],[144,0],[144,1],[145,0],[145,2],[147,1],[147,1],[148,0],[148,1],[149,0],[149,1],[150,0],[150,1],[152,0],[152,3],[154,0],[154,1],[156,0],[156,1],[157,0],[157,2],[160,0],[160,1],[161,0],[161,1],[163,0],[163,3],[165,0],[165,1],[166,0],[166,3],[169,1],[169,1],[171,0],[171,1],[172,1],[172,1],[175,0],[175,1],[176,0],[176,3],[178,0],[178,3],[179,0],[179,1],[181,0],[181,3],[182,0],[182,1],[183,1],[183,1],[187,0],[187,1],[189,0],[189,2],[192,0],[192,1],[196,0],[196,3],[199,0],[199,3],[201,1],[201,1],[204,0],[204,1],[205,1],[205,1],[206,0],[206,3],[207,0],[207,2],[209,1],[209,1],[211,0],[211,3],[213,0],[213,3],[332,1],[332,1],[332,1],[217,0],[217,1],[218,0],[218,1],[222,0],[222,3],[223,0],[223,1],[225,1],[225,2],[228,1],[228,2],[229,1],[229,1],[230,1],[230,1],[232,1],[232,1],[233,1],[233,1],[234,1],[234,1],[236,1],[236,1],[237,1],[237,1],[238,1],[238,1],[239,1],[239,1],[240,1],[240,1],[241,1],[241,1],[242,1],[242,1],[248,0],[248,2],[252,0],[252,2],[256,1],[256,1],[256,1],[256,1],[256,1],[256,1],[257,0],[257,1],[260,0],[260,2],[262,1],[262,1],[264,0],[264,2],[266,0],[266,2],[268,0],[268,2],[270,1],[270,1],[271,0],[271,1],[280,1],[280,1],[280,1],[280,1],[280,1],[283,0],[283,1],[286,0],[286,1],[287,1],[287,1],[289,0],[289,1],[291,0],[291,1],[292,0],[292,1]],performAction:function(e,t,r,n,i,s,a){var o,u,h,l,c=s.length-1;switch(i){case 1:if(s[c-1]=s[c-1]||{},nn.base&&(s[c-1].base=nn.base),nn.base="",s[c-1].prefixes=nn.prefixes,nn.prefixes=null,"update"===s[c-1].type){const e={};for(const t of s[c-1].updates)if("insert"===t.updateType){const r={};for(const e of t.insert)if("bgp"===e.type||"graph"===e.type)for(const t of e.triples)"BlankNode"===t.subject.termType&&(r[t.subject.value]=!0),"BlankNode"===t.predicate.termType&&(r[t.predicate.value]=!0),"BlankNode"===t.object.termType&&(r[t.object.value]=!0);for(const t of Object.keys(r)){if(e[t])throw new Error("Detected reuse blank node across different INSERT DATA clauses");e[t]=!0}}}return s[c-1];case 3:this.$=kr(s[c-1],s[c],{type:"query"});break;case 4:nn.base=Nr(s[c]);break;case 5:nn.prefixes||(nn.prefixes={}),s[c-1]=s[c-1].substr(0,s[c-1].length-1),s[c]=Nr(s[c]),nn.prefixes[s[c-1]]=s[c];break;case 6:this.$=kr(s[c-3],Ir(s[c-2]),s[c-1],s[c]);break;case 7:if(!nn.skipValidation){if(Yr(s[c-3].variables.map((e=>Vr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof hr)))||s[c].group)for(const e of s[c-3].variables)if("Variable"===e.termType){if(!s[c].group||!s[c].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Vr(e.expression).length){const t=Zr(e.expression);for(const e of t)if(!s[c].group||!s[c].group.map||!s[c].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}}const e=s[c-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=s[c-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Yr(e.map((e=>e.variables))).map((e=>e.value||e.variable.value));for(const e of t)if(r.indexOf(e)>=0)throw Error("Target id of 'AS' (?"+e+") already used in subquery")}this.$=kr(s[c-3],Ir(s[c-2]),s[c-1],s[c]);break;case 8:this.$=kr(s[c-1],{variables:[new hr]});break;case 9:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;e<t.length-1;e++)t[e+1]==t[e]&&r.push(t[e]);return r}(s[c].map((e=>e.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=kr(s[c-1],{variables:s[c]});break;case 10:this.$=kr({queryType:"SELECT"},s[c]&&(s[c-1]=Sr(s[c]),s[c]={},s[c][s[c-1]]=!0,s[c]));break;case 11:case 12:this.$=kr(s[c-3],s[c-2],s[c-1],s[c],{type:"query"});break;case 13:case 100:case 137:case 165:this.$=jr(s[c]);break;case 14:case 28:this.$=Fr(s[c-3],{variable:jr(s[c-1])});break;case 15:this.$=Jr(Fr(s[c-3],{variable:jr(s[c-1])}));break;case 16:this.$=kr({queryType:"CONSTRUCT",template:s[c-3]},Ir(s[c-2]),s[c-1],s[c]);break;case 17:this.$=kr({queryType:"CONSTRUCT",template:s[c-2]=s[c-2]?s[c-2].triples:[]},Ir(s[c-5]),{where:[{type:"bgp",triples:xr([],s[c-2])}]},s[c]);break;case 18:this.$=kr({queryType:"DESCRIBE",variables:"*"===s[c-3]?[new hr]:s[c-3].map(jr)},Ir(s[c-2]),s[c-1],s[c]);break;case 19:this.$=kr({queryType:"ASK"},Ir(s[c-2]),s[c-1],s[c]);break;case 20:case 61:this.$={iri:s[c],named:!!s[c-1]};break;case 21:this.$={where:s[c].patterns};break;case 22:this.$=kr(s[c-1],s[c]);break;case 23:this.$=kr(s[c-2],s[c-1],s[c]);break;case 24:this.$={group:s[c]};break;case 25:case 26:case 32:case 34:this.$=Fr(s[c]);break;case 27:this.$=Fr(s[c-1]);break;case 29:case 35:this.$=Fr(jr(s[c]));break;case 30:this.$={having:s[c]};break;case 31:this.$={order:s[c]};break;case 33:this.$=Fr(s[c],{descending:!0});break;case 36:this.$={limit:Pr(s[c])};break;case 37:this.$={offset:Pr(s[c])};break;case 38:this.$={limit:Pr(s[c-2]),offset:Pr(s[c])};break;case 39:this.$={limit:Pr(s[c]),offset:Pr(s[c-2])};break;case 40:this.$={type:"values",values:s[c]};break;case 41:this.$=s[c-1].map((function(e){var t={};return t[s[c-3]]=e,t}));break;case 42:this.$=s[c-1].map((function(){return{}}));break;case 43:var f=s[c-4].length;s[c-4]=s[c-4].map(jr),this.$=s[c-1].map((function(e){if(e.length!==f)throw Error("Inconsistent VALUES length");for(var t={},r=0;r<f;r++)t["?"+s[c-4][r].value]=e[r];return t}));break;case 46:this.$=Jr(s[c]);break;case 47:this.$=void 0;break;case 48:case 92:case 117:case 166:this.$=s[c-1];break;case 49:this.$={type:"update",updates:Tr(s[c-2],s[c-1])};break;case 50:this.$=kr({type:"load",silent:!!s[c-2],source:s[c-1]},s[c]&&{destination:s[c]});break;case 51:this.$={type:Sr(s[c-2]),silent:!!s[c-1],graph:s[c]};break;case 52:this.$={type:Sr(s[c-4]),silent:!!s[c-3],source:s[c-2],destination:s[c]};break;case 53:this.$={type:"create",silent:!!s[c-2],graph:{type:"graph",name:s[c]}};break;case 54:this.$={updateType:"insert",insert:en(s[c])};break;case 55:this.$={updateType:"delete",delete:tn(en(s[c]))};break;case 56:this.$={updateType:"deletewhere",delete:tn(s[c])};break;case 57:this.$=kr({updateType:"insertdelete"},s[c-5],{insert:s[c-4]||[]},{delete:s[c-3]||[]},Ir(s[c-2],"using"),{where:s[c].patterns});break;case 58:this.$=kr({updateType:"insertdelete"},s[c-5],{delete:s[c-4]||[]},{insert:s[c-3]||[]},Ir(s[c-2],"using"),{where:s[c].patterns});break;case 59:this.$=tn(s[c]);break;case 60:case 63:case 157:case 180:this.$=s[c];break;case 62:this.$={graph:s[c]};break;case 64:this.$={type:"graph",default:!0};break;case 65:case 66:this.$={type:"graph",name:s[c]};break;case 67:this.$={},this.$[Sr(s[c])]=!0;break;case 68:this.$=s[c-2]?Rr(s[c-1],[s[c-2]]):Rr(s[c-1]);break;case 69:var d=kr(s[c-3]||{triples:[]},{type:"graph",name:jr(s[c-5])});this.$=s[c]?[d,s[c]]:[d];break;case 70:case 75:this.$={type:"bgp",triples:Rr(s[c-2],[s[c-1]])};break;case 71:this.$={type:"group",patterns:[s[c-1]]};break;case 72:for(const e of s[c-1].filter((e=>"bind"===e.type))){const t=s[c-1].indexOf(e),r=new Set;for(const e of s[c-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Kr(e).forEach((e=>r.add(e)));if(r.has(e.variable.value))throw Error("Variable used to bind is already bound (?"+e.variable.value+")")}this.$={type:"group",patterns:s[c-1]};break;case 73:this.$=s[c-1]?Rr([s[c-1]],s[c]):Rr(s[c]);break;case 74:this.$=s[c]?[s[c-2],s[c]]:s[c-2];break;case 76:s[c-1].length?this.$={type:"union",patterns:Rr(s[c-1].map(Dr),[Dr(s[c])])}:this.$=s[c];break;case 77:this.$=kr(s[c],{type:"optional"});break;case 78:this.$=kr(s[c],{type:"minus"});break;case 79:this.$=kr(s[c],{type:"graph",name:jr(s[c-1])});break;case 80:this.$=kr(s[c],{type:"service",name:jr(s[c-1]),silent:!!s[c-2]});break;case 81:this.$={type:"filter",expression:s[c]};break;case 82:this.$={type:"bind",variable:jr(s[c-1]),expression:s[c-3]};break;case 83:this.$=Jr({type:"bind",variable:jr(s[c-1]),expression:s[c-3]});break;case 88:this.$={type:"functionCall",function:s[c-1],args:[]};break;case 89:this.$={type:"functionCall",function:s[c-5],args:Tr(s[c-2],s[c-1]),distinct:!!s[c-3]};break;case 90:case 108:case 119:case 209:case 217:case 219:case 231:case 233:case 243:case 247:case 267:case 269:case 273:case 277:case 300:case 306:case 317:case 327:case 333:case 339:case 343:case 353:case 355:case 359:case 367:case 371:case 373:case 381:case 383:case 387:case 389:case 398:case 430:case 432:case 442:case 446:case 448:case 450:this.$=[];break;case 91:this.$=Tr(s[c-2],s[c-1]);break;case 93:this.$=Rr(s[c-2],[s[c-1]]);break;case 94:case 105:this.$=s[c].map((function(e){return kr(Br(s[c-1]),e)}));break;case 95:this.$=xr(s[c].map((function(e){return kr(Br(s[c-1].entity),e)})),s[c-1].triples);break;case 97:this.$=Rr([s[c-1]],s[c]);break;case 98:this.$=Rr(s[c]);break;case 99:this.$=Qr(s[c-1],s[c]);break;case 102:case 115:case 122:this.$=nn.factory.namedNode(cr);break;case 103:case 104:this.$=Tr(s[c-1],s[c]);break;case 106:this.$=s[c]?xr(s[c].map((function(e){return kr(Br(s[c-1].entity),e)})),s[c-1].triples):s[c-1].triples;break;case 107:this.$=Qr(jr(s[c-3]),Tr(s[c-2],s[c-1]),s[c]);break;case 109:this.$=Qr(jr(s[c-1]),s[c]);break;case 110:this.$=s[c-1].length?Or("|",Tr(s[c-1],s[c])):s[c];break;case 111:this.$=s[c-1].length?Or("/",Tr(s[c-1],s[c])):s[c];break;case 112:this.$=s[c]?Or(s[c],[s[c-1]]):s[c-1];break;case 113:this.$=s[c-1]?Or(s[c-1],[s[c]]):s[c];break;case 116:case 123:this.$=Or(s[c-1],[s[c]]);break;case 120:this.$=Or("|",Tr(s[c-2],s[c-1]));break;case 124:this.$=Or(s[c-1],[nn.factory.namedNode(cr)]);break;case 125:case 127:this.$=function(e){var t=Mr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),xr(i,e.triples)}));for(var s=0,a=0,o=n.length,u=Array(2*o);s<o;)u[a++]=Br(r,nn.factory.namedNode(fr),n[s]),u[a++]=Br(r,nn.factory.namedNode(dr),r=++s<o?Mr():nn.factory.namedNode(pr));return{entity:t,triples:xr(u,i)}}(s[c-1]);break;case 126:case 128:this.$=(h=s[c-1],{entity:l=Mr(),triples:h.map((function(e){return kr(Br(l),e)}))});break;case 129:case 131:this.$={entity:s[c],triples:[]};break;case 133:case 135:this.$=Jr(nn.factory.quad(s[c-4],s[c-3],s[c-2],jr(s[c-6])));break;case 134:case 136:this.$=Jr(nn.factory.quad(s[c-3],s[c-2],s[c-1]));break;case 141:this.$=Mr(s[c].replace(/^(_:)/,""));break;case 142:this.$=Mr();break;case 143:this.$=nn.factory.namedNode(pr);break;case 144:case 146:case 151:case 155:this.$=Lr(s[c-1],s[c]);break;case 145:this.$=["||",s[c]];break;case 147:this.$=["&&",s[c]];break;case 149:this.$=Ar(s[c-1],[s[c-2],s[c]]);break;case 150:this.$=Ar(s[c-2]?"notin":"in",[s[c-3],s[c]]);break;case 152:case 156:this.$=[s[c-1],s[c]];break;case 153:this.$=["+",Lr(s[c-1],s[c])];break;case 154:var p=Cr(s[c-1].value.replace("-",""),s[c-1].datatype);this.$=["-",Lr(p,s[c])];break;case 158:this.$=Ar(s[c-1],[s[c]]);break;case 159:this.$=Ar("UMINUS",[s[c]]);break;case 168:this.$=Ar(Sr(s[c-1]));break;case 169:this.$=Ar(Sr(s[c-3]),[s[c-1]]);break;case 170:this.$=Ar(Sr(s[c-5]),[s[c-3],s[c-1]]);break;case 171:this.$=Ar(Sr(s[c-7]),[s[c-5],s[c-3],s[c-1]]);break;case 172:this.$=Ar(Sr(s[c-1]),s[c]);break;case 173:this.$=Ar("bound",[jr(s[c-1])]);break;case 174:this.$=Ar(s[c-1],[]);break;case 175:this.$=Ar(s[c-3],[s[c-1]]);break;case 176:this.$=Ar(s[c-2]?"notexists":"exists",[Dr(s[c])]);break;case 177:case 178:this.$=Fr(s[c-1],{type:"aggregate",aggregation:Sr(s[c-4]),distinct:!!s[c-2]});break;case 179:this.$=Fr(s[c-2],{type:"aggregate",aggregation:Sr(s[c-5]),distinct:!!s[c-3],separator:s[c-1]||" "});break;case 181:this.$=Cr(s[c]);break;case 182:this.$=(o=s[c-1],u=Sr(s[c].substr(1)),nn.factory.literal(o,u));break;case 183:this.$=Cr(s[c-2],s[c]);break;case 184:case 197:this.$=Cr(s[c],gr);break;case 185:case 198:this.$=Cr(s[c],yr);break;case 186:case 199:this.$=Cr(Sr(s[c]),_r);break;case 189:this.$=Cr(s[c].toLowerCase(),mr);break;case 190:case 191:this.$=Wr(s[c],1);break;case 192:case 193:this.$=Wr(s[c],3);break;case 194:this.$=Cr(s[c].substr(1),gr);break;case 195:this.$=Cr(s[c].substr(1),yr);break;case 196:this.$=Cr(s[c].substr(1).toLowerCase(),_r);break;case 200:this.$=nn.factory.namedNode(Nr(s[c]));break;case 201:var b=s[c].indexOf(":"),g=s[c].substr(0,b),y=nn.prefixes[g];if(!y)throw new Error("Unknown prefix: "+g);var _=Nr(y+s[c].substr(b+1));this.$=nn.factory.namedNode(_);break;case 202:if(s[c]=s[c].substr(0,s[c].length-1),!(s[c]in nn.prefixes))throw new Error("Unknown prefix: "+s[c]);_=Nr(nn.prefixes[s[c]]);this.$=nn.factory.namedNode(_);break;case 210:case 218:case 220:case 222:case 232:case 234:case 240:case 244:case 248:case 262:case 264:case 266:case 268:case 270:case 272:case 274:case 276:case 301:case 307:case 318:case 334:case 368:case 384:case 403:case 405:case 431:case 433:case 443:case 447:case 449:case 451:s[c-1].push(s[c]);break;case 221:case 239:case 261:case 263:case 265:case 271:case 275:case 402:case 404:this.$=[s[c]];break;case 278:s[c-3].push(s[c-2]);break;case 328:case 340:case 344:case 354:case 356:case 360:case 372:case 374:case 382:case 388:case 390:case 399:s[c-2].push(s[c-1])}},table:[e(t,n,{3:1,4:2,7:3}),{1:[3]},e(i,[2,277],{5:4,8:5,313:6,9:7,103:8,17:9,40:10,49:11,54:12,104:13,18:14,22:15,25:19,6:[2,203],28:s,41:[1,16],50:[1,17],55:[1,18]}),e([6,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],[2,2],{314:21,11:22,14:23,12:[1,24],15:[1,25]}),{6:[1,26]},{6:[2,205]},{6:[2,206]},{6:[2,215],10:27,89:28,90:a},{6:[2,204]},e(o,[2,211]),e(o,[2,212]),e(o,[2,213]),e(o,[2,214]),{105:30,107:[1,31],110:32,113:33,117:[1,34],120:[1,35],122:[1,36],123:[1,37],124:38,128:39,132:[2,302],133:[2,296],137:45,138:[1,46],322:[1,40],323:[1,41],324:[1,42],325:[1,43],326:[1,44]},e(u,[2,217],{19:47}),e(u,[2,219],{23:48}),e(h,[2,233],{42:49,44:50,46:[1,51]}),{13:l,16:c,26:[1,54],34:f,51:52,60:57,312:d,318:55,319:53},e(u,[2,247],{56:61}),{26:[1,62],27:63,33:64,34:p,35:b},e(g,[2,225],{29:67,315:68,316:[1,69],317:[1,70]}),e(t,[2,210]),e(t,[2,207]),e(t,[2,208]),{13:[1,71]},{16:[1,72]},{1:[2,1]},{6:[2,3]},{6:[2,216]},{34:[1,74],35:[1,76],91:73,93:[1,75]},{6:[2,279],106:77,191:[1,78]},e(y,[2,281],{108:79,321:[1,80]}),e(_,[2,287],{111:81,321:[1,82]}),e(m,[2,292],{114:83,321:[1,84]}),{118:85,119:[2,294],321:[1,86]},{46:w,121:87},{46:w,121:89},{46:w,121:90},{125:91,133:v},{129:93,132:E},e(S,[2,285]),e(S,[2,286]),e(T,[2,289]),e(T,[2,290]),e(T,[2,291]),{132:[2,303],133:[2,297]},{13:l,16:c,60:95,312:d},{20:96,45:x,46:k,57:97,58:R,61:98},{20:101,45:x,46:k,57:102,58:R,61:98},e(u,[2,231],{43:103}),{45:[1,104],57:105,58:R},e(N,[2,359],{179:106,180:107,181:108,48:[2,357]}),e(j,[2,243],{52:109}),e(j,[2,241],{60:57,318:110,13:l,16:c,34:f,312:d}),e(j,[2,242]),e(A,[2,239]),e(A,[2,237]),e(A,[2,238]),e(F,[2,200]),e(F,[2,201]),e(F,[2,202]),{20:111,45:x,46:k,57:112,58:R,61:98},e(u,[2,8]),e(u,[2,9],{33:113,34:p,35:b}),e(O,[2,221]),e(O,[2,13]),e(L,I,{36:114,39:115,247:116,251:118,255:119,259:120,267:121,271:122,219:P,231:D,273:C,334:B}),e(g,[2,10]),e(g,[2,226]),e(g,[2,223]),e(g,[2,224]),e(t,[2,4]),{13:[1,126]},e(M,[2,40]),{46:[1,127]},{46:[1,128]},{34:[1,130],95:129},{6:[2,49]},e(t,n,{7:3,4:131}),{13:l,16:c,60:132,312:d},e(y,[2,282]),{112:133,119:[1,134],141:[1,136],143:135,320:[1,137],327:[1,138]},e(_,[2,288]),e(y,U,{115:139,142:141,119:$,141:q}),e(m,[2,293]),{119:[1,143]},{119:[2,295]},e(G,[2,54]),e(N,z,{144:144,151:145,152:146,48:W,119:W}),e(G,[2,55]),e(G,[2,56]),e(Q,[2,298],{126:147,129:148,132:E}),{46:w,121:149},e(Q,[2,304],{130:150,125:151,133:v}),{46:w,121:152},e([132,133],[2,62]),e(H,V,{21:153,64:154,74:155,75:Z}),e(u,[2,218]),{46:Y,62:157},e(y,[2,249],{59:159,320:[1,160]}),{46:[2,252]},e(X,K,{24:161,63:162,67:163,68:J}),e(u,[2,220]),{20:165,45:x,46:k,57:166,58:R,61:98},{46:[1,167]},e(h,[2,234]),{48:[1,168]},{48:[2,358]},{13:l,16:c,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:169,183:170,185:171,226:ie,231:D,243:172,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(we,[2,245],{61:98,53:200,57:201,20:202,45:x,46:k,58:R}),e(A,[2,240]),e(X,K,{63:162,67:163,24:203,68:J}),e(u,[2,248]),e(O,[2,222]),{37:[1,204]},{37:[1,205]},e(ve,[2,430],{248:206}),{13:l,16:c,34:ee,39:209,60:178,87:re,93:ne,98:179,119:[1,207],231:D,236:208,243:210,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Ee,[2,432],{252:211}),e(Ee,[2,148],{256:212,257:213,258:[2,440],295:[1,214],335:[1,215],336:[1,216],337:[1,217],338:[1,218],339:[1,219],340:[1,220]}),e(Se,[2,442],{260:221}),e(Te,[2,450],{268:222}),{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:223,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:249,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:250,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(L,[2,455]),e(t,[2,5]),e(Ge,[2,267],{92:251}),e(ze,[2,269],{94:252}),{34:[1,254],38:[1,253]},e(We,[2,271]),e(i,[2,278],{6:[2,280]}),e(G,[2,283],{109:255,139:256,140:[1,257]}),e(G,[2,51]),{13:l,16:c,60:258,312:d},e(G,[2,67]),e(G,[2,312]),e(G,[2,313]),e(G,[2,314]),{116:[1,259]},e(Qe,[2,64]),{13:l,16:c,60:260,312:d},e(y,[2,311]),{13:l,16:c,60:261,312:d},e(He,[2,317],{145:262}),e(He,[2,316]),{13:l,16:c,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:263,183:170,185:171,226:ie,231:D,243:172,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Q,[2,300],{127:264}),e(Q,[2,299]),e([45,132,135],[2,60]),e(Q,[2,306],{131:265}),e(Q,[2,305]),e([45,133,135],[2,59]),e(o,[2,6]),e(Ve,[2,257],{65:266,77:267,78:[1,268]}),e(H,[2,256]),{13:l,16:c,35:ke,60:274,72:272,73:273,76:269,82:271,84:270,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e([6,48,68,75,78,86,88,90],[2,21]),e(N,Ze,{25:19,30:275,155:276,18:277,22:278,156:279,162:280,163:281,28:s,46:Ye,48:Ye,90:Ye,119:Ye,167:Ye,168:Ye,170:Ye,173:Ye,174:Ye}),{13:l,16:c,60:282,312:d},e(y,[2,250]),e(o,[2,7]),e(H,V,{64:154,74:155,21:283,75:Z}),e(X,[2,254]),{69:[1,284]},e(X,K,{63:162,67:163,24:285,68:J}),e(u,[2,232]),e(N,z,{152:146,47:286,151:287,48:[2,235]}),e(u,[2,92]),{48:[2,361],182:288,328:[1,289]},{13:l,16:c,34:Xe,60:294,184:290,188:291,193:292,195:Ke,312:d},e(Je,[2,365],{188:291,193:292,60:294,186:296,187:297,184:298,13:l,16:c,34:Xe,195:Ke,312:d}),e(et,[2,363]),e(et,[2,364]),{13:l,16:c,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:300,225:299,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{13:l,16:c,34:Xe,60:294,184:305,188:291,193:292,195:Ke,312:d},e(tt,[2,137]),e(tt,[2,138]),e(tt,[2,139]),e(tt,[2,140]),e(tt,[2,141]),e(tt,[2,142]),e(tt,[2,143]),e(rt,[2,181],{297:[1,306],298:[1,307]}),e(rt,[2,184]),e(rt,[2,185]),e(rt,[2,186]),e(rt,[2,187]),e(rt,[2,188]),e(rt,[2,189]),e(nt,[2,190]),e(nt,[2,191]),e(nt,[2,192]),e(nt,[2,193]),e(rt,[2,194]),e(rt,[2,195]),e(rt,[2,196]),e(rt,[2,197]),e(rt,[2,198]),e(rt,[2,199]),e(X,K,{63:162,67:163,24:308,68:J}),e(j,[2,244]),e(we,[2,246]),e(o,[2,19]),{34:[1,309]},{34:[1,310]},e([37,38,191,278],[2,144],{249:311,250:[1,312]}),{13:l,16:c,34:[1,314],60:315,232:313,312:d},{13:l,16:c,34:Xe,60:294,193:316,195:Ke,312:d},e(et,[2,416]),e(et,[2,417]),e(ve,[2,146],{253:317,254:[1,318]}),e(L,I,{259:120,267:121,271:122,255:319,219:P,273:C,334:B}),{258:[1,320]},e(it,[2,434]),e(it,[2,435]),e(it,[2,436]),e(it,[2,437]),e(it,[2,438]),e(it,[2,439]),{258:[2,441]},e([37,38,191,250,254,258,278,295,335,336,337,338,339,340],[2,151],{261:321,262:322,263:323,265:324,273:[1,326],306:pe,307:be,308:ge,309:ye,310:_e,311:me,334:[1,325]}),e(Se,[2,155],{269:327,270:328,26:st,331:at}),e(Te,[2,157]),e(Te,[2,160]),e(Te,[2,161]),e(Te,[2,162],{35:ot,93:ut}),e(Te,[2,163]),e(Te,[2,164]),e(Te,[2,165]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:333,219:P,273:C,334:B}),e(ht,[2,167]),{93:[1,334]},{35:[1,335]},{35:[1,336]},{35:[1,337]},{35:lt,93:ct,177:338},{35:[1,341]},{35:[1,343],93:[1,342]},{284:[1,344]},{35:[1,345]},{35:[1,346]},{35:[1,347]},e(ft,[2,456]),e(ft,[2,457]),e(ft,[2,458]),e(ft,[2,459]),e(ft,[2,460]),{284:[2,462]},e(Te,[2,158]),e(Te,[2,159]),{13:l,16:c,48:[1,348],60:350,87:re,97:349,98:351,99:352,100:dt,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{48:[1,355],93:[1,356]},{46:[1,357]},e(We,[2,272]),e(G,[2,50]),e(G,[2,284]),{119:[1,358]},e(G,[2,66]),e(y,U,{142:141,115:359,119:$,141:q}),e(Qe,[2,65]),e(G,[2,53]),{48:[1,360],119:[1,362],146:361},e(He,[2,329],{154:363,328:[1,364]}),{45:[1,365],134:366,135:bt},{45:[1,368],134:369,135:bt},e(gt,[2,259],{66:370,85:371,86:[1,372],88:[1,373]}),e(Ve,[2,258]),{69:[1,374]},e(H,[2,30],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:375,13:l,16:c,35:ke,275:Re,276:Ne,277:je,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(yt,[2,263]),e(_t,[2,85]),e(_t,[2,86]),e(_t,[2,87]),{35:ot,93:ut},{48:[1,376]},{48:[1,377]},{20:378,45:x,46:k,61:98},{20:379,45:x,46:k,61:98},e(mt,[2,333],{157:380}),e(mt,[2,332]),{13:l,16:c,34:ee,35:wt,39:385,60:178,87:re,93:ne,98:179,164:381,201:382,203:383,226:vt,231:D,243:384,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(j,[2,20]),e(gt,[2,22]),{13:l,16:c,34:Et,35:St,60:274,70:388,71:389,72:390,73:391,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(o,[2,16]),{48:[1,394]},{48:[2,236]},{48:[2,93]},e(N,[2,360],{48:[2,362]}),e(Je,[2,94]),e(Tt,[2,367],{189:395}),e(N,[2,371],{194:396,196:397}),e(N,[2,100]),e(N,[2,101]),e(N,[2,102]),e(Je,[2,95]),e(Je,[2,96]),e(Je,[2,366]),{13:l,16:c,34:ee,35:te,38:[1,398],39:304,60:178,87:re,93:ne,98:179,185:302,197:399,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,402]),e(kt,[2,129]),e(kt,[2,130]),e(kt,[2,406]),e(kt,[2,407]),{227:[1,400]},e(rt,[2,182]),{13:l,16:c,60:401,312:d},e(o,[2,18]),{38:[1,402]},{38:[1,403]},e(ve,[2,431]),e(L,I,{251:118,255:119,259:120,267:121,271:122,247:404,219:P,273:C,334:B}),{46:[1,405]},{46:[2,410]},{46:[2,411]},{13:l,16:c,34:ee,39:407,60:178,87:re,93:ne,98:179,231:D,237:406,243:408,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Ee,[2,433]),e(L,I,{255:119,259:120,267:121,271:122,251:409,219:P,273:C,334:B}),e(Ee,[2,149]),{35:lt,93:ct,177:410},e(Se,[2,443]),e(L,I,{267:121,271:122,259:411,219:P,273:C,334:B}),e(Te,[2,446],{264:412}),e(Te,[2,448],{266:413}),e(it,[2,444]),e(it,[2,445]),e(Te,[2,451]),e(L,I,{271:122,267:414,219:P,273:C,334:B}),e(it,[2,452]),e(it,[2,453]),e(ht,[2,88]),e(it,[2,351],{175:415,316:[1,416]}),{38:[1,417]},e(ht,[2,168]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:418,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:419,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:420,219:P,273:C,334:B}),e(ht,[2,172]),e(ht,[2,90]),e(it,[2,355],{178:421}),{34:[1,422]},e(ht,[2,174]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:423,219:P,273:C,334:B}),{46:Y,62:424},e(Rt,[2,463],{286:425,316:[1,426]}),e(it,[2,467],{289:427,316:[1,428]}),e(it,[2,469],{291:429,316:[1,430]}),e(M,[2,41]),e(Ge,[2,268]),e(Nt,[2,44]),e(Nt,[2,45]),e(Nt,[2,46]),e(Nt,[2,47]),{13:l,16:c,60:178,87:re,93:ne,98:179,99:433,119:[1,431],231:pt,241:432,244:434,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(M,[2,42]),e(ze,[2,270]),e(jt,[2,273],{96:435}),{13:l,16:c,60:436,312:d},e(G,[2,52]),e([6,45,132,133,135,191],[2,68]),e(He,[2,318]),{13:l,16:c,34:[1,438],60:439,147:437,312:d},e(He,[2,70]),e(N,[2,328],{48:At,119:At}),{46:Y,62:440},e(Q,[2,301]),e(y,[2,308],{136:441,320:[1,442]}),{46:Y,62:443},e(Q,[2,307]),e(gt,[2,23]),e(gt,[2,260]),{87:[1,444]},{87:[1,445]},{13:l,16:c,34:Ft,35:ke,60:274,72:272,73:273,79:446,80:447,81:Ot,82:271,83:Lt,84:450,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(yt,[2,264]),e(It,[2,71]),e(It,[2,72]),e(H,V,{64:154,74:155,21:452,75:Z}),e(X,K,{63:162,67:163,24:453,68:J}),{46:[2,343],48:[2,73],89:463,90:a,119:[1,459],158:454,159:455,166:456,167:[1,457],168:[1,458],170:[1,460],173:[1,461],174:[1,462]},e(mt,[2,341],{165:464,328:[1,465]}),e(Pt,Dt,{202:466,205:467,210:468,211:470,34:Ct}),e(Bt,[2,377],{205:467,210:468,211:470,204:471,202:472,13:Dt,16:Dt,35:Dt,195:Dt,219:Dt,224:Dt,312:Dt,34:Ct}),e(Mt,[2,375]),e(Mt,[2,376]),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:474,203:476,226:vt,228:473,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Pt,Dt,{205:467,210:468,211:470,202:479,34:Ct}),e(X,[2,24],{274:231,280:236,283:239,60:274,72:390,73:391,71:480,13:l,16:c,34:Et,35:St,275:Re,276:Ne,277:je,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(Ut,[2,261]),e(Ut,[2,25]),e(Ut,[2,26]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:481,219:P,273:C,334:B}),e(Ut,[2,29]),e(X,K,{63:162,67:163,24:482,68:J}),e([48,119,227,328],[2,97],{190:483,191:[1,484]}),e(Tt,[2,99]),{13:l,16:c,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:485,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e($t,[2,125]),e(xt,[2,403]),e($t,[2,126]),e(rt,[2,183]),e(O,[2,14]),e(O,[2,15]),e(ve,[2,145]),{13:l,16:c,34:ee,39:487,60:178,87:re,93:ne,98:179,231:D,233:486,243:488,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{235:[1,489]},{235:[2,418]},{235:[2,419]},e(Ee,[2,147]),e(Ee,[2,150]),e(Se,[2,152]),e(Se,[2,153],{270:328,269:490,26:st,331:at}),e(Se,[2,154],{270:328,269:491,26:st,331:at}),e(Te,[2,156]),e(it,[2,353],{176:492}),e(it,[2,352]),e([6,13,16,26,34,35,37,38,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],[2,166]),{38:[1,493]},{278:[1,494]},{278:[1,495]},e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:496,219:P,273:C,334:B}),{38:[1,497]},{38:[1,498]},e(ht,[2,176]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,287:499,36:501,26:[1,500],219:P,273:C,334:B}),e(Rt,[2,464]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:502,219:P,273:C,334:B}),e(it,[2,468]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:503,219:P,273:C,334:B}),e(it,[2,470]),{13:l,16:c,34:[1,505],60:506,238:504,312:d},{13:l,16:c,34:Xe,60:294,193:507,195:Ke,312:d},e(et,[2,426]),e(et,[2,427]),{35:[1,510],48:[1,508],101:509},e(G,[2,63]),{46:[1,511]},{46:[2,319]},{46:[2,320]},e(G,[2,57]),{13:l,16:c,60:512,312:d},e(y,[2,309]),e(G,[2,58]),e(gt,[2,36],{88:[1,513]}),e(gt,[2,37],{86:[1,514]}),e(Ve,[2,31],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:450,80:515,13:l,16:c,34:Ft,35:ke,81:Ot,83:Lt,275:Re,276:Ne,277:je,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(qt,[2,265]),{35:ke,82:516},{35:ke,82:517},e(qt,[2,34]),e(qt,[2,35]),{31:518,48:[2,227],89:519,90:a},{32:520,48:[2,229],89:521,90:a},e(mt,[2,334]),e(Gt,[2,335],{160:522,328:[1,523]}),{46:Y,62:524},{46:Y,62:525},{46:Y,62:526},{13:l,16:c,34:[1,528],60:529,169:527,312:d},e(zt,[2,347],{171:530,321:[1,531]}),{13:l,16:c,35:ke,60:274,72:272,73:273,82:271,84:532,274:231,275:Re,276:Ne,277:je,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{35:[1,533]},e(Wt,[2,84]),e(mt,[2,75]),e(N,[2,340],{46:Qt,48:Qt,90:Qt,119:Qt,167:Qt,168:Qt,170:Qt,173:Qt,174:Qt}),e(Bt,[2,105]),e(N,[2,381],{206:534}),e(N,[2,379]),e(N,[2,380]),e(Pt,[2,389],{212:535,213:536}),e(Bt,[2,106]),e(Bt,[2,378]),{13:l,16:c,34:ee,35:wt,38:[1,537],39:478,60:178,87:re,93:ne,98:179,200:538,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,404]),e(Ht,[2,131]),e(Ht,[2,132]),e(Ht,[2,408]),e(Ht,[2,409]),{227:[1,539]},e(Ut,[2,262]),{37:[1,541],38:[1,540]},e(o,[2,17]),e(Tt,[2,368]),e(Tt,[2,369],{193:292,60:294,192:542,188:543,13:l,16:c,34:Xe,195:Ke,312:d}),e(Tt,[2,103],{278:[1,544]}),{13:l,16:c,34:Xe,60:294,193:545,195:Ke,312:d},e(et,[2,412]),e(et,[2,413]),e(Vt,[2,134]),e(Te,[2,447]),e(Te,[2,449]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:546,219:P,273:C,334:B}),e(ht,[2,169]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:547,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:548,219:P,273:C,334:B}),{38:[1,549],278:[1,550]},e(ht,[2,173]),e(ht,[2,175]),{38:[1,551]},{38:[2,465]},{38:[2,466]},{38:[1,552]},{38:[2,471],191:[1,555],292:553,293:554},{46:[1,556]},{46:[2,420]},{46:[2,421]},{13:l,16:c,60:178,87:re,93:ne,98:179,99:558,231:pt,242:557,244:559,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(M,[2,43]),e(jt,[2,274]),{13:l,16:c,60:350,87:re,97:561,98:351,99:352,100:dt,102:560,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(N,z,{152:146,148:562,151:563,48:[2,321]}),e(Q,[2,61]),{87:[1,564]},{87:[1,565]},e(qt,[2,266]),e(qt,[2,32]),e(qt,[2,33]),{48:[2,11]},{48:[2,228]},{48:[2,12]},{48:[2,230]},e(N,Ze,{163:281,161:566,162:567,46:Zt,48:Zt,90:Zt,119:Zt,167:Zt,168:Zt,170:Zt,173:Zt,174:Zt}),e(Gt,[2,336]),e(Wt,[2,76],{329:[1,568]}),e(Wt,[2,77]),e(Wt,[2,78]),{46:Y,62:569},{46:[2,345]},{46:[2,346]},{13:l,16:c,34:[1,571],60:572,172:570,312:d},e(zt,[2,348]),e(Wt,[2,81]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:573,39:574,219:P,231:D,273:C,334:B}),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:575,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,110],{330:[1,576]}),e(Yt,[2,396],{214:577,218:578,224:[1,579]}),e(Xt,[2,127]),e(xt,[2,405]),e(Xt,[2,128]),e(Ut,[2,27]),{34:[1,580]},e(Tt,[2,98]),e(Tt,[2,370]),e(N,[2,372]),{13:l,16:c,34:ee,39:582,60:178,87:re,93:ne,98:179,231:D,234:581,243:583,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{38:[1,584],278:[1,585]},{38:[1,586]},{278:[1,587]},e(ht,[2,91]),e(it,[2,356]),e(ht,[2,177]),e(ht,[2,178]),{38:[1,588]},{38:[2,472]},{294:[1,589]},{13:l,16:c,60:178,87:re,93:ne,98:179,99:591,231:pt,239:590,244:592,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{235:[1,593]},{235:[2,428]},{235:[2,429]},{13:l,16:c,38:[1,594],60:350,87:re,97:595,98:351,99:352,100:dt,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Kt,[2,275]),{48:[1,596]},{48:[2,322]},e(gt,[2,38]),e(gt,[2,39]),e(mt,[2,74]),e(mt,[2,338]),{46:[2,344]},e(Wt,[2,79]),{46:Y,62:597},{46:[2,349]},{46:[2,350]},{37:[1,598]},{37:[1,599]},e(Jt,[2,383],{207:600,278:[1,601]}),e(Pt,[2,388]),e([13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330],[2,111],{331:[1,602]}),{13:l,16:c,35:[1,608],60:605,195:[1,606],215:603,216:604,219:[1,607],312:d},e(Yt,[2,397]),{38:[1,609]},{48:[1,610]},{48:[2,414]},{48:[2,415]},e(ht,[2,89]),e(it,[2,354]),e(ht,[2,170]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:611,219:P,273:C,334:B}),e(ht,[2,179]),{295:[1,612]},{13:l,16:c,34:Xe,60:294,193:613,195:Ke,312:d},e(et,[2,422]),e(et,[2,423]),e(er,[2,136]),e(jt,[2,48]),e(Kt,[2,276]),e(tr,[2,323],{149:614,328:[1,615]}),e(Wt,[2,80]),{34:[1,616]},{34:[1,617]},e([46,48,90,119,167,168,170,173,174,227,328],[2,107],{208:618,191:[1,619]}),e(N,[2,382]),e(Pt,[2,390]),e(rr,[2,113]),e(rr,[2,394],{217:620,332:621,26:[1,623],333:[1,622],334:[1,624]}),e(nr,[2,114]),e(nr,[2,115]),{13:l,16:c,35:[1,628],60:629,93:[1,627],195:ir,220:625,221:626,224:sr,312:d},e(Pt,Dt,{211:470,210:632}),e(Ut,[2,28]),{235:[1,633]},{38:[1,634]},{296:635,302:le,303:ce,304:fe,305:de},{13:l,16:c,60:178,87:re,93:ne,98:179,99:637,231:pt,240:636,244:638,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(N,z,{152:146,150:639,151:640,48:ar,119:ar}),e(tr,[2,324]),{38:[1,641]},{38:[1,642]},e(Jt,[2,384]),e(Jt,[2,108],{211:470,209:643,210:644,13:Dt,16:Dt,35:Dt,195:Dt,219:Dt,224:Dt,312:Dt,34:[1,645]}),e(rr,[2,112]),e(rr,[2,395]),e(rr,[2,391]),e(rr,[2,392]),e(rr,[2,393]),e(nr,[2,116]),e(nr,[2,118]),e(nr,[2,119]),e(or,[2,398],{222:646}),e(nr,[2,121]),e(nr,[2,122]),{13:l,16:c,60:647,195:[1,648],312:d},{38:[1,649]},e(Vt,[2,133]),e(ht,[2,171]),{38:[2,180]},{48:[1,650]},{48:[2,424]},{48:[2,425]},e(He,[2,69]),e(He,[2,326]),e(Wt,[2,82]),e(Wt,[2,83]),e(N,[2,373],{198:651,199:652}),e(N,[2,385]),e(N,[2,386]),{13:l,16:c,38:[2,400],60:629,195:ir,221:654,223:653,224:sr,312:d},e(nr,[2,123]),e(nr,[2,124]),e(nr,[2,117]),{235:[1,655]},e(Jt,[2,109]),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:656,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{38:[1,657]},{38:[2,401],330:[1,658]},e(er,[2,135]),e(Jt,[2,104],{278:[1,659]}),e(nr,[2,120]),e(or,[2,399]),e(N,[2,374])],defaultActions:{5:[2,205],6:[2,206],8:[2,204],26:[2,1],27:[2,3],28:[2,216],77:[2,49],86:[2,295],100:[2,252],107:[2,358],220:[2,441],248:[2,462],287:[2,236],288:[2,93],314:[2,410],315:[2,411],407:[2,418],408:[2,419],438:[2,319],439:[2,320],500:[2,465],501:[2,466],505:[2,420],506:[2,421],518:[2,11],519:[2,228],520:[2,12],521:[2,230],528:[2,345],529:[2,346],554:[2,472],558:[2,428],559:[2,429],563:[2,322],568:[2,344],571:[2,349],572:[2,350],582:[2,414],583:[2,415],635:[2,180],637:[2,424],638:[2,425]},parseError:function(e,t){if(!t.recoverable){var r=new Error(e);throw r.hash=t,r}this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],i=[],s=this.table,a="",o=0,u=0,h=0,l=2,c=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(p.yy[b]=this.yy[b]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;i.push(g);var y=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,m,w,v,E,S,T,x,k,R=function(){var e;return"number"!=typeof(e=d.lex()||c)&&(e=t.symbols_[e]||e),e},N={};;){if(w=r[r.length-1],this.defaultActions[w]?v=this.defaultActions[w]:(null==_&&(_=R()),v=s[w]&&s[w][_]),void 0===v||!v.length||!v[0]){var j="";for(S in k=[],s[w])this.terminals_[S]&&S>l&&k.push("'"+this.terminals_[S]+"'");j=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(_==c?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(j,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:g,expected:k})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(v[0]){case 1:r.push(_),n.push(d.yytext),i.push(d.yylloc),r.push(v[1]),_=null,m?(_=m,m=null):(u=d.yyleng,a=d.yytext,o=d.yylineno,g=d.yylloc,h>0&&h--);break;case 2:if(T=this.productions_[v[1]][1],N.$=n[n.length-T],N._$={first_line:i[i.length-(T||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(T||1)].first_column,last_column:i[i.length-1].last_column},y&&(N._$.range=[i[i.length-(T||1)].range[0],i[i.length-1].range[1]]),void 0!==(E=this.performAction.apply(N,[a,u,o,p.yy,v[1],n,i].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),n=n.slice(0,-1*T),i=i.slice(0,-1*T)),r.push(this.productions_[v[1]][0]),n.push(N.$),i.push(N._$),x=s[r[r.length-2]][r[r.length-1]],r.push(x);break;case 3:return!0}}return!0}},hr=r(1348).R,lr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=lr+"type",fr=lr+"first",dr=lr+"rest",pr=lr+"nil",br="http://www.w3.org/2001/XMLSchema#",gr=br+"integer",yr=br+"decimal",_r=br+"double",mr=br+"boolean",wr="",vr="",Er="";function Sr(e){return e.toLowerCase()}function Tr(e,t){return e.push(t),e}function xr(e,t){return e.push.apply(e,t),e}function kr(e){e||(e={});for(var t,r=1,n=arguments.length;r<n&&(t=arguments[r]||{});r++)for(var i in t)e[i]=t[i];return e}function Rr(){for(var e=[],t=0,r=arguments.length;t<r;t++)e=e.concat.apply(e,arguments[t]);return e}function Nr(e){if("<"===e[0]&&(e=e.substring(1,e.length-1)),/^[a-z]+:/i.test(e))return e;if(!nn.base)throw new Error("Cannot resolve relative IRI "+e+" because no base IRI was set.");switch(wr!==nn.base&&(wr=nn.base,vr=wr.replace(/[^\/:]*$/,""),Er=wr.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),e[0]){case void 0:return wr;case"#":return wr+e;case"?":return wr.replace(/(?:\?.*)?$/,e);case"/":return Er+e;default:return vr+e}}function jr(e){if(e){var t=e[0];if("?"===t||"$"===t)return nn.factory.variable(e.substr(1))}return e}function Ar(e,t){return{type:"operation",operator:e,args:t||[]}}function Fr(e,t){var r={expression:"*"===e?new hr:e};if(t)for(var n in t)r[n]=t[n];return r}function Or(e,t){return{type:"path",pathType:e,items:t}}function Lr(e,t){for(var r,n=0,i=t.length;n<i&&(r=t[n]);n++)e=Ar(r[0],[e,r[1]]);return e}function Ir(e,t){var r,n=[],i=[],s=e.length,a={};if(!s)return null;for(var o=0;o<s&&(r=e[o]);o++)(r.named?i:n).push(r.iri);return a[t||"from"]={default:n,named:i},a}function Pr(e){return parseInt(e,10)}function Dr(e){return"group"===e.type&&1===e.patterns.length?e.patterns[0]:e}function Cr(e,t){return t&&"NamedNode"!==t.termType&&(t=nn.factory.namedNode(t)),nn.factory.literal(e,t)}function Br(e,t,r){var n={};return null!=e&&(n.subject=e),null!=t&&(n.predicate=t),null!=r&&(n.object=r),n}function Mr(e){return"string"==typeof e?e.startsWith("e_")?nn.factory.blankNode(e):nn.factory.blankNode("e_"+e):nn.factory.blankNode("g_"+Ur++)}var Ur=0;nn._resetBlanks=function(){Ur=0};var $r=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,qr={"\\":"\\","'":"'",'"':'"',t:"\t",b:"\b",n:"\n",r:"\r",f:"\f"},Gr=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,zr=String.fromCharCode;function Wr(e,t){e=e.substring(t,e.length-t);try{e=e.replace($r,(function(e,t,r,n){var i;if(t){if(i=parseInt(t,16),isNaN(i))throw new Error;return zr(i)}if(r){if(i=parseInt(r,16),isNaN(i))throw new Error;return i<65535?zr(i):zr(55296+((i-=65536)>>10),56320+(1023&i))}var s=qr[n];if(!s)throw new Error;return s}))}catch(e){return""}if(Gr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function Qr(e,t,r){var n=[],i=[];return t.forEach((function(t){n.push(Br(null,e,t.entity)),xr(i,t.triples)})),Rr(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Vr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Vr(r));return t}return[]}function Zr(e){const t=new Set,r=function(e){e&&("Variable"===e.termType?t.add(e):"operation"===e.type&&e.args.forEach(r))};return r(e),t}function Yr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Yr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Kr(e){if(e.triples){const t=[];for(const r of e.triples)Xr(r.subject)&&t.push(r.subject.value),Xr(r.predicate)&&t.push(r.predicate.value),Xr(r.object)&&t.push(r.object.value);return t}if(e.patterns){const t=[];for(const r of e.patterns)t.push(...Kr(r));return t}return[]}function Jr(e){if(!nn.sparqlStar)throw new Error("SPARQL* support is not enabled");return e}function en(e){for(const t of e){if("graph"===t.type&&"Variable"===t.name.termType)throw new Error("Detected illegal variable in GRAPH");if("bgp"===t.type||"graph"===t.type)for(const e of t.triples)if("Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType)throw new Error("Detected illegal variable in BGP")}return e}function tn(e){for(const t of e)if("bgp"===t.type)for(const e of t.triples)if("BlankNode"===e.subject.termType||"BlankNode"===e.predicate.termType||"BlankNode"===e.object.termType)throw new Error("Detected illegal blank node in BGP");return e}var rn={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 15;case 3:return 28;case 4:return 316;case 5:return 317;case 6:return 35;case 7:return 37;case 8:return 38;case 9:return 26;case 10:return 41;case 11:return 45;case 12:return 46;case 13:return 48;case 14:return 50;case 15:return 55;case 16:return 58;case 17:return 320;case 18:return 68;case 19:return 69;case 20:return 75;case 21:return 78;case 22:return 81;case 23:return 83;case 24:return 86;case 25:return 88;case 26:return 90;case 27:return 191;case 28:return 107;case 29:return 321;case 30:return 140;case 31:return 322;case 32:return 323;case 33:return 117;case 34:return 324;case 35:return 116;case 36:return 325;case 37:return 326;case 38:return 120;case 39:return 122;case 40:return 123;case 41:return 138;case 42:return 132;case 43:return 133;case 44:return 135;case 45:return 141;case 46:return 119;case 47:return 327;case 48:return 328;case 49:return 167;case 50:return 170;case 51:return 174;case 52:return 100;case 53:return 168;case 54:return 329;case 55:return 173;case 56:return 231;case 57:return 235;case 58:return 278;case 59:return 195;case 60:return 330;case 61:return 331;case 62:return 224;case 63:return 333;case 64:return 334;case 65:return 219;case 66:return 226;case 67:return 227;case 68:return 250;case 69:return 254;case 70:return 295;case 71:return 335;case 72:return 336;case 73:return 337;case 74:return 338;case 75:return 339;case 76:return 258;case 77:return 340;case 78:return 273;case 79:return 281;case 80:return 282;case 81:return 275;case 82:return 276;case 83:return 277;case 84:return 341;case 85:return 342;case 86:return 279;case 87:return 344;case 88:return 343;case 89:return 345;case 90:return 284;case 91:return 285;case 92:return 288;case 93:return 290;case 94:return 294;case 95:return 298;case 96:return 301;case 97:return 13;case 98:return 16;case 99:return 312;case 100:return 245;case 101:return 34;case 102:return 297;case 103:return 87;case 104:return 299;case 105:return 300;case 106:return 306;case 107:return 307;case 108:return 308;case 109:return 309;case 110:return 310;case 111:return 311;case 112:return"EXPONENT";case 113:return 302;case 114:return 303;case 115:return 304;case 116:return 305;case 117:return 93;case 118:return 246;case 119:return 6;case 120:return"INVALID";case 121:console.log(t.yytext)}},rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i,/^(?:FROM)/i,/^(?:NAMED)/i,/^(?:GROUP)/i,/^(?:BY)/i,/^(?:HAVING)/i,/^(?:ORDER)/i,/^(?:ASC)/i,/^(?:DESC)/i,/^(?:LIMIT)/i,/^(?:OFFSET)/i,/^(?:VALUES)/i,/^(?:;)/i,/^(?:LOAD)/i,/^(?:SILENT)/i,/^(?:INTO)/i,/^(?:CLEAR)/i,/^(?:DROP)/i,/^(?:CREATE)/i,/^(?:ADD)/i,/^(?:TO)/i,/^(?:MOVE)/i,/^(?:COPY)/i,/^(?:INSERT((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)WHERE)/i,/^(?:WITH)/i,/^(?:DELETE)/i,/^(?:INSERT)/i,/^(?:USING)/i,/^(?:DEFAULT)/i,/^(?:GRAPH)/i,/^(?:ALL)/i,/^(?:\.)/i,/^(?:OPTIONAL)/i,/^(?:SERVICE)/i,/^(?:BIND)/i,/^(?:UNDEF)/i,/^(?:MINUS)/i,/^(?:UNION)/i,/^(?:FILTER)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:,)/i,/^(?:a)/i,/^(?:\|)/i,/^(?:\/)/i,/^(?:\^)/i,/^(?:\?)/i,/^(?:\+)/i,/^(?:!)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\|\|)/i,/^(?:&&)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:<)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:>=)/i,/^(?:IN)/i,/^(?:NOT)/i,/^(?:-)/i,/^(?:BOUND)/i,/^(?:BNODE)/i,/^(?:(RAND|NOW|UUID|STRUUID))/i,/^(?:(LANG|DATATYPE|IRI|URI|ABS|CEIL|FLOOR|ROUND|STRLEN|STR|UCASE|LCASE|ENCODE_FOR_URI|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],inclusive:!0}}};function nn(){this.yy={}}return ur.lexer=rn,nn.prototype=ur,ur.Parser=nn,new nn}();t.parser=n,t.Parser=n.Parser,t.parse=function(){return n.parse.apply(n,arguments)},t.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),process.exit(1));var n=r(9270).readFileSync(r(8080).normalize(e[1]),"utf8");return t.parser.parse(n)},r.c[r.s]===e&&t.main(process.argv.slice(1))},1348:e=>{class Wildcard{constructor(){return t||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(Wildcard.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(Wildcard.prototype,"termType",{enumerable:!0,value:"Wildcard"});var t=new Wildcard;e.exports.R=Wildcard},9619:(e,t,r)=>{var n=r(7107).Parser,i=r(4404),s=r(1348).R,{DataFactory:a}=r(1640);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:s,skipUngroupedVariableCheck:o}={}){var u={};for(var h in e||{})u[h]=e[h];var l=new n;return l.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new a,n.sparqlStar=Boolean(i),n.skipValidation=Boolean(s)||Boolean(o),n.prototype.parse.apply(l,arguments)},l._resetBlanks=n._resetBlanks,l},Generator:i,Wildcard:s}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},9650:e=>{var t=Object.prototype.toString;e.exports=function(e){switch(t.call(e)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array"}return null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}},1666:(e,t)=>{var r,n,i,s=void 0,a=(r=Object.prototype.toString,n=Object.prototype.hasOwnProperty,{Class:function(e){return r.call(e).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return n.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}),o=Math.LN2,u=Math.abs,h=Math.floor,l=Math.log,c=Math.min,f=Math.pow,d=Math.round;function p(e){if(b&&i){var t,r=b(e);for(t=0;t<r.length;t+=1)i(e,r[t],{value:e[r[t]],writable:!1,enumerable:!1,configurable:!1})}}i=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return a.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),a.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),a.HasProperty(r,"value")&&(e[t]=r.value),e};var b=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t,r=[];for(t in e)a.HasOwnProperty(e,t)&&r.push(t);return r};function g(e){if(i){if(e.length>1e5)throw new RangeError("Array too large for polyfill");var t;for(t=0;t<e.length;t+=1)r(t)}function r(t){i(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:!0,configurable:!1})}}function y(e,t){var r=32-t;return e<<r>>r}function _(e,t){var r=32-t;return e<<r>>>r}function m(e){return[255&e]}function w(e){return y(e[0],8)}function v(e){return[255&e]}function E(e){return _(e[0],8)}function S(e){return[(e=d(Number(e)))<0?0:e>255?255:255&e]}function T(e){return[e>>8&255,255&e]}function x(e){return y(e[0]<<8|e[1],16)}function k(e){return[e>>8&255,255&e]}function R(e){return _(e[0]<<8|e[1],16)}function N(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function j(e){return y(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function A(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function F(e){return _(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function O(e,t,r){var n,i,s,a,d,p,b,g=(1<<t-1)-1;function y(e){var t=h(e),r=e-t;return r<.5?t:r>.5||t%2?t+1:t}for(e!=e?(i=(1<<t)-1,s=f(2,r-1),n=0):e===1/0||e===-1/0?(i=(1<<t)-1,s=0,n=e<0?1:0):0===e?(i=0,s=0,n=1/e==-1/0?1:0):(n=e<0,(e=u(e))>=f(2,1-g)?(i=c(h(l(e)/o),1023),(s=y(e/f(2,i)*f(2,r)))/f(2,r)>=2&&(i+=1,s=1),i>g?(i=(1<<t)-1,s=0):(i+=g,s-=f(2,r))):(i=0,s=y(e/f(2,1-g-r)))),d=[],a=r;a;a-=1)d.push(s%2?1:0),s=h(s/2);for(a=t;a;a-=1)d.push(i%2?1:0),i=h(i/2);for(d.push(n?1:0),d.reverse(),p=d.join(""),b=[];p.length;)b.push(parseInt(p.substring(0,8),2)),p=p.substring(8);return b}function L(e,t,r){var n,i,s,a,o,u,h,l,c=[];for(n=e.length;n;n-=1)for(s=e[n-1],i=8;i;i-=1)c.push(s%2?1:0),s>>=1;return c.reverse(),a=c.join(""),o=(1<<t-1)-1,u=parseInt(a.substring(0,1),2)?-1:1,h=parseInt(a.substring(1,1+t),2),l=parseInt(a.substring(1+t),2),h===(1<<t)-1?0!==l?NaN:u*(1/0):h>0?u*f(2,h-o)*(1+l/f(2,r)):0!==l?u*f(2,-(o-1))*(l/f(2,r)):u<0?-0:0}function I(e){return L(e,11,52)}function P(e){return O(e,11,52)}function D(e){return L(e,8,23)}function C(e){return O(e,8,23)}!function(){var e=function(e){if((e=a.ToInt32(e))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var t;for(this.byteLength=e,this._bytes=[],this._bytes.length=e,t=0;t<this.byteLength;t+=1)this._bytes[t]=0;p(this)};t.eT=t.eT||e;var r=function(){};function n(t,n,i){var o;return o=function(t,r,n){var i,s,u,h;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===o)for(i=arguments[0],this.length=i.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)this._setter(u,i._getter(u));else if("object"!=typeof arguments[0]||(arguments[0]instanceof e||"ArrayBuffer"===a.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof e||"ArrayBuffer"===a.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=t,this.byteOffset=a.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=a.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(s=arguments[0],this.length=a.ToUint32(s.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)h=s[u],this._setter(u,Number(h));else{if(this.length=a.ToInt32(arguments[0]),n<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}this.constructor=o,p(this),g(this)},o.prototype=new r,o.prototype.BYTES_PER_ELEMENT=t,o.prototype._pack=n,o.prototype._unpack=i,o.BYTES_PER_ELEMENT=t,o.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if((e=a.ToUint32(e))>=this.length)return s;var t,r,n=[];for(t=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;t<this.BYTES_PER_ELEMENT;t+=1,r+=1)n.push(this.buffer._bytes[r]);return this._unpack(n)},o.prototype.get=o.prototype._getter,o.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if((e=a.ToUint32(e))>=this.length)return s;var r,n,i=this._pack(t);for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,n+=1)this.buffer._bytes[n]=i[r]},o.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var r,n,i,s,o,u,h,l,c,f;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(r=arguments[0],(i=a.ToUint32(arguments[1]))+r.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(l=this.byteOffset+i*this.BYTES_PER_ELEMENT,c=r.length*this.BYTES_PER_ELEMENT,r.buffer===this.buffer){for(f=[],o=0,u=r.byteOffset;o<c;o+=1,u+=1)f[o]=r.buffer._bytes[u];for(o=0,h=l;o<c;o+=1,h+=1)this.buffer._bytes[h]=f[o]}else for(o=0,u=r.byteOffset,h=l;o<c;o+=1,u+=1,h+=1)this.buffer._bytes[h]=r.buffer._bytes[u]}else{if("object"!=typeof arguments[0]||void 0===arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(n=arguments[0],s=a.ToUint32(n.length),(i=a.ToUint32(arguments[1]))+s>this.length)throw new RangeError("Offset plus length of array is out of range");for(o=0;o<s;o+=1)u=n[o],this._setter(i+o,Number(u))}},o.prototype.subarray=function(e,t){function r(e,t,r){return e<t?t:e>r?r:e}e=a.ToInt32(e),t=a.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=r(e,0,this.length);var n=(t=r(t,0,this.length))-e;return n<0&&(n=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,n)},o}var i=n(1,m,w),o=n(1,v,E),u=n(1,S,E),h=n(2,T,x),l=n(2,k,R),c=n(4,N,j),f=n(4,A,F),d=n(4,C,D),b=n(8,P,I);t.iq=t.iq||i,t.U2=t.U2||o,t.we=t.we||u,t.M2=t.M2||h,t.HA=t.HA||l,t.ZV=t.ZV||c,t._R=t._R||f,t.$L=t.$L||d,t.I=t.I||b}(),function(){function e(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var r,n=(r=new t.HA([4660]),18===e(new t.U2(r.buffer),0)),i=function(e,r,n){if(0===arguments.length)e=new t.eT(0);else if(!(e instanceof t.eT||"ArrayBuffer"===a.Class(e)))throw new TypeError("TypeError");if(this.buffer=e||new t.eT(0),this.byteOffset=a.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteLength=arguments.length<3?this.buffer.byteLength-this.byteOffset:a.ToUint32(n),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");p(this)};function s(r){return function(i,s){if((i=a.ToUint32(i))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");i+=this.byteOffset;var o,u=new t.U2(this.buffer,i,r.BYTES_PER_ELEMENT),h=[];for(o=0;o<r.BYTES_PER_ELEMENT;o+=1)h.push(e(u,o));return Boolean(s)===Boolean(n)&&h.reverse(),e(new r(new t.U2(h).buffer),0)}}function o(r){return function(i,s,o){if((i=a.ToUint32(i))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var u,h=new r([s]),l=new t.U2(h.buffer),c=[];for(u=0;u<r.BYTES_PER_ELEMENT;u+=1)c.push(e(l,u));Boolean(o)===Boolean(n)&&c.reverse(),new t.U2(this.buffer,i,r.BYTES_PER_ELEMENT).set(c)}}i.prototype.getUint8=s(t.U2),i.prototype.getInt8=s(t.iq),i.prototype.getUint16=s(t.HA),i.prototype.getInt16=s(t.M2),i.prototype.getUint32=s(t._R),i.prototype.getInt32=s(t.ZV),i.prototype.getFloat32=s(t.$L),i.prototype.getFloat64=s(t.I),i.prototype.setUint8=o(t.U2),i.prototype.setInt8=o(t.iq),i.prototype.setUint16=o(t.HA),i.prototype.setInt16=o(t.M2),i.prototype.setUint32=o(t._R),i.prototype.setInt32=o(t.ZV),i.prototype.setFloat32=o(t.$L),i.prototype.setFloat64=o(t.I),t.VO=t.VO||i}()},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},0:t=>{"use strict";t.exports=e},3081:()=>{},8906:()=>{},6965:()=>{},147:()=>{},2361:()=>{},4616:()=>{},6028:()=>{},7298:()=>{},9270:()=>{},8080:()=>{}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.c=r,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(n.s=8635)})()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],t):"object"==typeof exports?exports.OpenHPS=t(require("@openhps/core")):(e.OpenHPS=e.OpenHPS||{},e.OpenHPS.rdf=t(e.OpenHPS.core))}("undefined"!=typeof self?self:this,(function(e){return(()=>{var t={8635:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SPARQLDataDriver:()=>SPARQLDataDriver,SPARQLDriverBase:()=>SPARQLDriverBase,SPARQLGenerator:()=>SPARQLGenerator});var n={};r.r(n),r.d(n,{Alt:()=>N,Bag:()=>R,CompoundLiteral:()=>F,HTML:()=>O,JSON__workaround:()=>D,List:()=>A,PlainLiteral:()=>I,Property:()=>x,Seq:()=>j,Statement:()=>k,XMLLiteral:()=>P,direction:()=>T,first:()=>v,langString:()=>L,language:()=>S,nil:()=>C,object:()=>m,predicate:()=>_,rest:()=>E,subject:()=>y,type:()=>g,value:()=>w});var i=r(3700),s=r(7562),a=r.n(s),o=r(0),u=r(8391);const h="http://www.w3.org/2001/XMLSchema#boolean",l="http://www.w3.org/2001/XMLSchema#dateTime",c="http://www.w3.org/2001/XMLSchema#date",f="http://www.w3.org/2001/XMLSchema#decimal",d="http://www.w3.org/2001/XMLSchema#string";function p(e,t){const r=Object.assign({},e);return b(e)&&b(t)&&Object.keys(t).forEach((n=>{Array.isArray(t[n])?(r[n]=t[n],r[n].push(...e[n]||[])):b(t[n])?n in e?r[n]=p(e[n],t[n]):Object.assign(r,{[n]:t[n]}):Object.assign(r,{[n]:t[n]})})),r}function b(e){return e&&"object"==typeof e&&!Array.isArray(e)}class InternalRDFSerializer extends o.Serializer{constructor(){super(...arguments),this.serializationStrategy=new Map([[Number,this.serializeLiteral.bind(this)],[String,this.serializeLiteral.bind(this)],[Boolean,this.serializeLiteral.bind(this)],[Date,this.serializeDate.bind(this)],[Array,this.serializeArray.bind(this)],[Map,this.serializeMap.bind(this)],[Set,this.serializeSet.bind(this)]])}convertSingleValue(e,t,r,n,i){if(this.retrievePreserveNull(n)&&null===e)return null;if(null==e)return;if(n&&n.options&&n.options.rdf&&n.options.rdf.serializer)return n.options.rdf.serializer(e);const s=this.serializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,this,n,i);if("object"==typeof e)return this.serializeObject(e,t,r,this,n,i);let a=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}serializeObject(e,t,r,n,i,s){let a;const h=o.DataSerializer.getRootMetadata(e.constructor);a=e.constructor!==t.ctor&&e instanceof t.ctor?o.DataSerializer.getMetadata(e.constructor):o.DataSerializer.getMetadata(t.ctor);const l=a.options&&a.options.rdf?a.options.rdf:h.options&&h.options.rdf?h.options.rdf:void 0;if(!l)return;const c=Array.from(a.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];let f;if(c){const t=c.options.rdf;f=t.serializer?t.serializer(e[c.key],e.constructor):e[c.key]}f=f&&!f.startsWith("http")&&s.rdf.baseUri?s.rdf.baseUri+f:u.ZP.blankNode(f).value;let d={value:f,predicates:l.predicates?Object.entries(l.predicates).map((([e,t])=>({[e]:t.map(u.ZP.namedNode)}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))):{}};return l.serializer&&(d=p(d,l.serializer(e,s.rdf.baseUri))),d.termType=d.value.startsWith("http")?"NamedNode":"BlankNode",a.dataMembers.forEach((t=>{const r=h.dataMembers.get(t.key),i=t.options&&t.options.rdf?t:r&&r.options&&r.options.rdf?r:void 0;if(!i||!i.options.rdf.predicate)return;const a=n.convertSingleValue(e[i.key],i.type(),`${i.name}`,i,s);if(a){const e=i.options.rdf.predicate;[...Array.isArray(e)?e:[e]].forEach((e=>{const t=d.predicates[e]||[];t.push(...(Array.isArray(a)?a:[a]).filter((e=>e))),d.predicates[e]=t}))}})),d}serializeArray(e,t,r,n,i,s){return e.map((e=>this.convertSingleValue(e,t.elementType,r,i,s)))}serializeMap(e,t,r,n,i,s){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,s)))}serializeSet(e,t,r,n,i,s){return Array.from(e.values()).map((e=>this.convertSingleValue(e,t.valueType,r,i,s)))}serializeLiteral(e,t,r,n,i){var s;let a;const o=i.options.rdf;if(o&&o.datatype)switch(a=o.datatype,o.datatype){case c:case l:return this.serializeDate(e,t,r,n,i)}else switch(typeof e){case"bigint":case"number":a=f;break;case"boolean":a=h;break;default:a=d}const p=this.iriToNode(a);return u.ZP.literal(e,o&&null!==(s=o.language)&&void 0!==s?s:p)}serializeDate(e,t,r,n,i){var s;const a=i.options.rdf,o=l,h=new Date(e).toISOString(),c=this.iriToNode(o);return u.ZP.literal(h,a&&null!==(s=a.language)&&void 0!==s?s:c)}iriToNode(e){return u.ZP.namedNode(e)}}const g="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",y="http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",_="http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",m="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",w="http://www.w3.org/1999/02/22-rdf-syntax-ns#value",v="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",E="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",S="http://www.w3.org/1999/02/22-rdf-syntax-ns#language",T="http://www.w3.org/1999/02/22-rdf-syntax-ns#direction",x="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",k="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",R="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",j="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq",N="http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt",A="http://www.w3.org/1999/02/22-rdf-syntax-ns#List",F="http://www.w3.org/1999/02/22-rdf-syntax-ns#CompoundLiteral",O="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",L="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",I="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",P="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",D="http://www.w3.org/1999/02/22-rdf-syntax-ns#JSON",C="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",B=n;class InternalRDFDeserializer extends o.Deserializer{constructor(){super(...arguments),this.deserializationStrategy=new Map([[Number,this.deserializeLiteral.bind(this)],[String,this.deserializeLiteral.bind(this)],[Boolean,this.deserializeLiteral.bind(this)],[Date,this.deserializeLiteral.bind(this)],[Array,this.deserializeArray.bind(this)],[Map,this.deserializeMap.bind(this)],[Set,this.deserializeSet.bind(this)]])}rdfTypeResolver(e,t,r){if(void 0!==e.predicates){const n=Object.entries(e.predicates).filter((([e,t])=>e===B.type)).map((([e,t])=>t)).flat().map((e=>e.value)).map((e=>r.get(e))).flat().map((e=>t.get(e)));return n[0]}return Object}convertSingleValue(e,t,r,n="object",i,s){if(this.retrievePreserveNull(i)&&null===e)return null;if(null==e)return;const a=this.deserializationStrategy.get(t.ctor);if(void 0!==a)return a(e,t,r,n,this,i,s);if("object"==typeof e)return this.deserializeObject(e,t,r,n,this,s);let o=`Could not deserialize '${n}'; don't know how to deserialize type`;t.hasFriendlyName()&&(o+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${o}.`))}deserializeObject(e,t,r,n,i,s){const a=t.ctor,u=this.rdfTypeResolver(e,r,s.rdf.knownTypes)||a,h=o.DataSerializer.getMetadata(u),l=o.DataSerializer.getRootMetadata(u);if(!h&&!l)return;const c=h.options&&h.options.rdf?h.options.rdf:l.options&&l.options.rdf?l.options.rdf:void 0;if(!c)return;const f=c.deserializer?c.deserializer(e):this.instantiateType(u),d=Array.from(h.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0];if(d){const t=d.options.rdf;f[d.key]=t.deserializer?t.deserializer(e,u):e.value}return h.dataMembers.forEach((t=>{const n=l.dataMembers.get(t.key),a=t.options&&t.options.rdf?t:n&&n.options&&n.options.rdf?n:void 0;if(!a||!a.options.rdf.predicate)return;const o=a.options.rdf.predicate;[...Array.isArray(o)?o:[o]].forEach((t=>{e.predicates[t]&&(a.type().ctor===Array?f[a.key]=i.convertSingleValue(e.predicates[t],a.type(),r,a.name,a,s):f[a.key]=e.predicates[t].map((e=>i.convertSingleValue(e,a.type(),r,a.name,a,s))).filter((e=>this.isInstanceOf(e,a.type().ctor)))[0])}))})),f}deserializeLiteral(e,t,r,n,i,s,a){return e.datatype.value===l?new Date(e.value).getTime():e.value}deserializeDate(e,t,r,n,i,s,a){return new Date(e.value)}deserializeArray(e,t,r,n,i,s,a){return e?e.map((e=>i.convertSingleValue(e,t.elementType,r,n,s,a))).filter((e=>this.isInstanceOf(e,t.elementType.ctor))):[]}isInstanceOf(e,t){return"number"==typeof e?t===Number:"string"==typeof e?t===String:"boolean"==typeof e?t===Boolean:"object"==typeof e&&e instanceof t}deserializeMap(e,t,r,n,i,s,a){}deserializeSet(e,t,r,n,i,s,a){}}var M=r(5403);const U={geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",schema:"http://schema.org/",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",vcard:"http://www.w3.org/2006/vcard/ns#",owl:"http://www.w3.org/2002/07/owl#",time:"http://www.w3.org/2006/time#",dcterms:"http://purl.org/dc/terms/",dcmi:"http://purl.org/dc/terms/",dqm:"http://purl.org/dqm-vocabulary/v1/dqm#",foaf:"http://xmlns.com/foaf/0.1/",qudt:"http://qudt.org/schema/qudt/",qudt_unit:"http://qudt.org/vocab/unit/",quantitykind:"http://qudt.org/vocab/quantitykind/",sosa:"http://www.w3.org/ns/sosa/",ssn:"http://www.w3.org/ns/ssn/",ssns:"http://www.w3.org/ns/ssn/systems/",openhps:"http://openhps.org/terms#",ogc:"http://www.opengis.net/ont/geosparql#"};var $,q=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,o)}u((n=n.apply(e,t||[])).next())}))};class RDFSerializer extends o.DataSerializer{static get options(){return{serializer:new InternalRDFSerializer,deserializer:new InternalRDFDeserializer}}static registerRDFType(e){const t=this.getMetadata(e);if(!t.options||!t.options.rdf)return;const r=t.options.rdf;r.predicates&&Object.entries(r.predicates).filter((([e,t])=>e===B.type)).map((([e,t])=>t.flat())).flat().forEach((t=>{var r;const n=null!==(r=this.knownRDFTypes.get(t))&&void 0!==r?r:[];n.push(e.name),this.knownRDFTypes.set(t,n)}))}static serialize(e,t){return super.serialize(e,Object.assign({rdf:{baseUri:t}},this.options))}static deserializeFromStore(e,t){const r=function e(t,r){return{termType:t.termType,value:t.value,predicates:Object.assign({},r.getPredicates(t,null,null).map((n=>({[n.value]:r.getObjects(t,n,null).map((t=>"BlankNode"===t.constructor.name||"NamedNode"===t.constructor.name?e(t,r):t))}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))}}(e,t);return this.deserialize(r)}static serializeToSubjects(e,t){const r=RDFSerializer.serializeToQuads(e,t),n=new i.Z(r);function s(e){return n.getPredicates(e,null,null).map((t=>{const r=n.getObjects(e,t,null),i=r.filter((e=>e instanceof u.t$)).filter((e=>""===e.language)).map((e=>({[e.datatype.value]:[e.value]}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}),a=r.filter((e=>e instanceof u.t$)).filter((e=>""!==e.language)).map((e=>({[e.language]:[e.value]}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}),o=r.filter((e=>e instanceof u.jJ)).map((e=>e.value)),h=r.filter((e=>e instanceof u.DP)).map((e=>s(u.ZP.blankNode(e.value))));return{[t.value]:{namedNodes:o,blankNodes:h,literals:i,langStrings:a}}})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}return n.getSubjects(null,null,null).filter((e=>e instanceof u.jJ)).map((e=>({type:"Subject",url:e.value,predicates:s(e)})))}static serializeToQuads(e,t){const r=void 0!==e.predicates?e:this.serialize(e,t),n="BlankNode"===r.termType?u.ZP.blankNode(r.value):u.ZP.namedNode(r.value);return Object.keys(r.predicates).map((e=>{const t=u.ZP.namedNode(e);return r.predicates[e].map((e=>void 0!==e.predicates?[u.ZP.quad(n,t,e),...this.serializeToQuads(e)]:[u.ZP.quad(n,t,e)]))})).flat().flat()}static stringify(e,t={}){return q(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const s=this.serializeToQuads(e,t.baseUri),a=new i.Z(s),o=Object.assign({xsd:"http://www.w3.org/2001/XMLSchema#"},U),u=Object.keys(o).map((e=>({[o[e]]:e}))).reduce(((e,t)=>Object.assign(Object.assign({},e),t))),h={};s.map((e=>{[e.subject.value,e.predicate.value,"NamedNode"===e.object.termType?e.object.termType:"Literal"===e.object.termType?e.object.datatype.value:e.object.value].map((e=>{Object.keys(u).forEach((t=>{e.includes(t)&&(h[u[t]]=t)}))}))})),t.prefixes=Object.assign(Object.assign({},h),t.prefixes);const l=new M.Z(t);t.prettyPrint?a.getSubjects(null,null,null).forEach((e=>{"BlankNode"!==e.termType&&a.getPredicates(e,null,null).forEach((t=>{a.getObjects(e,t,null).forEach((r=>{"BlankNode"===r.termType?l.addQuad(e,t,this.writeBlankNode(l,r,a)):l.addQuad(e,t,r)}))}))})):l.addQuads(s),l.end(((e,t)=>{if(e)return n(e);r(t)}))}))}))}static writeBlankNode(e,t,r){const n=r.getPredicates(t,null,null);return e.blank(n.map((n=>r.getObjects(t,n,null).map((t=>"BlankNode"===t.termType?{predicate:n,object:this.writeBlankNode(e,t,r)}:{predicate:n,object:t})))).flat())}static deserialize(e,t){if(void 0===e.predicates)return super.deserialize(e,t);const r=new InternalRDFDeserializer,n=null!=t?t:r.rdfTypeResolver(e,this.knownTypes,this.knownRDFTypes);return n===Object?e:r.convertSingleValue(e,this.ensureTypeDescriptor(n),this.knownTypes,void 0,void 0,{rdf:{knownTypes:this.knownRDFTypes}})}static getUriMetadata(e){const t=o.DataSerializer.getMetadata(e),r=o.DataSerializer.getRootMetadata(e);if(!(t.options&&t.options.rdf?t.options.rdf:r.options&&r.options.rdf?r.options.rdf:void 0))return;return Array.from(t.dataMembers.values()).filter((e=>e&&e.options&&e.options.rdf&&e.options.rdf.identifier))[0]}static normalizeUri(e,t,r){const n=this.getUriMetadata(e);let i;if(!n)return r;{const s=n.options.rdf;i=s.serializer?s.serializer(t,e):t,i=i&&!i.startsWith("http")&&r?r+i:u.ZP.blankNode(i).value}}}$=RDFSerializer,RDFSerializer.knownRDFTypes=new Map,$.eventEmitter.on("updateSerializableObject",((e,t)=>{if(t&&t.rdf&&t.rdf.type){t.rdf.predicates=t.rdf.predicates||{};const e=t.rdf.predicates[B.type]||[];e.push(t.rdf.type),t.rdf.predicates[B.type]=e}})),$.eventEmitter.on("registerType",(e=>{RDFSerializer.registerRDFType(e)}));var G=r(9619);class SPARQLGenerator{constructor(e,t){this._counter=0,this.dataType=e,this.baseUri=t}get next(){return this._counter++}createInsert(e){const t=RDFSerializer.serializeToQuads(e,this.baseUri),r=new G.Generator,n={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insert",insert:[{type:"bgp",triples:t}]}]};return r.stringify(n)}createDelete(e){const t=new G.Generator,r=RDFSerializer.getUriMetadata(this.dataType),n={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insertdelete",insert:[],delete:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]}],where:this.createQuery({[r.key]:e})}]};return t.stringify(n)}createDeleteAll(e){const t=new G.Generator,r={type:"update",prefixes:{"":this.baseUri},updates:[{updateType:"insertdelete",insert:[],delete:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]}],where:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]},...this.createQuery(e)]}]};return t.stringify(r)}createFindAll(e){return(new G.Generator).stringify(this.createConstruct(e))}createConstruct(e){const t=this.createQuery(e),r=u.ZP.variable("subject"),n=u.ZP.variable("prop"),i=u.ZP.variable("val"),s=u.ZP.variable("child"),a=u.ZP.variable("childProp"),o=u.ZP.variable("childPropVal"),h=u.ZP.variable("someSubj"),l=u.ZP.variable("incomingChildProp"),c=u.ZP.namedNode("http://example.org#overrides");return{queryType:"CONSTRUCT",template:[{subject:r,predicate:n,object:i},{subject:s,predicate:a,object:o},{subject:h,predicate:l,object:s}],where:[{type:"bgp",triples:[{subject:r,predicate:n,object:i},{subject:r,predicate:{type:"path",pathType:"+",items:[{type:"path",pathType:"|",items:[c,{type:"path",pathType:"!",items:[c]}]}]},object:s},{subject:s,predicate:a,object:o},{subject:h,predicate:l,object:s}]},{type:"group",patterns:t}],type:"query",prefixes:{"":this.baseUri}}}isRegexQuery(e){return"[object RegExp]"===Object.prototype.toString.call(e)}generatePath(e,t,r){return this.createQuery(e.split(".").reverse().reduce(((e,t)=>({[t]:e})),t),r)}generateOp(e,t){const r=[];switch(e){case"$and":r.push(...t.map((e=>({type:"group",patterns:this.createQuery(e)}))));break;case"$or":r.push({type:"union",patterns:t.map((e=>this.createQuery(e))).flat()})}return r}generateComponent(e,t,r){const n=[];if(e.startsWith("$"))n.push(...this.generateOp(e,t));else if(e.includes("."))n.push(...this.generatePath(e,t,r));else{const i=o.DataSerializer.getRootMetadata(r);let s;i.knownTypes.forEach((t=>{if(!s){const r=o.DataSerializer.getMetadata(t);if(s=Array.from(r.dataMembers.values()).filter((t=>t.key===e))[0],s)return}}));const a=i.dataMembers.get(e),h=s.options&&s.options.rdf?s:a&&a.options&&a.options.rdf?a:void 0;if(!h&&h.options.rdf)return;if(h.options.rdf.identifier){const e=h.options.rdf,i={type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.variable("predicate"),object:u.ZP.variable("object")}]},{type:"filter",expression:{type:"operation",operator:"=",args:[u.ZP.variable("subject"),u.ZP.namedNode(this.baseUri+e.serializer(t,r))]}}]};return n.push(i),n}const l=h.options.rdf,c=Array.isArray(l.predicate)?l.predicate[0]:l.predicate;if(this.isRegexQuery(t)){const e=t.toString();n.push({type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:u.ZP.variable("object")}]},{type:"filter",expression:{type:"operation",operator:"regex",args:[u.ZP.variable("object"),u.ZP.literal(e.substring(e.indexOf("/")+1,e.lastIndexOf("/"))),u.ZP.literal("i")]}}]})}else if("object"==typeof t){const e=this.generateSelector(t,c,r);if(e.length>0)n.push(...e);else{const e=u.ZP.blankNode(),r={type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:e}]}]};r.patterns.push(...this.createQuery(t,s.type().ctor).map((e=>"bgp"===e.type?[e]:"group"===e.type?e.patterns:[])).flat().map((t=>"bgp"===t.type?(t.triples.map((t=>(t.subject=e,t))),t):t))),n.push(r)}}else{const e=l,r={type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(c),object:u.ZP.literal(t,e.language?e.language:e.datatype?u.ZP.namedNode(e.datatype):void 0)}]};n.push(r)}}return n}generateSelector(e,t,r){const n=[];for(const i of Object.keys(e))n.push(...this.generateComparisonSelector(i,e,t,r)),n.push(...this.generateArraySelector(i,e,t,r));return n}generateComparisonSelector(e,t,r,n){const i=[];let s;switch(e){case"$gt":s=">";break;case"$gte":s=">=";break;case"$lt":s="<";break;case"$lte":s="<=";break;case"$eq":s="="}if(s){const n=u.ZP.variable(`s${this.next}`),a=u.ZP.variable(`o${this.next}`);i.push({type:"group",patterns:[{type:"bgp",triples:[{subject:n,predicate:u.ZP.namedNode(r),object:a}]},{type:"filter",expression:{type:"operation",operator:s,args:[a,u.ZP.literal(t[e])]}}]})}return i}generateArraySelector(e,t,r,n){const i=[];switch(e){case"$in":case"$nin":break;case"$elemMatch":i.push({type:"group",patterns:[{type:"bgp",triples:[{subject:u.ZP.variable("subject"),predicate:u.ZP.namedNode(r),object:u.ZP.namedNode(this.baseUri+"dataobject_mvdewync")}]}]})}return i}createQuery(e,t=this.dataType){const r=[];if(e)for(const n of Object.keys(e))r.push(...this.generateComponent(n,e[n],t));return r}}class SPARQLDriverBase extends o.DataServiceDriver{constructor(e,t){super(e,t),this.generator=new SPARQLGenerator(this.dataType,this.options.baseUri)}findByUID(e){return new Promise(((t,r)=>{const n=RDFSerializer.getUriMetadata(this.dataType);this.findOne({[n.key]:e}).then(t).catch(r)}))}findOne(e,t={}){return new Promise(((r,n)=>{this.findAll(e,{limit:1,sort:t.sort}).then((e=>{r(e[0])})).catch(n)}))}findAll(e,t={}){return new Promise(((r,n)=>{this.findAllSerialized(e).then((e=>{if(0===e.size)return r([]);const n=e.getSubjects(u.ZP.namedNode(B.type),null,null).filter((e=>"NamedNode"===e.termType));let i=n.map((t=>RDFSerializer.deserializeFromStore(t,e))).filter((e=>e.constructor.name===this.dataType.name));t.sort&&(i=i.sort(((e,r)=>t.sort.map((t=>{const n=o.MemoryQueryEvaluator.getValueFromPath(t[1]>0?e:r,t[0])[1],i=o.MemoryQueryEvaluator.getValueFromPath(t[1]>0?r:e,t[0])[1];return"number"==typeof n?n-i:"string"==typeof n?n.localeCompare(i):0})).reduce(((e,t)=>e+t)))).slice(0,t.limit)),r(i)})).catch(n)}))}count(e){return new Promise(((t,r)=>{this.findAllSerialized(e).then((e=>{if(0===e.size)return t(0);const r=e.getSubjects(u.ZP.namedNode(B.type),null,null).filter((e=>"NamedNode"===e.termType));t(r.length)})).catch(r)}))}}class SPARQLDataDriver extends SPARQLDriverBase{constructor(e,t){super(e,t),this.once("build",this._onBuild.bind(this))}_onBuild(){return new Promise((e=>{this.client=new(a())({endpointUrl:this.options.endpointUrl,storeUrl:this.options.storeUrl,updateUrl:this.options.updateUrl,user:this.options.user,password:this.options.password}),e()}))}findAllSerialized(e){return new Promise(((t,r)=>{this.client.query.construct(this.generator.createFindAll(e)).then((e=>{const r=new i.Z;e.on("data",(e=>{r.addQuad(e)})),e.on("end",(()=>{t(r)}))})).catch(r)}))}insert(e,t){return new Promise(((e,r)=>{this.client.query.update(this.generator.createInsert(t),{headers:this.options.headers,operation:this.options.operation}).then((()=>{e(t)})).catch(r)}))}delete(e){return new Promise(((t,r)=>{this.client.query.update(this.generator.createDelete(e),{headers:this.options.headers,operation:this.options.operation}).then(t).catch(r)}))}deleteAll(e){return new Promise(((t,r)=>{this.client.query.update(this.generator.createDeleteAll(e),{headers:this.options.headers,operation:this.options.operation}).then(t).catch(r)}))}}},8825:(e,t,r)=>{const n=r(8295);e.exports=n},2225:e=>{class BlankNode{constructor(e){this.value=e||"b"+ ++BlankNode.nextId}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}BlankNode.prototype.termType="BlankNode",BlankNode.nextId=0,e.exports=BlankNode},8295:(e,t,r)=>{const n=r(2225),i=r(5805),s=r(2542),a=r(1694),o=r(1358),u=r(8790),h=r(5895);const l={namedNode:function(e){return new o(e)},blankNode:function(e){return new n(e)},literal:function(e,t){return"string"==typeof t?-1===t.indexOf(":")?new a(e,t):new a(e,null,l.namedNode(t)):new a(e,null,t)},variable:function(e){return new h(e)},defaultGraph:function(){return l.defaultGraphInstance},triple:function(e,t,r){return l.quad(e,t,r)},quad:function(e,t,r,n){return new u(e,t,r,n||l.defaultGraphInstance)},fromTerm:function(e){return s.call(l,e)},fromQuad:function(e){return s.call(l,e)},defaultGraphInstance:new i};e.exports=l},5805:e=>{class DefaultGraph{equals(e){return!!e&&e.termType===this.termType}}DefaultGraph.prototype.termType="DefaultGraph",DefaultGraph.prototype.value="",e.exports=DefaultGraph},1694:(e,t,r)=>{const n=r(1358);class Literal{constructor(e,t,r){this.value=e,this.datatype=Literal.stringDatatype,this.language="",t?(this.language=t,this.datatype=Literal.langStringDatatype):r&&(this.datatype=r)}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}Literal.prototype.termType="Literal",Literal.langStringDatatype=new n("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Literal.stringDatatype=new n("http://www.w3.org/2001/XMLSchema#string"),e.exports=Literal},1358:e=>{class NamedNode{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}NamedNode.prototype.termType="NamedNode",e.exports=NamedNode},8790:(e,t,r)=>{const n=r(5805);class Quad{constructor(e,t,r,i){this.subject=e,this.predicate=t,this.object=r,this.graph=i||new n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}Quad.prototype.termType="Quad",Quad.prototype.value="",e.exports=Quad},5895:e=>{class Variable{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}Variable.prototype.termType="Variable",e.exports=Variable},2542:e=>{e.exports=function(e){if(!e)return null;if("BlankNode"===e.termType)return this.blankNode(e.value);if("DefaultGraph"===e.termType)return this.defaultGraph();if("Literal"===e.termType)return this.literal(e.value,e.language||this.namedNode(e.datatype.value));if("NamedNode"===e.termType)return this.namedNode(e.value);if("Quad"===e.termType){const t=this.fromTerm(e.subject),r=this.fromTerm(e.predicate),n=this.fromTerm(e.object),i=this.fromTerm(e.graph);return this.quad(t,r,n,i)}if("Variable"===e.termType)return this.variable(e.value);throw new Error(`unknown termType ${e.termType}`)}},2919:(e,t,r)=>{const n=r(4509),i=r(1605);e.exports=class Parser extends i{constructor(e){super(n,e)}}},4509:(e,t,r)=>{const n=r(9600),i=r(8825),{finished:s}=r(8473),a=r(6650);e.exports=class ParserStream extends a{constructor(e,{baseIRI:t="",factory:r=i}={}){const a=new n.StreamParser({baseIRI:t,factory:r});super(a,{objectMode:!0}),a.on("prefix",((e,t)=>{this.emit("prefix",e,t)})),a.on("error",(e=>{this.destroy(e)})),s(this,(()=>{a.end()})),e.pipe(a)}}},1605:e=>{e.exports=class Sink{constructor(e,t){this.Impl=e,this.options=t}import(e,t){const r=new this.Impl(e,Object.assign({},this.options,t));return e.on("end",(()=>{r.readable||r.emit("end")})),e.on("error",(e=>{r.emit("error",e)})),r}}},6083:(e,t,r)=>{const n=r(4182),i=r(8117);e.exports={quadToNTriples:n,termToNTriples:i}},9360:e=>{e.exports=function(e){return"_:"+e.value}},3457:e=>{e.exports=function(e){return""}},4546:(e,t,r)=>{const n=r(6648),i=new RegExp('["\\\\\n\r]'),s=new RegExp('["\\\\\n\r]',"g"),a={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function o(e){return a[e]}e.exports=function(e){const t=(r=e.value,i.test(r)?r.replace(s,o):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+n(e.datatype)}},6648:e=>{e.exports=function(e){return"<"+e.value+">"}},4182:(e,t,r)=>{const n=r(8117);e.exports=function(e){const t=n(e.subject),r=n(e.predicate),i=n(e.object),s=n(e.graph);return`${t} ${r} ${i} ${s?s+" ":""}.`}},8117:(e,t,r)=>{const n=r(9360),i=r(3457),s=r(4546),a=r(6648),o=r(5296);e.exports=function(e){switch(e.termType){case"BlankNode":return n(e);case"DefaultGraph":return i(e);case"Literal":return s(e);case"NamedNode":return a(e);case"Variable":return o(e);default:return}}},5296:e=>{e.exports=function(e){return"?"+e.value}},258:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=u(e),a=s[0],o=s[1],h=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,o)),l=0,c=o>0?a-4:a;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],h[l++]=t>>16&255,h[l++]=t>>8&255,h[l++]=255&t;2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,h[l++]=255&t);1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,h[l++]=t>>8&255,h[l++]=255&t);return h},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=16383,o=0,u=n-i;o<u;o+=a)s.push(h(e,o,o+a>u?u:o+a));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=s.length;a<o;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e,t,n){for(var i,s,a=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5420:e=>{var t=Object.prototype.toString,r="function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;e.exports=function(e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return s=e,"ArrayBuffer"===t.call(s).slice(8,-1)?function(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}(e,n,i):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return r?Buffer.from(e,t):new Buffer(e,t)}(e,n):r?Buffer.from(e):new Buffer(e);var s}},8764:(e,t,r)=>{"use strict";const n=r(258),i=r(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return h(e,t,r)}function h(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=o(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?o(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=o(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function b(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:Q(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}function h(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(s=r;s<o;s++)if(h(e,s)===h(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+u>o&&(r=o-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(h(e,s+n)!==h(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Y(n))return a;e[r+a]=n}return a}function v(e,t,r,n){return V(Q(t,e.length-r),e,r,n)}function E(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return V(H(t),e,r,n)}function T(e,t,r,n){return V(function(e,t){let r,n,i;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,o,u;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],o=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&o)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&o,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return h(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=b,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const o=Math.min(s,a),h=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<o;++e)if(h[e]!==l[e]){s=h[e],a=l[e];break}return s<a?-1:a<s?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return _(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return _(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function j(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=X[e[n]];return i}function F(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n,i){q(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,i){q(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=K((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){L(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K((function(e,t=0){return I(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=K((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K((function(e,t=0){return I(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=K((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const s=u.isBuffer(e)?e:u.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};const M={};function U(e,t,r){M[e]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function q(e,t,r,n,i,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,i,s)}function G(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},6497:(e,t)=>{function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Buffer.isBuffer},4098:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,a="ArrayBuffer"in e;if(a)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function h(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,r,n=d(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=p(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=h(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},f.prototype.delete=function(e){delete this.map[h(e)]},f.prototype.get=function(e){return e=h(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(h(e))},f.prototype.set=function(e,t){this.map[h(e)]=l(t)},f.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),c(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),c(e)},n&&(f.prototype[Symbol.iterator]=f.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e,t){var r,n,i=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),_.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,s){var a=new m(e,r);if(a.signal&&a.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new v(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&i&&(o.responseType="blob"),a.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&a.signal.removeEventListener("abort",u)}),o.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=m,e.Response=v),t.Headers=f,t.Request=m,t.Response=v,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,s,a,h;if(o(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]),void 0===a)a=s[t]=r,++e._eventsCount;else if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,h=l,console&&console.warn&&console.warn(h)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var h=u.length,l=p(u,h);for(r=0;r<h;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,a;if(o(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,h=u>>1,l=-7,c=r?i-1:0,f=r?-1:1,d=e[t+c];for(c+=f,s=d&(1<<-l)-1,d>>=-l,l+=o;l>0;s=256*s+e[t+c],c+=f,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+c],c+=f,l-=8);if(0===s)s=1-h;else{if(s===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=h}return(d?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,h=8*s-i-1,l=(1<<h)-1,c=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?f/u:f*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=l?(o=0,a=l):a+c>=1?(o=(t*u-1)*Math.pow(2,i),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&o,d+=p,o/=256,i-=8);for(a=a<<i|o,h+=i;h>0;e[r+d]=255&a,d+=p,a/=256,h-=8);e[r+d-p]|=128*b}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},5826:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},2222:e=>{var t={},r=t.LEFT_BRACE=1,n=t.RIGHT_BRACE=2,i=t.LEFT_BRACKET=3,s=t.RIGHT_BRACKET=4,a=t.COLON=5,o=t.COMMA=6,u=t.TRUE=7,h=t.FALSE=8,l=t.NULL=9,c=t.STRING=10,f=t.NUMBER=11,d=t.START=17,p=t.STOP=18,b=t.TRUE1=33,g=t.TRUE2=34,y=t.TRUE3=35,_=t.FALSE1=49,m=t.FALSE2=50,w=t.FALSE3=51,v=t.FALSE4=52,E=t.NULL1=65,S=t.NULL2=66,T=t.NULL3=67,x=t.NUMBER1=81,k=t.NUMBER3=83,R=t.STRING1=97,j=t.STRING2=98,N=t.STRING3=99,A=t.STRING4=100,F=t.STRING5=101,O=t.STRING6=102,L=t.VALUE=113,I=t.KEY=114,P=t.OBJECT=129,D=t.ARRAY=130,C="\\".charCodeAt(0),B="/".charCodeAt(0),M="\b".charCodeAt(0),U="\f".charCodeAt(0),$="\n".charCodeAt(0),q="\r".charCodeAt(0),G="\t".charCodeAt(0),z=65536;function W(){this.tState=d,this.value=void 0,this.string=void 0,this.stringBuffer=Buffer.alloc?Buffer.alloc(z):new Buffer(z),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=L,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.offset=-1}W.toknam=function(e){for(var r=Object.keys(t),n=0,i=r.length;n<i;n++){var s=r[n];if(t[s]===e)return s}return e&&"0x"+e.toString(16)};var Q=W.prototype;Q.onError=function(e){throw e},Q.charError=function(e,t){this.tState=p,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(e[t]))+" at position "+t+" in state "+W.toknam(this.tState)))},Q.appendStringChar=function(e){this.stringBufferOffset>=z&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},Q.appendStringBuf=function(e,t,r){var n=e.length;"number"==typeof t&&(n="number"==typeof r?r<0?e.length-t+r:r-t:e.length-t),n<0&&(n=0),this.stringBufferOffset+n>z&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},Q.write=function(e){var t;"string"==typeof e&&(e=new Buffer(e));for(var p=0,L=e.length;p<L;p++)if(this.tState===d){if(t=e[p],this.offset++,123===t)this.onToken(r,"{");else if(125===t)this.onToken(n,"}");else if(91===t)this.onToken(i,"[");else if(93===t)this.onToken(s,"]");else if(58===t)this.onToken(a,":");else if(44===t)this.onToken(o,",");else if(116===t)this.tState=b;else if(102===t)this.tState=_;else if(110===t)this.tState=E;else if(34===t)this.string="",this.stringBufferOffset=0,this.tState=R;else if(45===t)this.string="-",this.tState=x;else if(t>=48&&t<64)this.string=String.fromCharCode(t),this.tState=k;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,p)}else if(this.tState===R)if(t=e[p],this.bytes_remaining>0){for(var I=0;I<this.bytes_remaining;I++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+I]=e[I];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,p=p+I-1}else if(0===this.bytes_remaining&&t>=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+p+" in state "+W.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+p>e.length){for(var P=0;P<=e.length-1-p;P++)this.temp_buffs[this.bytes_in_sequence][P]=e[p+P];this.bytes_remaining=p+this.bytes_in_sequence-e.length,p=e.length-1}else this.appendStringBuf(e,p,p+this.bytes_in_sequence),p=p+this.bytes_in_sequence-1}else if(34===t)this.tState=d,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(c,this.string),this.offset+=Buffer.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=j;else{if(!(t>=32))return this.charError(e,p);this.appendStringChar(t)}else if(this.tState===j)if(34===(t=e[p]))this.appendStringChar(t),this.tState=R;else if(92===t)this.appendStringChar(C),this.tState=R;else if(47===t)this.appendStringChar(B),this.tState=R;else if(98===t)this.appendStringChar(M),this.tState=R;else if(102===t)this.appendStringChar(U),this.tState=R;else if(110===t)this.appendStringChar($),this.tState=R;else if(114===t)this.appendStringChar(q),this.tState=R;else if(116===t)this.appendStringChar(G),this.tState=R;else{if(117!==t)return this.charError(e,p);this.unicode="",this.tState=N}else if(this.tState===N||this.tState===A||this.tState===F||this.tState===O){if(!((t=e[p])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,p);if(this.unicode+=String.fromCharCode(t),this.tState++===O){var D=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&D>=56320&&D<57344?(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate,D))),this.highSurrogate=void 0):void 0===this.highSurrogate&&D>=55296&&D<56320?this.highSurrogate=D:(void 0!==this.highSurrogate&&(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Buffer(String.fromCharCode(D)))),this.tState=R}}else if(this.tState===x||this.tState===k)switch(t=e[p]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=k;break;default:this.tState=d;var z=Number(this.string);if(isNaN(z))return this.charError(e,p);this.string.match(/[0-9]+/)==this.string&&z.toString()!=this.string?this.onToken(c,this.string):this.onToken(f,z),this.offset+=this.string.length-1,this.string=void 0,p--}else if(this.tState===b){if(114!==e[p])return this.charError(e,p);this.tState=g}else if(this.tState===g){if(117!==e[p])return this.charError(e,p);this.tState=y}else if(this.tState===y){if(101!==e[p])return this.charError(e,p);this.tState=d,this.onToken(u,!0),this.offset+=3}else if(this.tState===_){if(97!==e[p])return this.charError(e,p);this.tState=m}else if(this.tState===m){if(108!==e[p])return this.charError(e,p);this.tState=w}else if(this.tState===w){if(115!==e[p])return this.charError(e,p);this.tState=v}else if(this.tState===v){if(101!==e[p])return this.charError(e,p);this.tState=d,this.onToken(h,!1),this.offset+=4}else if(this.tState===E){if(117!==e[p])return this.charError(e,p);this.tState=S}else if(this.tState===S){if(108!==e[p])return this.charError(e,p);this.tState=T}else if(this.tState===T){if(108!==e[p])return this.charError(e,p);this.tState=d,this.onToken(l,null),this.offset+=3}},Q.onToken=function(e,t){},Q.parseError=function(e,t){this.tState=p,this.onError(new Error("Unexpected "+W.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+W.toknam(this.state)))},Q.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Q.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=L)},Q.emit=function(e){this.mode&&(this.state=o),this.onValue(e)},Q.onValue=function(e){},Q.onToken=function(e,t){if(this.state===L)if(e===c||e===f||e===u||e===h||e===l)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===r)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=I,this.mode=P;else if(e===i)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=D,this.state=L;else if(e===n){if(this.mode!==P)return this.parseError(e,t);this.pop()}else{if(e!==s)return this.parseError(e,t);if(this.mode!==D)return this.parseError(e,t);this.pop()}else if(this.state===I)if(e===c)this.key=t,this.state=a;else{if(e!==n)return this.parseError(e,t);this.pop()}else if(this.state===a){if(e!==a)return this.parseError(e,t);this.state=L}else{if(this.state!==o)return this.parseError(e,t);if(e===o)this.mode===D?(this.key++,this.state=L):this.mode===P&&(this.state=I);else{if(!(e===s&&this.mode===D||e===n&&this.mode===P))return this.parseError(e,t);this.pop()}}},W.C=t,e.exports=W},3944:(e,t,r)=>{var n=r(8473).Transform,i=r(5717);function s(e){n.call(this,e),this._destroyed=!1}function a(e,t,r){r(null,e)}function o(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=a),"function"!=typeof n&&(n=null),e(t,r,n)}}i(s,n),s.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},e.exports=o((function(e,t,r){var n=new s(e);return n._transform=t,r&&(n._flush=r),n})),e.exports.ctor=o((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=Object.assign({},e,t),s.call(this,this.options)}return i(n,s),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),e.exports.obj=o((function(e,t,r){var n=new s(Object.assign({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))},6176:(e,t,r)=>{var n=r(9650),i=r(3944),s=r(2222),a=function(e,t){return"string"===n(e)?t===e:e&&"function"===n(e.exec)?e.exec(t):"boolean"===n(e)?e:"function"===n(e)&&e(t)};e.exports.parse=function(e,t){var r=new s,o=i.obj((function(e,t,i){"string"===n(e)&&(e=Buffer.from(e)),r.write(e),i()}));return"string"===n(e)&&(e=e.split(".").map((function(e){return"*"===e||(""===e?{recurse:!0}:e)}))),Array.isArray(e)&&e.length||(e=null),r.onValue=function(){if(this.root||1!==this.stack.length||(o.root=this.value),e){for(var r=0,n=0;r<e.length;){var i,s=e[r];if(n+=1,r+=1,s&&!s.recurse){if(!(i=this.stack.length===n?this:this.stack[n]))return;if(!a(s,i.key))return}else{var u=e[r];if(!u)return;for(;;){if(!(i=this.stack.length===n?this:this.stack[n]))return;if(a(u,i.key)){this.stack[n].value=null,r+=1;break}n+=1}}}if(this.stack.length===n){var h=this.value[this.key],l=this.stack.slice(1).map((function(e){return e.key})).concat([this.key]);for(var c in null!==h&&null!==(h=t?t(h,l):h)&&o.push(h),delete this.value[this.key],this.stack)this.stack[c].value=null}}},r.onError=function(e){o.emit("error",e)},r._onToken=r.onToken,r.onToken=function(t,n){r._onToken(t,n),0===this.stack.length&&o.root&&(e||o.push(o.root),o.emit("root",o.root),o.root=null)},o},e.exports.stringify=function(e,t,r,s){s=s||0,!1===e?(e="",t="\n",r=""):["null","undefined"].indexOf(n(e))>=0&&(e="[\n",t="\n,\n",r="\n]\n");var a=!0;return i.obj((function(r,n,i){var o=JSON.stringify(r,null,s);a?(a=!1,this.push(e+o)):this.push(t+o),i()}),(function(t){a&&this.push(e),a=!1,this.push(r),t()}))},t.stringifyObject=function(e,t,r,s){s=s||0,!1===e?(e="",t="\n",r=""):["null","undefined"].indexOf(n(e))>=0&&(e="{\n",t="\n,\n",r="\n}\n");var a=!0;return i.obj((function(r,n,i){var o=JSON.stringify(r[0])+":"+JSON.stringify(r[1],null,s);a?(a=!1,this.push(e+o)):this.push(t+o),i()}),(function(t){a&&this.push(e),a=!1,this.push(r),t()}))}},2431:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",a={xsd:{decimal:`${i}decimal`,boolean:`${i}boolean`,double:`${i}double`,integer:`${i}integer`,string:`${i}string`},rdf:{type:`${n}type`,nil:`${n}nil`,first:`${n}first`,rest:`${n}rest`,langString:`${n}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`}}},8391:(e,t,r)=>{"use strict";r.d(t,{DP:()=>BlankNode,LQ:()=>d,PL:()=>Quad,Rh:()=>Term,Xy:()=>DefaultGraph,ZP:()=>f,_w:()=>Variable,dW:()=>p,jJ:()=>NamedNode,lD:()=>Quad,t$:()=>Literal});var n=r(2431),i=r(2099);const{rdf:s,xsd:a}=n.Z;let o,u=0;const h=/^"(.*".*)(?="[^"]*$)/,l=/^<<("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ("(?:""|[^"])*"[^ ]*|[^ ]+) ?("(?:""|[^"])*"[^ ]*|[^ ]+)?>>$/,c={namedNode:function(e){return new NamedNode(e)},blankNode:function(e){return new BlankNode(e||"n3-"+u++)},variable:function(e){return new Variable(e)},literal:function(e,t){if("string"==typeof t)return new Literal(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";""===r&&("boolean"==typeof e?r=a.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?a.integer:a.double:(r=a.double,Number.isNaN(e)||(e=e>0?"INF":"-INF"))));return""===r||r===a.string?new Literal(`"${e}"`):new Literal(`"${e}"^^${r}`)},defaultGraph:function(){return o},quad:y,triple:y},f=c;class Term{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Term?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class NamedNode extends Term{get termType(){return"NamedNode"}}class Literal extends Term{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new NamedNode(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?a.string:s.langString}equals(e){return e instanceof Literal?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class BlankNode extends Term{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Variable extends Term{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class DefaultGraph extends Term{constructor(){return super(""),o||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}function d(e,t){if(t=t||c,!e)return t.defaultGraph();switch(e[0]){case"?":return t.variable(e.substr(1));case"_":return t.blankNode(e.substr(2));case'"':if(t===c)return new Literal(e);if('"'===e[e.length-1])return t.literal(e.substr(1,e.length-2));const r=e.lastIndexOf('"',e.length-1);return t.literal(e.substr(1,r-1),"@"===e[r+1]?e.substr(r+2):t.namedNode(e.substr(r+3)));case"<":const n=l.exec(e);return t.quad(d(g(n[1]),t),d(g(n[2]),t),d(g(n[3]),t),n[4]&&d(g(n[4]),t));default:return t.namedNode(e)}}function p(e){if("string"==typeof e)return e;if(e instanceof Term&&"Quad"!==e.termType)return e.id;if(!e)return o.id;switch(e.termType){case"NamedNode":return e.value;case"BlankNode":return`_:${e.value}`;case"Variable":return`?${e.value}`;case"DefaultGraph":return"";case"Literal":return`"${e.value}"${e.language?`@${e.language}`:e.datatype&&e.datatype.value!==a.string?`^^${e.datatype.value}`:""}`;case"Quad":return`<<${b(p(e.subject))} ${b(p(e.predicate))} ${b(p(e.object))}${(0,i.isDefaultGraph)(e.graph)?"":` ${p(e.graph)}`}>>`;default:throw new Error(`Unexpected termType: ${e.termType}`)}}o=new DefaultGraph;class Quad extends Term{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||o}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function b(e){return e.replace(h,((e,t)=>`"${t.replace(/"/g,'""')}`))}function g(e){return e.replace(h,((e,t)=>`"${t.replace(/""/g,'"')}`))}function y(e,t,r,n){return new Quad(e,t,r,n)}},3700:(e,t,r)=>{"use strict";r.d(t,{Z:()=>N3Store});var n=r(8391),i=r(8473),s=r(2431);class N3Store{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._ids["><"]=0,this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||n.ZP,e&&this.addQuads(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const s in r=t[i].subjects)for(const t in n=r[s])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),s=i[r]||(i[r]={}),a=n in s;return a||(s[n]=null),!a}_removeFromIndex(e,t,r,n){const i=e[t],s=i[r];delete s[n];for(const e in s)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,i,s,a,o,u){let h,l,c;const f=!t+!r+!i>1?Object.keys(this._ids):this._entities,d=(0,n.LQ)(u,this._factory);t&&((h=e,e={})[t]=h[t]);for(const t in e){const u=f[t];if(l=e[t]){r&&((h=l,l={})[r]=h[r]);for(const e in l){const t=f[e];if(c=l[e]){const e=i?i in c?[i]:[]:Object.keys(c);for(let r=0;r<e.length;r++){const i={subject:null,predicate:null,object:null};i[s]=(0,n.LQ)(u,this._factory),i[a]=(0,n.LQ)(t,this._factory),i[o]=(0,n.LQ)(f[e[r]],this._factory),yield this._factory.quad(i.subject,i.predicate,i.object,d)}}}}}}_loop(e,t){for(const r in e)t(r)}_loopByKey0(e,t,r){let n,i;if(n=e[t])for(i in n)r(i)}_loopByKey1(e,t,r){let n,i;for(n in e)i=e[n],i[t]&&r(n)}_loopBy2Keys(e,t,r,n){let i,s,a;if((i=e[t])&&(s=i[r]))for(a in s)n(a)}_countInIndex(e,t,r,n){let i,s,a,o=0;t&&((i=e,e={})[t]=i[t]);for(const t in e)if(s=e[t]){r&&((i=s,s={})[r]=i[r]);for(const e in s)(a=s[e])&&(n?n in a&&o++:o+=Object.keys(a).length)}return o}_getGraphs(e){if(!a(e))return this._graphs;const t={};return t[e]=this._graphs[e],t}_uniqueEntities(e){const t=Object.create(null);return r=>{r in t||(t[r]=!0,e((0,n.LQ)(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,i){t||(i=e.graph,r=e.object,t=e.predicate,e=e.subject),e=(0,n.dW)(e),t=(0,n.dW)(t),r=(0,n.dW)(r),i=(0,n.dW)(i);let s=this._graphs[i];s||(s=this._graphs[i]={subjects:{},predicates:{},objects:{}},Object.freeze(s));const a=this._ids,o=this._entities;e=a[e]||(a[o[++this._id]=e]=this._id),t=a[t]||(a[o[++this._id]=t]=this._id),r=a[r]||(a[o[++this._id]=r]=this._id);const u=this._addToIndex(s.subjects,e,t,r);return this._addToIndex(s.predicates,t,r,e),this._addToIndex(s.objects,r,e,t),this._size=null,u}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}delete(e){return this.removeQuad(e),this}has(e,t,r,n){return e&&e.subject&&({subject:e,predicate:t,object:r,graph:n}=e),!this.readQuads(e,t,r,n).next().done}import(e){return e.on("data",(e=>{this.addQuad(e)})),e}removeQuad(e,t,r,i){t||(i=e.graph,r=e.object,t=e.predicate,e=e.subject),e=(0,n.dW)(e),t=(0,n.dW)(t),r=(0,n.dW)(r),i=(0,n.dW)(i);const s=this._ids,a=this._graphs;let o,u,h;if(!((e=s[e])&&(t=s[t])&&(r=s[r])&&(o=a[i])&&(u=o.subjects[e])&&(h=u[t])&&r in h))return!1;for(e in this._removeFromIndex(o.subjects,e,t,r),this._removeFromIndex(o.predicates,t,r,e),this._removeFromIndex(o.objects,r,e,t),null!==this._size&&this._size--,o.subjects)return!0;return delete a[i],!0}removeQuads(e){for(let t=0;t<e.length;t++)this.removeQuad(e[t])}remove(e){return e.on("data",(e=>{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const s=new i.Readable({objectMode:!0});return s._read=()=>{for(const i of this.readQuads(e,t,r,n))s.push(i);s.push(null)},this.remove(s)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,i){e=e&&(0,n.dW)(e),t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._getGraphs(i),o=this._ids;let u,h,l,c;if(!(a(e)&&!(h=o[e])||a(t)&&!(l=o[t])||a(r)&&!(c=o[r])))for(const e in s)(u=s[e])&&(h?c?yield*this._findInIndex(u.objects,c,h,l,"object","subject","predicate",e,null,!0):yield*this._findInIndex(u.subjects,h,l,null,"subject","predicate","object",e,null,!0):l?yield*this._findInIndex(u.predicates,l,c,null,"predicate","object","subject",e,null,!0):c?yield*this._findInIndex(u.objects,c,null,null,"object","subject","predicate",e,null,!0):yield*this._findInIndex(u.subjects,null,null,null,"subject","predicate","object",e,null,!0))}match(e,t,r,n){return new DatasetCoreAndReadableStream(this,e,t,r,n)}countQuads(e,t,r,i){e=e&&(0,n.dW)(e),t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._getGraphs(i),o=this._ids;let u,h,l,c,f=0;if(a(e)&&!(h=o[e])||a(t)&&!(l=o[t])||a(r)&&!(c=o[r]))return 0;for(const n in s)(u=s[n])&&(f+=e?r?this._countInIndex(u.objects,c,h,l):this._countInIndex(u.subjects,h,l,c):t?this._countInIndex(u.predicates,l,c,h):this._countInIndex(u.objects,c,h,l));return f}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let s=!1;const a=!this.some((t=>(s=!0,!e(t))),t,r,n,i);return s&&a}some(e,t,r,n,i){for(const s of this.readQuads(t,r,n,i))if(e(s))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.predicates,h,l,e):this._loopByKey1(u.subjects,h,e):l?this._loopByKey0(u.objects,l,e):this._loop(u.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.objects,l,h,e):this._loopByKey0(u.subjects,h,e):l?this._loopByKey1(u.predicates,l,e):this._loop(u.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,i){t=t&&(0,n.dW)(t),r=r&&(0,n.dW)(r),i=i&&(0,n.dW)(i);const s=this._ids,o=this._getGraphs(i);let u,h,l;if(e=this._uniqueEntities(e),!(a(t)&&!(h=s[t])||a(r)&&!(l=s[r])))for(i in o)(u=o[i])&&(h?l?this._loopBy2Keys(u.subjects,h,l,e):this._loopByKey1(u.objects,h,e):l?this._loopByKey0(u.predicates,l,e):this._loop(u.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,i)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,s.Z.rdf.rest,s.Z.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,u,h=!1;const l=t.graph;let c=t.subject;for(;c&&!h;){const e=this.getQuads(null,null,c,null),t=this.getQuads(c,null,null,null);let r,f=null,d=null,p=null;for(let i=0;i<t.length&&!h;i++)r=t[i],r.graph.equals(l)?o?h=n(c,"has non-list arcs out"):r.predicate.value===s.Z.rdf.first?f?h=n(c,"has multiple rdf:first arcs"):a.push(f=r):r.predicate.value===s.Z.rdf.rest?d?h=n(c,"has multiple rdf:rest arcs"):a.push(d=r):e.length?h=n(c,"can't be subject and object"):(o=r,u="subject"):h=n(c,"not confined to single graph");for(let t=0;t<e.length&&!h;++t)r=e[t],o?h=n(c,"can't have coreferences"):r.predicate.value===s.Z.rdf.rest?p?h=n(c,"has incoming rdf:rest arcs"):p=r:(o=r,u="object");f?i.unshift(f.object):h=n(c,"has no list head"),c=p&&p.subject}h?e=!1:o&&(r[o[u].value]=i)})),e&&this.removeQuads(a),r}*[Symbol.iterator](){yield*this.readQuads()}}function a(e){return"string"==typeof e||e instanceof String}class DatasetCoreAndReadableStream extends i.Readable{constructor(e,t,r,n,i){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:t,predicate:r,object:n,graph:i})}get filtered(){if(!this._filtered){const{n3Store:e,graph:t,object:r,predicate:n,subject:i}=this,s=e.getQuads(i,n,r,t);this._filtered=new N3Store(s,{factory:e._factory})}return this._filtered}get size(){return this.filtered.size}_read(){for(const e of this)this.push(e);this.push(null)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,t,r,n){return new DatasetCoreAndReadableStream(this.filtered,e,t,r,n)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}},2099:(e,t,r)=>{"use strict";r.r(t),r.d(t,{inDefaultGraph:()=>h,isBlankNode:()=>s,isDefaultGraph:()=>u,isLiteral:()=>a,isNamedNode:()=>i,isVariable:()=>o,prefix:()=>l,prefixes:()=>c});var n=r(8391);function i(e){return!!e&&"NamedNode"===e.termType}function s(e){return!!e&&"BlankNode"===e.termType}function a(e){return!!e&&"Literal"===e.termType}function o(e){return!!e&&"Variable"===e.termType}function u(e){return!!e&&"DefaultGraph"===e.termType}function h(e){return u(e.graph)}function l(e,t){return c({"":e.value||e},t)("")}function c(e,t){const r=Object.create(null);for(const t in e)i(t,e[t]);function i(e,n){if("string"==typeof n){const i=Object.create(null);r[e]=e=>i[e]||(i[e]=t.namedNode(n+e))}else if(!(e in r))throw new Error(`Unknown prefix: ${e}`);return r[e]}return t=t||n.ZP,i}},5403:(e,t,r)=>{"use strict";r.d(t,{Z:()=>N3Writer});var n=r(2431),i=r(8391),s=r(2099);const a=i.ZP.defaultGraph(),{rdf:o,xsd:u}=n.Z,h=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,l=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,c={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class SerializedTerm extends i.Rh{equals(){return!1}}class N3Writer{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=a,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${d(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return a.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(a.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),h.test(t)&&(t=t.replace(l,f));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(h.test(t)&&(t=t.replace(l,f)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===u.string)return`"${t}"`}else switch(e.datatype.value){case u.string:return`"${t}"`;case u.boolean:if("true"===t||"false"===t)return t;break;case u.integer:if(/^[+-]?\d+$/.test(t))return t;break;case u.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case u.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===o.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${(0,s.isDefaultGraph)(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,a,n):this._writeQuad(e,t,r,n||a,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=d(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new SerializedTerm("[]");case 1:if(r=i[0],!(r.object instanceof SerializedTerm))return new SerializedTerm(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let s=0;s<n;s++)r=i[s],r.predicate.equals(e)?t+=`, ${this._encodeObject(r.object)}`:(t+=`${(s?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new SerializedTerm(`${t}\n]`)}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new SerializedTerm(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function f(e){let t=c[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function d(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}},9600:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>f.DP,DataFactory:()=>f.ZP,DefaultGraph:()=>f.Xy,Lexer:()=>N3Lexer,Literal:()=>f.t$,NamedNode:()=>f.jJ,Parser:()=>N3Parser,Quad:()=>f.lD,Store:()=>y.Z,StreamParser:()=>N3StreamParser,StreamWriter:()=>N3StreamWriter,Term:()=>f.Rh,Triple:()=>f.PL,Util:()=>m,Variable:()=>f._w,Writer:()=>g.Z,default:()=>w,termFromId:()=>f.LQ,termToId:()=>f.dW});var n=r(2431),i=r(4375),s=r.n(i);const{xsd:a}=n.Z,o=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,u={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},h=/[\x00-\x20<>\\"\{\}\|\^\`]/,l={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},c=/$0^/;class N3Lexer{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in l)&&this[e]instanceof RegExp&&(this[e]=c)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,o;for(;e=this._newline.exec(r);)this._comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(o=this._comment.exec(r))&&i("comment",o[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const u=this._line,l=r[0];let c="",f="",d="",p=null,b=0,g=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(b=1,c="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(p=this._unescapedIri.exec(r))c="IRI",f=p[1];else if(p=this._iri.exec(r)){if(f=this._unescape(p[1]),null===f||h.test(f))return s(this);c="IRI"}else r.length>1&&"<"===r[1]?(c="<<",b=2):this._n3Mode&&r.length>1&&"="===r[1]&&(c="inverse",b=2,f=">");break;case">":r.length>1&&">"===r[1]&&(c=">>",b=2);break;case"_":((p=this._blank.exec(r))||t&&(p=this._blank.exec(`${r} `)))&&(c="blank",d="_",f=p[1]);break;case'"':if(p=this._simpleQuotedString.exec(r))f=p[1];else if(({value:f,matchLength:b}=this._parseLiteral(r)),null===f)return s(this);null===p&&0===b||(c="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(p=this._simpleApostropheString.exec(r))f=p[1];else if(({value:f,matchLength:b}=this._parseLiteral(r)),null===f)return s(this);null===p&&0===b||(c="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(p=this._variable.exec(r))&&(c="var",f=p[0]);break;case"@":"literal"===this._previousMarker&&(p=this._langcode.exec(r))?(c="langcode",f=p[1]):(p=this._keyword.exec(r))&&(c=p[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){c=".",b=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(p=this._number.exec(r)||t&&(p=this._number.exec(`${r} `)))&&(c="literal",f=p[0],d="string"==typeof p[1]?a.double:"string"==typeof p[2]?a.decimal:a.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(p=this._sparqlKeyword.exec(r))?c=p[0].toUpperCase():g=!0;break;case"f":case"t":(p=this._boolean.exec(r))?(c="literal",f=p[0],d=a.boolean):g=!0;break;case"a":(p=this._shortPredicates.exec(r))?(c="abbreviation",f="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(c="abbreviation",">"!==r[1]?(b=1,f="="):(b=2,f=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(b=1,c=l);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(p=this._prefix.exec(r))?((p=this._prefixed.exec(r))||t&&(p=this._prefixed.exec(`${r} `)))&&(c="prefixed",d=p[1]||"",f=this._unescape(p[2])):(c="prefix",f=p[1]||"")),"^^"===this._previousMarker)switch(c){case"prefixed":c="type";break;case"IRI":c="typeIRI";break;default:c=""}if(!c)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?s(this):this._input=r;const y=b||p[0].length,_=i(c,f,d,u,y);this.previousToken=_,this._previousMarker=c,r=r.substr(y,r.length)}function i(t,i,s,a,o){const u=r?n-r.length:n,h={type:t,value:i,prefix:s,line:a,start:u,end:u+o};return e(null,h),h}function s(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(o,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in u?u[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,s=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:s}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}s()((()=>this._tokenizeToEnd(t,!0)))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",(e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))})),e.on("end",(()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)})),e.on("error",t)}}var f=r(8391);let d=0;class N3Parser{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&b(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),s=/quad/.test(t),a=this._n3Mode=/n3/.test(t),o=i||s;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),this._supportsRDFStar=""===t||/star|\*$/.test(t),o&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new N3Lexer({lineMode:o,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){d=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const s=this._n3Mode;this._contextStack.push({subject:r,predicate:n,object:i,graph:t,type:e,inverse:!!s&&this._inversePredicate,blankPrefix:s?this._prefixes._:"",quantified:s?this._quantified:null}),s&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.id.substr(2)}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(){const e=this._contextStack.pop(),t=this._n3Mode;this._subject=e.subject,this._predicate=e.predicate,this._object=e.object,this._graph=e.graph,t&&(this._inversePredicate=e.inverse,this._prefixes._=e.blankPrefix,this._quantified=e.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext(),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,s=this._contextStack,a=s[s.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext(),0!==s.length&&"list"===s[s.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext(),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const e=this._subject;this._restoreContext(),this._emit(this._subject,this.RDF_FIRST,e,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext(),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=p}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,s=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(s,n-1),s=n+1;break;case void 0:case"?":case"#":return r+e.substring(s,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(s,n-2),(s=r.lastIndexOf("/"))>=i&&(r=r.substr(0,s)),"/"!==a)return`${r}/${e.substr(n+1)}`;s=n+1}}}a=e[++n]}return r+e.substring(s)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${d++}_`,this._prefixCallback=r||p,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=p):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function p(){}function b(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(n.Z.rdf.first),e.RDF_REST=r(n.Z.rdf.rest),e.RDF_NIL=r(n.Z.rdf.nil),e.N3_FORALL=r(n.Z.r.forAll),e.N3_FORSOME=r(n.Z.r.forSome),e.ABBREVIATIONS={a:r(n.Z.rdf.type),"=":r(n.Z.owl.sameAs),">":r(n.Z.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}b(N3Parser.prototype,f.ZP);var g=r(5403),y=r(3700),_=r(8473);class N3StreamParser extends _.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;let t,r;new N3Parser(e).parse({on:(e,n)=>{switch(e){case"data":t=n;break;case"end":r=n}}},((e,t)=>{e&&this.emit("error",e)||t&&this.push(t)}),((e,t)=>{this.emit("prefix",e,t)})),this._transform=(e,r,n)=>{t(e),n()},this._flush=e=>{r(),e()}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),this}}class N3StreamWriter extends _.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new g.Z({write:(e,t,r)=>{this.push(e),r&&r()},end:e=>{this.push(null),e&&e()}},e);this._transform=(e,r,n)=>{t.addQuad(e,n)},this._flush=e=>{t.end(e)}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),e.on("prefix",((e,t)=>{this._writer.addPrefix(e,t)})),this}}var m=r(2099);const w={Lexer:N3Lexer,Parser:N3Parser,Writer:g.Z,Store:y.Z,StreamParser:N3StreamParser,StreamWriter:N3StreamWriter,Util:m,DataFactory:f.ZP,Term:f.Rh,NamedNode:f.jJ,Literal:f.t$,BlankNode:f.DP,Variable:f._w,DefaultGraph:f.Xy,Quad:f.lD,Triple:f.PL,termFromId:f.LQ,termToId:f.dW}},8952:(e,t,r)=>{const n=r(4098),i=r(3662),s=r(4498);function a(e,t){return i(t).then((t=>n(e,t).then((e=>s(e)))))}a.Headers=n.Headers,e.exports=a},6422:(e,t,r)=>{const n=r(8473);e.exports=class ArrayBufferReadable extends n{constructor(e){let t=!1;super({read:()=>{t||(t=!0,e().then((e=>{this.push(Buffer.from(e)),this.push(null)})))}})}}},1376:e=>{class PatchableResponse{constructor(e,t){this.obj=e,Object.keys(t).forEach((e=>{this[e]=t[e]})),PatchableResponse.properties(e).forEach((t=>{t in this||("function"==typeof this.obj[t]?this[t]=(...r)=>{this.obj[t].call(e,r)}:Object.defineProperty(this,t,{get:()=>this.obj[t],set:e=>{this.obj[t]=e},enumerable:!0,configurable:!0}))}))}static properties(e){return Object.getOwnPropertyNames(Object.getPrototypeOf(e))}}e.exports=PatchableResponse},8631:(e,t,r)=>{const n=r(8473);e.exports=class WhatwgReadable extends n{constructor(e){super({read:()=>{e.read().then((e=>{e.done?this.push(null):this.push(Buffer.from(e.value))})).catch((e=>{this.emit("error",e)}))}})}}},3662:(e,t,r)=>{const n=r(1991);e.exports=function(e){return(e=e||{}).body&&e.body.readable?n(e.body).then((t=>(e.body=t,e))):Promise.resolve(e)}},4498:(e,t,r)=>{const n=r(6422),i=r(1376),s=r(2902),a=r(8631);e.exports=function(e){return e.bodyUsed?e.body=new s(new Error("body already in use")):e.body&&e.body.getReader?e=new i(e,{body:new a(e.body.getReader())}):e.body&&e.body.readable||(e.body=new n((()=>e.arrayBuffer()))),e}},1991:(e,t,r)=>{const n=r(5797);e.exports=function(e){return new Promise(((t,r)=>{const i=n();e.on("error",r),e.on("end",(()=>{t(i.getBody())})),e.pipe(i)}))}},5797:(e,t,r)=>{var n=r(4110).Writable,i=r(5717),s=r(5420);if("undefined"==typeof Uint8Array)var a=r(1666).U2;else a=Uint8Array;function o(e,t){if(!(this instanceof o))return new o(e,t);"function"==typeof e&&(t=e,e={}),e||(e={});var r=e.encoding,i=!1;r?"u8"!==(r=String(r).toLowerCase())&&"uint8"!==r||(r="uint8array"):i=!0,n.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=i,t&&this.on("finish",(function(){t(this.getBody())})),this.body=[]}e.exports=o,i(o,n),o.prototype._write=function(e,t,r){this.body.push(e),r()},o.prototype.inferEncoding=function(e){var t=void 0===e?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":"undefined"!=typeof Uint8Array&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":"string"==typeof t?"string":"[object Object]"===Object.prototype.toString.call(t)?"object":"buffer"},o.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r]);return t}(this.body):"string"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];"string"==typeof n||Buffer.isBuffer(n)?t.push(n):u(n)?t.push(s(n)):t.push(s(String(n)))}t=Buffer.isBuffer(e[0])?(t=Buffer.concat(t)).toString("utf8"):t.join("");return t}(this.body):"buffer"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];Buffer.isBuffer(n)?t.push(n):u(n)?t.push(s(n)):t.push(s(String(n)))}return Buffer.concat(t)}(this.body):"uint8array"===this.encoding?function(e){for(var t=0,r=0;r<e.length;r++)"string"==typeof e[r]&&(e[r]=s(e[r])),t+=e[r].length;for(var n=new a(t),i=(r=0,0);r<e.length;r++)for(var o=e[r],u=0;u<o.length;u++)n[i++]=o[u];return n}(this.body):this.body):[]};Array.isArray;function u(e){return"string"==typeof e||(t=e,/Array\]$/.test(Object.prototype.toString.call(t)))||e&&"function"==typeof e.subarray;var t}},2639:(e,t,r)=>{"use strict";var n=r(8212),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var s=Object.create(r(6497));s.inherits=r(5717);var a=r(8217),o=r(5928);s.inherits(c,a);for(var u=i(o.prototype),h=0;h<u.length;h++){var l=u[h];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},4845:(e,t,r)=>{"use strict";e.exports=s;var n=r(2006),i=Object.create(r(6497));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(5717),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},8217:(e,t,r)=>{"use strict";var n=r(8212);e.exports=_;var i,s=r(5826);_.ReadableState=y;r(7187).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r(9742),u=r(6175).Buffer,h=r.g.Uint8Array||function(){};var l=Object.create(r(6497));l.inherits=r(5717);var c=r(8906),f=void 0;f=c&&c.debuglog?c.debuglog("stream"):function(){};var d,p=r(4544),b=r(7373);l.inherits(_,o);var g=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(i=i||r(2639));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var s=e.highWaterMark,a=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(6295).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||r(2639),!(this instanceof _))return new _(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function m(e,t,r,n,i){var s,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=b.destroy,_.prototype._undestroy=b.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},_.prototype.unshift=function(e){return m(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return d||(d=r(6295).s),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var v=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){f("emit readable"),e.emit("readable"),N(e)}function x(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function R(e){f("readable nexttick read 0"),e.read(0)}function j(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?h:_;function u(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",h),r.removeListener("end",_),r.removeListener("data",p),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function h(){f("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",l);var c=!1;var d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!c&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){f("onerror",t),_(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),_()}function y(){f("onfinish"),e.removeListener("close",g),_()}function _(){f("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=L(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&S(this):n.nextTick(R,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),this},_.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=A},2006:(e,t,r)=>{"use strict";e.exports=a;var n=r(2639),i=Object.create(r(6497));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},5928:(e,t,r)=>{"use strict";var n=r(8212);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick;g.WritableState=b;var o=Object.create(r(6497));o.inherits=r(5717);var u={deprecate:r(4927)},h=r(9742),l=r(6175).Buffer,c=r.g.Uint8Array||function(){};var f,d=r(7373);function p(){}function b(e,t){s=s||r(2639),e=e||{};var o=t instanceof s;this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,h=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(h||0===h)?h:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,s){--t.pendingcb,r?(n.nextTick(s,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(s(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,s);else{var o=w(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?a(_,e,r,o,s):_(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function g(e){if(s=s||r(2639),!(f.call(g,this)||this instanceof s))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function y(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,y(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(y(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=w(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(v,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):f=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,s=this._writableState,a=!1,o=!s.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var s=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(i,a),s=!1),s}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else y(e,t,!1,o,n,i,s);return u}(this,s,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},4544:(e,t,r)=>{"use strict";var n=r(6175).Buffer,i=r(3081);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=s,i=o,t.copy(r,i),o+=a.data.length,a=a.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},7373:(e,t,r)=>{"use strict";var n=r(8212);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},9742:(e,t,r)=>{e.exports=r(7187).EventEmitter},4110:(e,t,r)=>{(t=e.exports=r(8217)).Stream=t,t.Readable=t,t.Writable=r(5928),t.Duplex=r(2639),t.Transform=r(2006),t.PassThrough=r(4845)},6175:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6295:(e,t,r)=>{"use strict";var n=r(6175).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8212:e=>{"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(a-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick((function(){e.apply(null,i)}))}}}:e.exports=process},6654:e=>{e.exports=function(e){return new Promise((t=>{setTimeout(t,e)}))}},4375:(e,t,r)=>{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},1640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7970),t),i(r(7498),t),i(r(6381),t),i(r(2808),t),i(r(2016),t),i(r(3387),t),i(r(1573),t)},7970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0;t.BlankNode=class BlankNode{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},7498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(7970),i=r(6381),s=r(2808),a=r(2016),o=r(3387),u=r(1573);let h=0;t.DataFactory=class DataFactory{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${h++}_`}namedNode(e){return new a.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new s.Literal(e,t)}variable(e){return new u.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new o.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(s.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},6381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class DefaultGraph{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=DefaultGraph,DefaultGraph.INSTANCE=new DefaultGraph},2808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(2016);class Literal{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=Literal.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=Literal.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}t.Literal=Literal,Literal.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Literal.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},2016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0;t.NamedNode=class NamedNode{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},3387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0;t.Quad=class Quad{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},1573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;t.Variable=class Variable{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},8850:(e,t,r)=>{const n=r(8825),i=r(8473).Transform;e.exports=class TripleToQuadTransform extends i{constructor(e,t){super(),t=t||{},this._writableState.objectMode=!0,this._readableState.objectMode=!0,this.factory=t.factory||n,this.graph=e||this.factory.defaultGraph(),this.on("pipe",(e=>{e.on("error",(e=>{this.emit("error",e)}))}))}_transform(e,t,r){this.push(this.factory.quad(e.subject,e.predicate,e.object,this.graph)),r()}}},2902:(e,t,r)=>{const n=r(7299);e.exports=class ReadableError extends n{constructor(e){super({read:()=>{this.emit("error",e)}})}}},2214:(e,t,r)=>{"use strict";var n=r(8212),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var s=Object.create(r(6497));s.inherits=r(5717);var a=r(507),o=r(1766);s.inherits(c,a);for(var u=i(o.prototype),h=0;h<u.length;h++){var l=u[h];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},3323:(e,t,r)=>{"use strict";e.exports=s;var n=r(2530),i=Object.create(r(6497));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(5717),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},507:(e,t,r)=>{"use strict";var n=r(8212);e.exports=_;var i,s=r(5826);_.ReadableState=y;r(7187).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r(6267),u=r(8036).Buffer,h=r.g.Uint8Array||function(){};var l=Object.create(r(6497));l.inherits=r(5717);var c=r(147),f=void 0;f=c&&c.debuglog?c.debuglog("stream"):function(){};var d,p=r(5004),b=r(465);l.inherits(_,o);var g=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(i=i||r(2214));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var s=e.highWaterMark,a=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(5697).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function _(e){if(i=i||r(2214),!(this instanceof _))return new _(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function m(e,t,r,n,i){var s,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=b.destroy,_.prototype._undestroy=b.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},_.prototype.unshift=function(e){return m(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return d||(d=r(5697).s),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var v=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(T,e):T(e))}function T(e){f("emit readable"),e.emit("readable"),N(e)}function x(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function R(e){f("readable nexttick read 0"),e.read(0)}function j(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?h:_;function u(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",b),e.removeListener("unpipe",u),r.removeListener("end",h),r.removeListener("end",_),r.removeListener("data",p),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function h(){f("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",l);var c=!1;var d=!1;function p(t){f("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!c&&(f("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function b(t){f("onerror",t),_(),e.removeListener("error",b),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),_()}function y(){f("onfinish"),e.removeListener("close",g),_()}function _(){f("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var a=L(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&S(this):n.nextTick(R,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),this},_.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=A},2530:(e,t,r)=>{"use strict";e.exports=a;var n=r(2214),i=Object.create(r(6497));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},1766:(e,t,r)=>{"use strict";var n=r(8212);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick;g.WritableState=b;var o=Object.create(r(6497));o.inherits=r(5717);var u={deprecate:r(4927)},h=r(6267),l=r(8036).Buffer,c=r.g.Uint8Array||function(){};var f,d=r(465);function p(){}function b(e,t){s=s||r(2214),e=e||{};var o=t instanceof s;this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,h=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(h||0===h)?h:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,s){--t.pendingcb,r?(n.nextTick(s,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(s(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,s);else{var o=w(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?a(_,e,r,o,s):_(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function g(e){if(s=s||r(2214),!(f.call(g,this)||this instanceof s))return new g(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function y(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,y(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(y(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=w(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(v,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===g&&(e&&e._writableState instanceof b)}})):f=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,s=this._writableState,a=!1,o=!s.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=p),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var s=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(i,a),s=!1),s}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else y(e,t,!1,o,n,i,s);return u}(this,s,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},5004:(e,t,r)=>{"use strict";var n=r(8036).Buffer,i=r(6965);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=s,i=o,t.copy(r,i),o+=a.data.length,a=a.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},465:(e,t,r)=>{"use strict";var n=r(8212);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},6267:(e,t,r)=>{e.exports=r(7187).EventEmitter},7299:(e,t,r)=>{(t=e.exports=r(507)).Stream=t,t.Readable=t,t.Writable=r(1766),t.Duplex=r(2214),t.Transform=r(2530),t.PassThrough=r(3323)},8036:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},5697:(e,t,r)=>{"use strict";var n=r(8036).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,s,a,o;if("string"==typeof t&&(s="not ",t.substr(!a||a<0?0:+a,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return o+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var i=r(9481),s=r(4229);r(5717)(h,i);for(var a=n(s.prototype),o=0;o<a.length;o++){var u=a[o];h.prototype[u]||(h.prototype[u]=s.prototype[u])}function h(e){if(!(this instanceof h))return new h(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n;e.exports=T,T.ReadableState=S;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},s=r(2503),a=r(8764).Buffer,o=r.g.Uint8Array||function(){};var u,h=r(4616);u=h&&h.debuglog?h.debuglog("stream"):function(){};var l,c,f,d=r(7327),p=r(1195),b=r(2457).getHighWaterMark,g=r(4281).q,y=g.ERR_INVALID_ARG_TYPE,_=g.ERR_STREAM_PUSH_AFTER_EOF,m=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(T,s);var v=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(2553).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function T(e){if(n=n||r(6753),!(this instanceof T))return new T(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function x(e,t,r,n,i){u("readableAddChunk",t);var s,h=e._readableState;if(null===t)h.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}(e,h);else if(i||(s=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof o||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(h,t)),s)v(e,s);else if(h.objectMode||t&&t.length>0)if("string"==typeof t||h.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)h.endEmitted?v(e,new w):k(e,h,t,!0);else if(h.ended)v(e,new _);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(t=h.decoder.write(t),h.objectMode||0!==t.length?k(e,h,t,!1):F(e,h)):k(e,h,t,!1)}else n||(h.reading=!1,F(e,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&N(e)),F(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),x(this,e,t,!1,r)},T.prototype.unshift=function(e){return x(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){l||(l=r(2553).s);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(A,e))}function A(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function F(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){u("readable nexttick read 0"),e.read(0)}function P(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(M,t,e))}function M(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}T.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):N(this),null;if(0===(e=j(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(e){v(this,new m("_read()"))},T.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?o:b;function a(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",f),e.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",c),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function o(){u("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,D(e))}}(r);e.on("drain",h);var l=!1;function c(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!l&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){u("onerror",t),b(),e.removeListener("error",f),0===i(e,"error")&&v(e,t)}function d(){e.removeListener("finish",p),b()}function p(){u("onfinish"),e.removeListener("close",d),b()}function b(){u("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?N(this):n.reading||process.nextTick(I,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(L,this),r},T.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(L,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(P,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5850)),c(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=C,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===f&&(f=r(5167)),f(T,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=l;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function h(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}r(5717)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=T,T.WritableState=S;var s={deprecate:r(4927)},a=r(2503),o=r(8764).Buffer,u=r.g.Uint8Array||function(){};var h,l=r(1195),c=r(2457).getHighWaterMark,f=r(4281).q,d=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,b=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,_=f.ERR_STREAM_NULL_VALUES,m=f.ERR_STREAM_WRITE_AFTER_END,w=f.ERR_UNKNOWN_ENCODING,v=l.errorOrDestroy;function E(){}function S(e,t,s){i=i||r(6753),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(A,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),A(e,t))}(e,r,n,t,i);else{var s=j(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?process.nextTick(k,e,r,s,i):k(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function T(e){var t=this instanceof(i=i||r(6753));if(!t&&!h.call(T,this))return new T(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function x(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)s[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;s.allBuffers=u,x(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,c=r.callback;if(x(e,t,!1,t.objectMode?1:h.length,h,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function j(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function N(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=j(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(N,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(T,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===T&&(e&&e._writableState instanceof S)}})):h=function(e){return e instanceof this},T.prototype.pipe=function(){v(this,new g)},T.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,o.isBuffer(n)||n instanceof u);return a&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new m;v(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new _:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(v(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else x(e,t,!1,u,n,i,s);return h}(this,i,a,e,t,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new p("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(8610),a=Symbol("lastResolve"),o=Symbol("lastReject"),u=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[f].read();null!==r&&(e[l]=null,e[a]=null,e[o]=null,t(d(r,!1)))}}function b(e){process.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(d(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(y,(i(t={},f,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,h,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[a]=null,r[o]=null,e(d(n,!1))):(r[a]=e,r[o]=t)},writable:!0}),t));return r[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[o];return null!==t&&(r[l]=null,r[a]=null,r[o]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[o]=null,n(d(void 0,!0))),r[h]=!0})),e.on("readable",b.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(8764).Buffer,o=r(2361).inspect,u=o&&o.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,h;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,a.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&s(t.prototype,r),h&&s(t,h),e}()},1195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var s=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?s._writableState?s._writableState.errorEmitted?process.nextTick(r,s):(s._writableState.errorEmitted=!0,process.nextTick(t,s,e)):process.nextTick(t,s,e):i?(process.nextTick(r,s),i(e)):process.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var a=r.readable||!1!==r.readable&&t.readable,o=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},h=t._writableState&&t._writableState.finished,l=function(){o=!1,h=!0,a||s.call(t)},c=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,c=!0,o||s.call(t)},d=function(e){s.call(t,e)},p=function(){var e;return a&&!c?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):o&&!h?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},b=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?o&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?b():t.on("request",b)),t.on("end",f),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",f),t.removeListener("error",d),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n;var i=r(4281).q,s=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function u(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var o=!1;e.on("close",(function(){o=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return s(e);o=!0,s()}));var u=!1;return function(t){if(!o&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new a("pipe"))}}function h(e){e()}function l(e,t){return e.pipe(t)}function c(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var a=t.map((function(e,r){var s=r<t.length-1;return u(e,s,r>0,(function(e){n||(n=e),e&&a.forEach(h),s||(a.forEach(h),i(n))}))}));return t.reduce(l)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725),t.finished=r(8610),t.pipeline=r(9946)},6650:(e,t,r)=>{const{finished:n,Readable:i}=r(8473);class ReadableToReadable extends i{constructor(e,{end:t=!0,map:r,...n}={}){super({read:ReadableToReadable.readFrom(e,{end:t,map:r}),...n})}static readFrom(e,{end:t=!0,map:r=(e=>e)}={}){let i=!1;n(e,(()=>{i=!0}));return async function(){for(;;){const n=e.read();if(n){if(!this.push(r(n)))return!1}else{if(i&&t&&this.push(null),i)return!0;await new Promise((e=>setTimeout(e,0)))}}}}}e.exports=ReadableToReadable},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2044:(e,t,r)=>{const{promisify:n}=r(6028),{PassThrough:i,Writable:s}=r(8473);e.exports=class SeparateStream extends s{constructor({change:e=(()=>{}),map:t=(e=>e),split:r=(()=>!1)}={}){super({objectMode:!0}),this.change=e,this.map=t,this.split=r,this.output=null}async _write(e,t,r){try{let t=!1;this.output?this.split(e)&&(await this._endOutput(),t=!0):t=!0,t&&(this.output=new i({objectMode:!0}),await this.change(this.output,e)),this.output.write(this.map(e),null,r)}catch(e){r(e)}}async _final(e){this.output&&await this._endOutput(),e()}async _endOutput(){return n(this.output.end.bind(this.output))()}}},4317:e=>{e.exports=class BaseClient{constructor({endpoint:e,Query:t,Store:r,factory:n,...i}){this.query=t?new t({endpoint:e,factory:n,...i}):null,this.store=r?new r({endpoint:e,factory:n,...i}):null}}},9846:(e,t,r)=>{const n=r(8952);e.exports=class Endpoint{constructor({endpointUrl:e,fetch:t,headers:r,password:i,storeUrl:s,updateUrl:a,user:o}){this.endpointUrl=e,this.fetch=t||n,this.headers=new this.fetch.Headers(r),this.storeUrl=s,this.updateUrl=a,"string"==typeof o&&"string"==typeof i&&this.headers.set("authorization","Basic "+Buffer.from(`${o}:${i}`).toString("base64"))}async get(e,{headers:t,update:r=!1}={}){let n=null;return r?(n=new URL(this.updateUrl),n.searchParams.append("update",e)):(n=new URL(this.endpointUrl),n.searchParams.append("query",e)),this.fetch(n.toString().replace(/\+/g,"%20"),{method:"GET",headers:this.mergeHeaders(t)})}async postDirect(e,{headers:t,update:r=!1}={}){let n=null;return n=r?new URL(this.updateUrl):new URL(this.endpointUrl),(t=this.mergeHeaders(t)).has("content-type")||t.set("content-type","application/sparql-query; charset=utf-8"),this.fetch(n,{method:"POST",headers:t,body:e})}async postUrlencoded(e,{headers:t,update:r=!1}={}){let n=null,i=null;return r?(n=new URL(this.updateUrl),i="update="+encodeURIComponent(e)):(n=new URL(this.endpointUrl),i="query="+encodeURIComponent(e)),(t=this.mergeHeaders(t)).has("content-type")||t.set("content-type","application/x-www-form-urlencoded"),this.fetch(n,{method:"POST",headers:t,body:i})}mergeHeaders(e={}){const t=new this.fetch.Headers;for(const[e,r]of this.headers)t.set(e,r);for(const[r,n]of new this.fetch.Headers(e))t.set(r,n);return t}}},3952:e=>{e.exports=class RawQuery{constructor({endpoint:e}){this.endpoint=e}async ask(e,{headers:t,operation:r="get"}={}){return(t=this.endpoint.mergeHeaders(t)).has("accept")||t.set("accept","application/sparql-results+json"),this.endpoint[r](e,{headers:t})}async construct(e,{headers:t,operation:r="get"}={}){return(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","application/n-triples"),this.endpoint[r](e,{headers:t})}async select(e,{headers:t,operation:r="get"}={}){return(t=this.endpoint.mergeHeaders(t)).has("accept")||t.set("accept","application/sparql-results+json"),this.endpoint[r](e,{headers:t})}async update(e,{headers:t,operation:r="postUrlencoded"}={}){return(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","*/*"),this.endpoint[r](e,{headers:t,update:!0})}}},5912:(e,t,r)=>{const n=r(6176),i=r(6654),s=r(8825),{Duplex:a,finished:o}=r(8473);e.exports=class ResultParser extends a{constructor({factory:e=s}={}){super({readableObjectMode:!0}),this.factory=e,this.jsonParser=n.parse("results.bindings.*"),o(this.jsonParser,(e=>{this.destroy(e)}))}_write(e,t,r){this.jsonParser.write(e,t,r)}async _read(){const e=this.jsonParser.read();if(e&&0!==Object.keys(e).length){const t=Object.entries(e).reduce(((e,[t,r])=>(e[t]=this.valueToTerm(r),e)),{});if(!this.push(t))return}else{if(!this.writable)return this.push(null);await i(0)}this._read()}valueToTerm(e){if("uri"===e.type)return this.factory.namedNode(e.value);if("bnode"===e.type)return this.factory.blankNode(e.value);if("literal"===e.type||"typed-literal"===e.type){const t=e.datatype&&this.factory.namedNode(e.datatype);return this.factory.literal(e.value,t||e["xml:lang"])}return null}}},4913:(e,t,r)=>{const n=r(4317),i=r(9846),s=r(6740),a=r(8516);e.exports=class StreamClient extends n{constructor(e){super({endpoint:new i(e),factory:e.factory,Query:s,Store:a,...e})}}},6740:(e,t,r)=>{const n=r(8825),i=r(2919),s=r(1279),a=r(3952),o=r(5912);e.exports=class StreamQuery extends a{constructor({endpoint:e,factory:t=n}){super({endpoint:e}),this.factory=t}async ask(e,{headers:t,operation:r}={}){const n=await super.ask(e,{headers:t,operation:r});await s(n);return(await n.json()).boolean}async construct(e,{headers:t,operation:r}={}){(t=new this.endpoint.fetch.Headers(t)).has("accept")||t.set("accept","application/n-triples, text/turtle");const n=await super.construct(e,{headers:t,operation:r});await s(n);return new i({factory:this.factory}).import(n.body)}async select(e,{headers:t,operation:r}={}){const n=await super.select(e,{headers:t,operation:r});await s(n);const i=new o({factory:this.factory});return n.body.pipe(i)}async update(e,{headers:t,operation:r}={}){const n=await super.update(e,{headers:t,operation:r});await s(n)}}},8516:(e,t,r)=>{const{promisify:n}=r(7298),i=r(8850),s=r(8825),a=r(2919),{finished:o}=r(8473),u=r(1279),h=r(8884);e.exports=class StreamStore{constructor({endpoint:e,factory:t=s,maxQuadsPerRequest:r}){this.endpoint=e,this.factory=t,this.maxQuadsPerRequest=r}async get(e){return this.read({method:"GET",graph:e})}async post(e){return this.write({method:"POST",stream:e})}async put(e){return this.write({firstMethod:"PUT",method:"POST",stream:e})}async read({method:e,graph:t}){const r=new URL(this.endpoint.storeUrl);return"DefaultGraph"!==t.termType&&r.searchParams.append("graph",t.value),this.endpoint.fetch(r,{method:e,headers:this.endpoint.mergeHeaders({accept:"application/n-triples"})}).then((async e=>{await u(e);const r=new a({factory:this.factory}),n=new i(t,{factory:this.factory});return r.import(e.body).pipe(n)}))}async write({firstMethod:e,method:t,stream:r}){const i=new Set;let s=null;const a=new h({maxQuadsPerStream:this.maxQuadsPerRequest,change:async r=>{s&&await s;const n=i.has(a.graph.value)?t:e||t;s=this.writeRequest(n,a.graph,r),i.add(a.graph.value)}});r.pipe(a),await n(o)(a),await s}writeRequest(e,t,r){const n=new URL(this.endpoint.storeUrl);return"DefaultGraph"!==t.termType&&n.searchParams.append("graph",t.value),this.endpoint.fetch(n,{method:e,headers:this.endpoint.mergeHeaders({"content-type":"application/n-triples"}),body:r}).then((async e=>{await u(e)}))}}},7562:(e,t,r)=>{const n=r(4913);e.exports=n},8884:(e,t,r)=>{const n=r(8825),{quadToNTriples:i}=r(6083),s=r(2044);e.exports=class QuadStreamSeparator extends s{constructor({change:e,maxQuadsPerStream:t=1/0}){super({change:async(t,r)=>(this.graph=r.graph,e(t)),map:e=>i(n.quad(e.subject,e.predicate,e.object))+"\n",split:e=>(this.count++,this.count>=t?(this.count=0,!0):!e.graph.equals(this.graph))}),this.count=0,this.graph=null}}},1279:e=>{e.exports=async function(e){if(e.ok)return;const t=await e.text(),r=new Error(`${e.statusText} (${e.status}): ${t}`);throw r.status=e.status,r}},4404:e=>{function t(e){this._options=e=e||{};var t=e.prefixes||{};this._prefixByIri={};var r=[];for(var n in t){var i=t[n];a(i)&&(this._prefixByIri[i]=n,r.push(i))}var s=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=a(e.indent)?e.indent:" ",this._newline=a(e.newline)?e.newline:"\n",this._explicitDatatype=Boolean(e.explicitDatatype)}t.prototype.toQuery=function(e){var t="";return e.queryType&&(t+=e.queryType.toUpperCase()+" "),e.reduced&&(t+="REDUCED "),e.distinct&&(t+="DISTINCT "),e.variables?t+=h(e.variables,void 0,(function(e){return o(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+s(e.variable)+")"}),this)+" ":e.template&&(t+=this.group(e.template,!0)+this._newline),e.from&&(t+=this.graphs("FROM ",e.from.default)+this.graphs("FROM NAMED ",e.from.named)),e.where&&(t+="WHERE "+this.group(e.where,!0)+this._newline),e.updates&&(t+=h(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+h(e.group,void 0,(function(e){var t=o(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+s(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+h(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+h(e.order,void 0,(function(e){var t="("+this.toExpression(e.expression)+")";return e.descending?"DESC "+t:t}),this)+this._newline),e.offset&&(t+="OFFSET "+e.offset+this._newline),e.limit&&(t+="LIMIT "+e.limit+this._newline),e.values&&(t+=this.values(e)),(t=this.baseAndPrefixes(e)+t).trim()},t.prototype.baseAndPrefixes=function(e){var t=e.base?"BASE <"+e.base+">"+this._newline:"",r="";for(var n in e.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+e.prefixes[n]+">"+this._newline);return t+r},t.prototype.toPattern=function(e){var t=e.type||e instanceof Array&&"array"||(e.subject&&e.predicate&&e.object?"triple":"");if(!(t in this))throw new Error("Unknown entry type: "+t);return this[t](e)},t.prototype.triple=function(e){return this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+"."},t.prototype.array=function(e){return h(e,this._newline,this.toPattern,this)},t.prototype.bgp=function(e){return this.encodeTriples(e.triples)},t.prototype.encodeTriples=function(e){if(!e.length)return"";for(var t=[],r=void 0,n=void 0,i=0;i<e.length;i++){var s=e[i];u(s.subject,r)?u(s.predicate,n)?t.push(","):(n=s.predicate,t.push(";"+this._newline,this._indent,this.toEntity(n))):(r&&t.push("."+this._newline),r=s.subject,n=s.predicate,t.push(this.toEntity(r)," ",this.toEntity(n))),t.push(" ",this.toEntity(s.object))}return t.push("."),t.join("")},t.prototype.graph=function(e){return"GRAPH "+this.toEntity(e.name)+" "+this.group(e)},t.prototype.graphs=function(e,t){return t&&0!==t.length?h(t,"",(function(t){return e+this.toEntity(t)+this._newline}),this):""},t.prototype.group=function(e,t){return-1===(e=!0!==t?this.array(e.patterns||e.triples):this.toPattern("group"!==e.type?e:e.patterns)).indexOf(this._newline)?"{ "+e+" }":"{"+this._newline+this.indent(e)+this._newline+"}"},t.prototype.query=function(e){return this.toQuery(e)},t.prototype.filter=function(e){return"FILTER("+this.toExpression(e.expression)+")"},t.prototype.bind=function(e){return"BIND("+this.toExpression(e.expression)+" AS "+s(e.variable)+")"},t.prototype.optional=function(e){return"OPTIONAL "+this.group(e)},t.prototype.union=function(e){return h(e.patterns,this._newline+"UNION"+this._newline,(function(e){return this.group(e,!0)}),this)},t.prototype.minus=function(e){return"MINUS "+this.group(e)},t.prototype.values=function(e){var t,r,n=Object.keys(e.values.reduce((function(e,t){for(var r in t)e[r]=!0;return e}),{}));return 1===n.length?t=r="":(t="(",r=")"),"VALUES "+t+n.join(" ")+r+" {"+this._newline+h(e.values,this._newline,(function(e){return" "+t+h(n,void 0,(function(t){return e[t]?this.toEntity(e[t]):"UNDEF"}),this)+r}),this)+this._newline+"}"},t.prototype.service=function(e){return"SERVICE "+(e.silent?"SILENT ":"")+this.toEntity(e.name)+" "+this.group(e)},t.prototype.toExpression=function(e){if(o(e))return this.toEntity(e);switch(e.type.toLowerCase()){case"aggregate":return e.aggregation.toUpperCase()+"("+(e.distinct?"DISTINCT ":"")+this.toExpression(e.expression)+(e.separator?'; SEPARATOR = "'+e.separator.replace(r,n)+'"':"")+")";case"functioncall":return this.toEntity(e.function)+"("+h(e.args,", ",this.toExpression,this)+")";case"operation":var t=e.operator.toUpperCase(),i=e.args||[];switch(e.operator.toLowerCase()){case"<":case">":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(o(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(o(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uminus":return"-("+this.toExpression(i[0])+")";case"notin":t="NOT IN";case"in":return this.toExpression(i[0])+" "+t+"("+(a(i[1])?i[1]:h(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+h(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(o(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return s(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",a=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(a){if(!this._explicitDatatype)switch(a.value){case"http://www.w3.org/2001/XMLSchema#string":return e;case"http://www.w3.org/2001/XMLSchema#integer":if(/^\d+$/.test(t))return t+" "}e+="^^"+this.encodeIRI(a.value)}return e;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return e.graph&&"DefaultGraph"!==e.graph.termType?"<< GRAPH "+this.toEntity(e.graph)+" { "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" } >>":"<< "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" >>";default:return this.encodeIRI(e.value)}else{var u=e.items.map(this.toEntity,this),h=e.pathType;switch(h){case"^":case"!":return h+u[0];case"*":case"+":case"?":return"("+u[0]+h+")";default:return"("+u.join(h)+")"}}};var r=/["\\\t\n\r\b\f]/g,n=function(e){return i[e]},i={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function s(e){return"?"+e.value}function a(e){return"string"==typeof e}function o(e){return"string"==typeof e.termType}function u(e,t){if(!e||!o(e))return!1;if(!t||!o(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&u(e.datatype,t.datatype);case"Quad":return u(e.subject,t.subject)&&u(e.predicate,t.predicate)&&u(e.object,t.object)&&u(e.graph,t.graph);default:return e.value===t.value}}function h(e,t,r,n){return e.map(r,n).join(a(t)?t:" ")}t.prototype.encodeIRI=function(e){var t=this._prefixRegex.exec(e);if(t){var r=this._prefixByIri[t[1]];return this._usedPrefixes[r]=!0,r+":"+t[2]}return"<"+e+">"},t.prototype.toUpdate=function(e){switch(e.type||e.updateType){case"load":return"LOAD"+(e.source?" "+this.toEntity(e.source):"")+(e.destination?" INTO GRAPH "+this.toEntity(e.destination):"");case"insert":return"INSERT DATA "+this.group(e.insert,!0);case"delete":return"DELETE DATA "+this.group(e.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(e.delete,!0);case"insertdelete":return(e.graph?"WITH "+this.toEntity(e.graph)+this._newline:"")+(e.delete.length?"DELETE "+this.group(e.delete,!0)+this._newline:"")+(e.insert.length?"INSERT "+this.group(e.insert,!0)+this._newline:"")+(e.using?this.graphs("USING ",e.using.default):"")+(e.using?this.graphs("USING NAMED ",e.using.named):"")+"WHERE "+this.group(e.where,!0);case"add":case"copy":case"move":return e.type.toUpperCase()+(e.source.default?" DEFAULT ":" ")+"TO "+this.toEntity(e.destination.name);case"create":case"clear":case"drop":return e.type.toUpperCase()+(e.silent?" SILENT ":" ")+(e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.all?"ALL":"GRAPH "+this.toEntity(e.graph.name));default:throw new Error("Unknown update query type: "+e.type)}},t.prototype.indent=function(e){return e.replace(/^/gm,this._indent)},e.exports=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new t(n).toQuery(r)},createGenerator:function(){return new t(e)}}}},7107:(e,t,r)=>{e=r.nmd(e);var n=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[6,12,15,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],n=[2,209],i=[107,117,120,122,123,132,133,138,322,323,324,325,326],s=[1,20],a=[1,29],o=[6,90],u=[45,46,58],h=[45,58],l=[1,58],c=[1,60],f=[1,56],d=[1,59],p=[1,65],b=[1,66],g=[26,34,35],y=[13,16,312],_=[119,141,320,327],m=[13,16,119,141,312],w=[1,88],v=[1,92],E=[1,94],S=[119,141,320,321,327],T=[13,16,119,141,312,321],x=[1,100],k=[2,251],R=[1,99],j=[13,16,34,35,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],N=[6,45,46,58,68,75,78,86,88,90],A=[6,13,16,34,45,46,58,68,75,78,86,88,90,312],F=[6,13,16,26,34,35,37,38,45,46,48,58,68,75,78,86,87,88,90,93,100,116,119,132,133,135,140,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,330,331,333,334,335,336,337,338,339,340],O=[34,35,45,46,58],L=[13,16,34,35,87,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,340,341,342,343,344,345],I=[2,454],P=[1,123],D=[1,117],C=[1,124],B=[1,125],M=[6,13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],U=[2,310],$=[1,142],q=[1,140],G=[6,191],z=[2,327],W=[2,315],Q=[45,135],H=[6,48,78,86,88,90],V=[2,255],Z=[1,156],Y=[1,158],X=[6,48,75,78,86,88,90],K=[2,253],J=[1,164],ee=[1,176],te=[1,174],re=[1,184],ne=[1,182],ie=[1,175],se=[1,180],ae=[1,181],oe=[1,185],ue=[1,186],he=[1,189],le=[1,190],ce=[1,191],fe=[1,192],de=[1,193],pe=[1,194],be=[1,195],ge=[1,196],ye=[1,197],_e=[1,198],me=[1,199],we=[6,68,75,78,86,88,90],ve=[37,38,191,250,278],Ee=[37,38,191,250,254,278],Se=[37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,334,335,336,337,338,339,340],Te=[26,37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,331,334,335,336,337,338,339,340],xe=[1,229],ke=[1,230],Re=[1,232],je=[1,233],Ne=[1,234],Ae=[1,235],Fe=[1,237],Oe=[1,238],Le=[2,461],Ie=[1,240],Pe=[1,241],De=[1,242],Ce=[1,248],Be=[1,243],Me=[1,244],Ue=[1,245],$e=[1,246],qe=[1,247],Ge=[13,16,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],ze=[48,93],We=[34,38],Qe=[6,116,191],He=[48,119],Ve=[6,48,86,88,90],Ze=[2,339],Ye=[2,331],Xe=[1,293],Ke=[1,295],Je=[48,119,328],et=[13,16,34,195,312],tt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],rt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],nt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],it=[13,16,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],st=[1,329],at=[1,330],ot=[1,332],ut=[1,331],ht=[6,13,16,26,34,35,37,38,46,48,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],lt=[1,340],ct=[1,339],ft=[35,93],dt=[1,353],pt=[1,354],bt=[1,367],gt=[6,48,90],yt=[6,13,16,35,48,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],_t=[6,13,16,34,35,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,226,231,245,246,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,340,341,342,343,344,345],mt=[46,48,90,119,167,168,170,173,174],wt=[1,386],vt=[1,387],Et=[1,393],St=[1,392],Tt=[48,119,191,227,328],xt=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],kt=[13,16,34,35,38,48,87,93,119,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Rt=[13,16,26,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],jt=[13,16,38,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Nt=[35,48],At=[2,330],Ft=[1,451],Ot=[1,448],Lt=[1,449],It=[6,13,16,26,34,35,37,38,46,48,68,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,329,331,334,335,336,337,338,339,340,341,342,343,344,345],Pt=[13,16,35,195,219,224,312],Dt=[2,387],Ct=[1,469],Bt=[46,48,90,119,167,168,170,173,174,328],Mt=[13,16,34,35,195,219,224,312],Ut=[6,13,16,34,35,48,75,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],$t=[13,16,34,35,38,48,87,93,119,191,195,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],qt=[6,13,16,34,35,48,81,83,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],Gt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],zt=[13,16,34,312],Wt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Qt=[2,342],Ht=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Vt=[13,16,34,35,37,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Zt=[2,337],Yt=[13,16,35,195,219,312],Xt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Kt=[13,16,38,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Jt=[46,48,90,119,167,168,170,173,174,191,227,328],er=[13,16,34,38,48,87,100,195,231,235,299,300,301,302,303,304,305,306,307,308,309,310,311,312],tr=[13,16,34,35,48,87,93,119,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],rr=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331],nr=[13,16,26,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331,333,334],ir=[1,630],sr=[1,631],ar=[2,325],or=[13,16,38,195,224,312],ur={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Prologue_repetition0:7,Query:8,Query_group0:9,Query_option0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectQuery:17,SelectClauseWildcard:18,SelectQuery_repetition0:19,WhereClause:20,SolutionModifierNoGroup:21,SelectClauseVars:22,SelectQuery_repetition1:23,SolutionModifier:24,SelectClauseBase:25,"*":26,SelectClauseVars_repetition_plus0:27,SELECT:28,SelectClauseBase_option0:29,SubSelect:30,SubSelect_option0:31,SubSelect_option1:32,SelectClauseItem:33,VAR:34,"(":35,Expression:36,AS:37,")":38,VarTriple:39,ConstructQuery:40,CONSTRUCT:41,ConstructTemplate:42,ConstructQuery_repetition0:43,ConstructQuery_repetition1:44,WHERE:45,"{":46,ConstructQuery_option0:47,"}":48,DescribeQuery:49,DESCRIBE:50,DescribeQuery_group0:51,DescribeQuery_repetition0:52,DescribeQuery_option0:53,AskQuery:54,ASK:55,AskQuery_repetition0:56,DatasetClause:57,FROM:58,DatasetClause_option0:59,iri:60,WhereClause_option0:61,GroupGraphPattern:62,SolutionModifier_option0:63,SolutionModifierNoGroup_option0:64,SolutionModifierNoGroup_option1:65,SolutionModifierNoGroup_option2:66,GroupClause:67,GROUP:68,BY:69,GroupClause_repetition_plus0:70,GroupCondition:71,BuiltInCall:72,FunctionCall:73,HavingClause:74,HAVING:75,HavingClause_repetition_plus0:76,OrderClause:77,ORDER:78,OrderClause_repetition_plus0:79,OrderCondition:80,ASC:81,BrackettedExpression:82,DESC:83,Constraint:84,LimitOffsetClauses:85,LIMIT:86,INTEGER:87,OFFSET:88,ValuesClause:89,VALUES:90,InlineData:91,InlineData_repetition0:92,NIL:93,InlineData_repetition1:94,InlineData_repetition_plus2:95,InlineData_repetition3:96,DataBlockValue:97,Literal:98,ConstTriple:99,UNDEF:100,DataBlockValueList:101,DataBlockValueList_repetition_plus0:102,Update:103,Update_repetition0:104,Update1:105,Update_option0:106,LOAD:107,Update1_option0:108,Update1_option1:109,Update1_group0:110,Update1_option2:111,GraphRefAll:112,Update1_group1:113,Update1_option3:114,GraphOrDefault:115,TO:116,CREATE:117,Update1_option4:118,GRAPH:119,INSERTDATA:120,QuadPattern:121,DELETEDATA:122,DELETEWHERE:123,Update1_option5:124,InsertClause:125,Update1_option6:126,Update1_repetition0:127,Update1_option7:128,DeleteClause:129,Update1_option8:130,Update1_repetition1:131,DELETE:132,INSERT:133,UsingClause:134,USING:135,UsingClause_option0:136,WithClause:137,WITH:138,IntoGraphClause:139,INTO:140,DEFAULT:141,GraphOrDefault_option0:142,GraphRefAll_group0:143,QuadPattern_option0:144,QuadPattern_repetition0:145,QuadsNotTriples:146,QuadsNotTriples_group0:147,QuadsNotTriples_option0:148,QuadsNotTriples_option1:149,QuadsNotTriples_option2:150,TriplesTemplate:151,TriplesTemplate_repetition0:152,TriplesSameSubject:153,TriplesTemplate_option0:154,GroupGraphPatternSub:155,GroupGraphPatternSub_option0:156,GroupGraphPatternSub_repetition0:157,GroupGraphPatternSubTail:158,GraphPatternNotTriples:159,GroupGraphPatternSubTail_option0:160,GroupGraphPatternSubTail_option1:161,TriplesBlock:162,TriplesBlock_repetition0:163,TriplesSameSubjectPath:164,TriplesBlock_option0:165,GraphPatternNotTriples_repetition0:166,OPTIONAL:167,MINUS:168,GraphPatternNotTriples_group0:169,SERVICE:170,GraphPatternNotTriples_option0:171,GraphPatternNotTriples_group1:172,FILTER:173,BIND:174,FunctionCall_option0:175,FunctionCall_repetition0:176,ExpressionList:177,ExpressionList_repetition0:178,ConstructTemplate_option0:179,ConstructTriples:180,ConstructTriples_repetition0:181,ConstructTriples_option0:182,TriplesSameSubject_group0:183,PropertyListNotEmpty:184,TriplesNode:185,PropertyList:186,PropertyList_option0:187,VerbObjectList:188,PropertyListNotEmpty_repetition0:189,SemiOptionalVerbObjectList:190,";":191,SemiOptionalVerbObjectList_option0:192,Verb:193,ObjectList:194,a:195,ObjectList_repetition0:196,GraphNode:197,ObjectListPath:198,ObjectListPath_repetition0:199,GraphNodePath:200,TriplesSameSubjectPath_group0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,PropertyListPathNotEmpty_group0:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmpty_repetition1:207,PropertyListPathNotEmptyTail:208,PropertyListPathNotEmptyTail_group0:209,Path:210,Path_repetition0:211,PathSequence:212,PathSequence_repetition0:213,PathEltOrInverse:214,PathElt:215,PathPrimary:216,PathElt_option0:217,PathEltOrInverse_option0:218,"!":219,PathNegatedPropertySet:220,PathOneInPropertySet:221,PathNegatedPropertySet_repetition0:222,PathNegatedPropertySet_option0:223,"^":224,TriplesNode_repetition_plus0:225,"[":226,"]":227,TriplesNodePath_repetition_plus0:228,GraphNode_group0:229,GraphNodePath_group0:230,"<<":231,VarTriple_group0:232,VarTriple_group1:233,VarTriple_group2:234,">>":235,VarTriple_group3:236,VarTriple_group4:237,ConstTriple_group0:238,ConstTriple_group1:239,ConstTriple_group2:240,ConstTriple_group3:241,ConstTriple_group4:242,VarOrTerm:243,Term:244,BLANK_NODE_LABEL:245,ANON:246,ConditionalAndExpression:247,Expression_repetition0:248,ExpressionTail:249,"||":250,RelationalExpression:251,ConditionalAndExpression_repetition0:252,ConditionalAndExpressionTail:253,"&&":254,AdditiveExpression:255,RelationalExpression_group0:256,RelationalExpression_option0:257,IN:258,MultiplicativeExpression:259,AdditiveExpression_repetition0:260,AdditiveExpressionTail:261,AdditiveExpressionTail_group0:262,NumericLiteralPositive:263,AdditiveExpressionTail_repetition0:264,NumericLiteralNegative:265,AdditiveExpressionTail_repetition1:266,UnaryExpression:267,MultiplicativeExpression_repetition0:268,MultiplicativeExpressionTail:269,MultiplicativeExpressionTail_group0:270,UnaryExpression_option0:271,PrimaryExpression:272,"-":273,Aggregate:274,FUNC_ARITY0:275,FUNC_ARITY1:276,FUNC_ARITY2:277,",":278,IF:279,BuiltInCall_group0:280,BOUND:281,BNODE:282,BuiltInCall_option0:283,EXISTS:284,COUNT:285,Aggregate_option0:286,Aggregate_group0:287,FUNC_AGGREGATE:288,Aggregate_option1:289,GROUP_CONCAT:290,Aggregate_option2:291,Aggregate_option3:292,GroupConcatSeparator:293,SEPARATOR:294,"=":295,String:296,LANGTAG:297,"^^":298,DECIMAL:299,DOUBLE:300,BOOLEAN:301,STRING_LITERAL1:302,STRING_LITERAL2:303,STRING_LITERAL_LONG1:304,STRING_LITERAL_LONG2:305,INTEGER_POSITIVE:306,DECIMAL_POSITIVE:307,DOUBLE_POSITIVE:308,INTEGER_NEGATIVE:309,DECIMAL_NEGATIVE:310,DOUBLE_NEGATIVE:311,PNAME_LN:312,QueryOrUpdate_group0_option0:313,Prologue_repetition0_group0:314,SelectClauseBase_option0_group0:315,DISTINCT:316,REDUCED:317,DescribeQuery_group0_repetition_plus0_group0:318,DescribeQuery_group0_repetition_plus0:319,NAMED:320,SILENT:321,CLEAR:322,DROP:323,ADD:324,MOVE:325,COPY:326,ALL:327,".":328,UNION:329,"|":330,"/":331,PathElt_option0_group0:332,"?":333,"+":334,"!=":335,"<":336,">":337,"<=":338,">=":339,NOT:340,CONCAT:341,COALESCE:342,SUBSTR:343,REGEX:344,REPLACE:345,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",26:"*",28:"SELECT",34:"VAR",35:"(",37:"AS",38:")",41:"CONSTRUCT",45:"WHERE",46:"{",48:"}",50:"DESCRIBE",55:"ASK",58:"FROM",68:"GROUP",69:"BY",75:"HAVING",78:"ORDER",81:"ASC",83:"DESC",86:"LIMIT",87:"INTEGER",88:"OFFSET",90:"VALUES",93:"NIL",100:"UNDEF",107:"LOAD",116:"TO",117:"CREATE",119:"GRAPH",120:"INSERTDATA",122:"DELETEDATA",123:"DELETEWHERE",132:"DELETE",133:"INSERT",135:"USING",138:"WITH",140:"INTO",141:"DEFAULT",167:"OPTIONAL",168:"MINUS",170:"SERVICE",173:"FILTER",174:"BIND",191:";",195:"a",219:"!",224:"^",226:"[",227:"]",231:"<<",235:">>",245:"BLANK_NODE_LABEL",246:"ANON",250:"||",254:"&&",258:"IN",273:"-",275:"FUNC_ARITY0",276:"FUNC_ARITY1",277:"FUNC_ARITY2",278:",",279:"IF",281:"BOUND",282:"BNODE",284:"EXISTS",285:"COUNT",288:"FUNC_AGGREGATE",290:"GROUP_CONCAT",294:"SEPARATOR",295:"=",297:"LANGTAG",298:"^^",299:"DECIMAL",300:"DOUBLE",301:"BOOLEAN",302:"STRING_LITERAL1",303:"STRING_LITERAL2",304:"STRING_LITERAL_LONG1",305:"STRING_LITERAL_LONG2",306:"INTEGER_POSITIVE",307:"DECIMAL_POSITIVE",308:"DOUBLE_POSITIVE",309:"INTEGER_NEGATIVE",310:"DECIMAL_NEGATIVE",311:"DOUBLE_NEGATIVE",312:"PNAME_LN",316:"DISTINCT",317:"REDUCED",320:"NAMED",321:"SILENT",322:"CLEAR",323:"DROP",324:"ADD",325:"MOVE",326:"COPY",327:"ALL",328:".",329:"UNION",330:"|",331:"/",333:"?",334:"+",335:"!=",336:"<",337:">",338:"<=",339:">=",340:"NOT",341:"CONCAT",342:"COALESCE",343:"SUBSTR",344:"REGEX",345:"REPLACE"},productions_:[0,[3,3],[4,1],[8,2],[11,2],[14,3],[17,4],[17,4],[18,2],[22,2],[25,2],[30,4],[30,4],[33,1],[33,5],[33,5],[40,5],[40,7],[49,5],[54,4],[57,3],[20,2],[24,2],[21,3],[67,3],[71,1],[71,1],[71,3],[71,5],[71,1],[74,2],[77,3],[80,2],[80,2],[80,1],[80,1],[85,2],[85,2],[85,4],[85,4],[89,2],[91,4],[91,4],[91,6],[97,1],[97,1],[97,1],[97,1],[101,3],[103,3],[105,4],[105,3],[105,5],[105,4],[105,2],[105,2],[105,2],[105,6],[105,6],[129,2],[125,2],[134,3],[137,2],[139,3],[115,1],[115,2],[112,2],[112,1],[121,4],[146,7],[151,3],[62,3],[62,3],[155,2],[158,3],[162,3],[159,2],[159,2],[159,2],[159,3],[159,4],[159,2],[159,6],[159,6],[159,1],[84,1],[84,1],[84,1],[73,2],[73,6],[177,1],[177,4],[42,3],[180,3],[153,2],[153,2],[186,1],[184,2],[190,2],[188,2],[193,1],[193,1],[193,1],[194,2],[198,2],[164,2],[164,2],[202,4],[208,1],[208,3],[210,2],[212,2],[215,2],[214,2],[216,1],[216,1],[216,2],[216,3],[220,1],[220,1],[220,4],[221,1],[221,1],[221,2],[221,2],[185,3],[185,3],[203,3],[203,3],[197,1],[197,1],[200,1],[200,1],[39,9],[39,5],[99,9],[99,5],[243,1],[243,1],[244,1],[244,1],[244,1],[244,1],[244,1],[36,2],[249,2],[247,2],[253,2],[251,1],[251,3],[251,4],[255,2],[261,2],[261,2],[261,2],[259,2],[269,2],[267,2],[267,2],[267,2],[272,1],[272,1],[272,1],[272,1],[272,1],[272,1],[82,3],[72,1],[72,2],[72,4],[72,6],[72,8],[72,2],[72,4],[72,2],[72,4],[72,3],[274,5],[274,5],[274,6],[293,4],[98,1],[98,2],[98,3],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[296,1],[296,1],[296,1],[296,1],[263,1],[263,1],[263,1],[265,1],[265,1],[265,1],[60,1],[60,1],[60,1],[313,0],[313,1],[5,1],[5,1],[314,1],[314,1],[7,0],[7,2],[9,1],[9,1],[9,1],[9,1],[10,0],[10,1],[19,0],[19,2],[23,0],[23,2],[27,1],[27,2],[315,1],[315,1],[29,0],[29,1],[31,0],[31,1],[32,0],[32,1],[43,0],[43,2],[44,0],[44,2],[47,0],[47,1],[318,1],[318,1],[319,1],[319,2],[51,1],[51,1],[52,0],[52,2],[53,0],[53,1],[56,0],[56,2],[59,0],[59,1],[61,0],[61,1],[63,0],[63,1],[64,0],[64,1],[65,0],[65,1],[66,0],[66,1],[70,1],[70,2],[76,1],[76,2],[79,1],[79,2],[92,0],[92,2],[94,0],[94,2],[95,1],[95,2],[96,0],[96,2],[102,1],[102,2],[104,0],[104,4],[106,0],[106,2],[108,0],[108,1],[109,0],[109,1],[110,1],[110,1],[111,0],[111,1],[113,1],[113,1],[113,1],[114,0],[114,1],[118,0],[118,1],[124,0],[124,1],[126,0],[126,1],[127,0],[127,2],[128,0],[128,1],[130,0],[130,1],[131,0],[131,2],[136,0],[136,1],[142,0],[142,1],[143,1],[143,1],[143,1],[144,0],[144,1],[145,0],[145,2],[147,1],[147,1],[148,0],[148,1],[149,0],[149,1],[150,0],[150,1],[152,0],[152,3],[154,0],[154,1],[156,0],[156,1],[157,0],[157,2],[160,0],[160,1],[161,0],[161,1],[163,0],[163,3],[165,0],[165,1],[166,0],[166,3],[169,1],[169,1],[171,0],[171,1],[172,1],[172,1],[175,0],[175,1],[176,0],[176,3],[178,0],[178,3],[179,0],[179,1],[181,0],[181,3],[182,0],[182,1],[183,1],[183,1],[187,0],[187,1],[189,0],[189,2],[192,0],[192,1],[196,0],[196,3],[199,0],[199,3],[201,1],[201,1],[204,0],[204,1],[205,1],[205,1],[206,0],[206,3],[207,0],[207,2],[209,1],[209,1],[211,0],[211,3],[213,0],[213,3],[332,1],[332,1],[332,1],[217,0],[217,1],[218,0],[218,1],[222,0],[222,3],[223,0],[223,1],[225,1],[225,2],[228,1],[228,2],[229,1],[229,1],[230,1],[230,1],[232,1],[232,1],[233,1],[233,1],[234,1],[234,1],[236,1],[236,1],[237,1],[237,1],[238,1],[238,1],[239,1],[239,1],[240,1],[240,1],[241,1],[241,1],[242,1],[242,1],[248,0],[248,2],[252,0],[252,2],[256,1],[256,1],[256,1],[256,1],[256,1],[256,1],[257,0],[257,1],[260,0],[260,2],[262,1],[262,1],[264,0],[264,2],[266,0],[266,2],[268,0],[268,2],[270,1],[270,1],[271,0],[271,1],[280,1],[280,1],[280,1],[280,1],[280,1],[283,0],[283,1],[286,0],[286,1],[287,1],[287,1],[289,0],[289,1],[291,0],[291,1],[292,0],[292,1]],performAction:function(e,t,r,n,i,s,a){var o,u,h,l,c=s.length-1;switch(i){case 1:if(s[c-1]=s[c-1]||{},nn.base&&(s[c-1].base=nn.base),nn.base="",s[c-1].prefixes=nn.prefixes,nn.prefixes=null,"update"===s[c-1].type){const e={};for(const t of s[c-1].updates)if("insert"===t.updateType){const r={};for(const e of t.insert)if("bgp"===e.type||"graph"===e.type)for(const t of e.triples)"BlankNode"===t.subject.termType&&(r[t.subject.value]=!0),"BlankNode"===t.predicate.termType&&(r[t.predicate.value]=!0),"BlankNode"===t.object.termType&&(r[t.object.value]=!0);for(const t of Object.keys(r)){if(e[t])throw new Error("Detected reuse blank node across different INSERT DATA clauses");e[t]=!0}}}return s[c-1];case 3:this.$=kr(s[c-1],s[c],{type:"query"});break;case 4:nn.base=jr(s[c]);break;case 5:nn.prefixes||(nn.prefixes={}),s[c-1]=s[c-1].substr(0,s[c-1].length-1),s[c]=jr(s[c]),nn.prefixes[s[c-1]]=s[c];break;case 6:this.$=kr(s[c-3],Ir(s[c-2]),s[c-1],s[c]);break;case 7:if(!nn.skipValidation){if(Yr(s[c-3].variables.map((e=>Vr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof hr)))||s[c].group)for(const e of s[c-3].variables)if("Variable"===e.termType){if(!s[c].group||!s[c].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Vr(e.expression).length){const t=Zr(e.expression);for(const e of t)if(!s[c].group||!s[c].group.map||!s[c].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}}const e=s[c-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=s[c-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Yr(e.map((e=>e.variables))).map((e=>e.value||e.variable.value));for(const e of t)if(r.indexOf(e)>=0)throw Error("Target id of 'AS' (?"+e+") already used in subquery")}this.$=kr(s[c-3],Ir(s[c-2]),s[c-1],s[c]);break;case 8:this.$=kr(s[c-1],{variables:[new hr]});break;case 9:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;e<t.length-1;e++)t[e+1]==t[e]&&r.push(t[e]);return r}(s[c].map((e=>e.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=kr(s[c-1],{variables:s[c]});break;case 10:this.$=kr({queryType:"SELECT"},s[c]&&(s[c-1]=Sr(s[c]),s[c]={},s[c][s[c-1]]=!0,s[c]));break;case 11:case 12:this.$=kr(s[c-3],s[c-2],s[c-1],s[c],{type:"query"});break;case 13:case 100:case 137:case 165:this.$=Nr(s[c]);break;case 14:case 28:this.$=Fr(s[c-3],{variable:Nr(s[c-1])});break;case 15:this.$=Jr(Fr(s[c-3],{variable:Nr(s[c-1])}));break;case 16:this.$=kr({queryType:"CONSTRUCT",template:s[c-3]},Ir(s[c-2]),s[c-1],s[c]);break;case 17:this.$=kr({queryType:"CONSTRUCT",template:s[c-2]=s[c-2]?s[c-2].triples:[]},Ir(s[c-5]),{where:[{type:"bgp",triples:xr([],s[c-2])}]},s[c]);break;case 18:this.$=kr({queryType:"DESCRIBE",variables:"*"===s[c-3]?[new hr]:s[c-3].map(Nr)},Ir(s[c-2]),s[c-1],s[c]);break;case 19:this.$=kr({queryType:"ASK"},Ir(s[c-2]),s[c-1],s[c]);break;case 20:case 61:this.$={iri:s[c],named:!!s[c-1]};break;case 21:this.$={where:s[c].patterns};break;case 22:this.$=kr(s[c-1],s[c]);break;case 23:this.$=kr(s[c-2],s[c-1],s[c]);break;case 24:this.$={group:s[c]};break;case 25:case 26:case 32:case 34:this.$=Fr(s[c]);break;case 27:this.$=Fr(s[c-1]);break;case 29:case 35:this.$=Fr(Nr(s[c]));break;case 30:this.$={having:s[c]};break;case 31:this.$={order:s[c]};break;case 33:this.$=Fr(s[c],{descending:!0});break;case 36:this.$={limit:Pr(s[c])};break;case 37:this.$={offset:Pr(s[c])};break;case 38:this.$={limit:Pr(s[c-2]),offset:Pr(s[c])};break;case 39:this.$={limit:Pr(s[c]),offset:Pr(s[c-2])};break;case 40:this.$={type:"values",values:s[c]};break;case 41:this.$=s[c-1].map((function(e){var t={};return t[s[c-3]]=e,t}));break;case 42:this.$=s[c-1].map((function(){return{}}));break;case 43:var f=s[c-4].length;s[c-4]=s[c-4].map(Nr),this.$=s[c-1].map((function(e){if(e.length!==f)throw Error("Inconsistent VALUES length");for(var t={},r=0;r<f;r++)t["?"+s[c-4][r].value]=e[r];return t}));break;case 46:this.$=Jr(s[c]);break;case 47:this.$=void 0;break;case 48:case 92:case 117:case 166:this.$=s[c-1];break;case 49:this.$={type:"update",updates:Tr(s[c-2],s[c-1])};break;case 50:this.$=kr({type:"load",silent:!!s[c-2],source:s[c-1]},s[c]&&{destination:s[c]});break;case 51:this.$={type:Sr(s[c-2]),silent:!!s[c-1],graph:s[c]};break;case 52:this.$={type:Sr(s[c-4]),silent:!!s[c-3],source:s[c-2],destination:s[c]};break;case 53:this.$={type:"create",silent:!!s[c-2],graph:{type:"graph",name:s[c]}};break;case 54:this.$={updateType:"insert",insert:en(s[c])};break;case 55:this.$={updateType:"delete",delete:tn(en(s[c]))};break;case 56:this.$={updateType:"deletewhere",delete:tn(s[c])};break;case 57:this.$=kr({updateType:"insertdelete"},s[c-5],{insert:s[c-4]||[]},{delete:s[c-3]||[]},Ir(s[c-2],"using"),{where:s[c].patterns});break;case 58:this.$=kr({updateType:"insertdelete"},s[c-5],{delete:s[c-4]||[]},{insert:s[c-3]||[]},Ir(s[c-2],"using"),{where:s[c].patterns});break;case 59:this.$=tn(s[c]);break;case 60:case 63:case 157:case 180:this.$=s[c];break;case 62:this.$={graph:s[c]};break;case 64:this.$={type:"graph",default:!0};break;case 65:case 66:this.$={type:"graph",name:s[c]};break;case 67:this.$={},this.$[Sr(s[c])]=!0;break;case 68:this.$=s[c-2]?Rr(s[c-1],[s[c-2]]):Rr(s[c-1]);break;case 69:var d=kr(s[c-3]||{triples:[]},{type:"graph",name:Nr(s[c-5])});this.$=s[c]?[d,s[c]]:[d];break;case 70:case 75:this.$={type:"bgp",triples:Rr(s[c-2],[s[c-1]])};break;case 71:this.$={type:"group",patterns:[s[c-1]]};break;case 72:for(const e of s[c-1].filter((e=>"bind"===e.type))){const t=s[c-1].indexOf(e),r=new Set;for(const e of s[c-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Kr(e).forEach((e=>r.add(e)));if(r.has(e.variable.value))throw Error("Variable used to bind is already bound (?"+e.variable.value+")")}this.$={type:"group",patterns:s[c-1]};break;case 73:this.$=s[c-1]?Rr([s[c-1]],s[c]):Rr(s[c]);break;case 74:this.$=s[c]?[s[c-2],s[c]]:s[c-2];break;case 76:s[c-1].length?this.$={type:"union",patterns:Rr(s[c-1].map(Dr),[Dr(s[c])])}:this.$=s[c];break;case 77:this.$=kr(s[c],{type:"optional"});break;case 78:this.$=kr(s[c],{type:"minus"});break;case 79:this.$=kr(s[c],{type:"graph",name:Nr(s[c-1])});break;case 80:this.$=kr(s[c],{type:"service",name:Nr(s[c-1]),silent:!!s[c-2]});break;case 81:this.$={type:"filter",expression:s[c]};break;case 82:this.$={type:"bind",variable:Nr(s[c-1]),expression:s[c-3]};break;case 83:this.$=Jr({type:"bind",variable:Nr(s[c-1]),expression:s[c-3]});break;case 88:this.$={type:"functionCall",function:s[c-1],args:[]};break;case 89:this.$={type:"functionCall",function:s[c-5],args:Tr(s[c-2],s[c-1]),distinct:!!s[c-3]};break;case 90:case 108:case 119:case 209:case 217:case 219:case 231:case 233:case 243:case 247:case 267:case 269:case 273:case 277:case 300:case 306:case 317:case 327:case 333:case 339:case 343:case 353:case 355:case 359:case 367:case 371:case 373:case 381:case 383:case 387:case 389:case 398:case 430:case 432:case 442:case 446:case 448:case 450:this.$=[];break;case 91:this.$=Tr(s[c-2],s[c-1]);break;case 93:this.$=Rr(s[c-2],[s[c-1]]);break;case 94:case 105:this.$=s[c].map((function(e){return kr(Br(s[c-1]),e)}));break;case 95:this.$=xr(s[c].map((function(e){return kr(Br(s[c-1].entity),e)})),s[c-1].triples);break;case 97:this.$=Rr([s[c-1]],s[c]);break;case 98:this.$=Rr(s[c]);break;case 99:this.$=Qr(s[c-1],s[c]);break;case 102:case 115:case 122:this.$=nn.factory.namedNode(cr);break;case 103:case 104:this.$=Tr(s[c-1],s[c]);break;case 106:this.$=s[c]?xr(s[c].map((function(e){return kr(Br(s[c-1].entity),e)})),s[c-1].triples):s[c-1].triples;break;case 107:this.$=Qr(Nr(s[c-3]),Tr(s[c-2],s[c-1]),s[c]);break;case 109:this.$=Qr(Nr(s[c-1]),s[c]);break;case 110:this.$=s[c-1].length?Or("|",Tr(s[c-1],s[c])):s[c];break;case 111:this.$=s[c-1].length?Or("/",Tr(s[c-1],s[c])):s[c];break;case 112:this.$=s[c]?Or(s[c],[s[c-1]]):s[c-1];break;case 113:this.$=s[c-1]?Or(s[c-1],[s[c]]):s[c];break;case 116:case 123:this.$=Or(s[c-1],[s[c]]);break;case 120:this.$=Or("|",Tr(s[c-2],s[c-1]));break;case 124:this.$=Or(s[c-1],[nn.factory.namedNode(cr)]);break;case 125:case 127:this.$=function(e){var t=Mr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),xr(i,e.triples)}));for(var s=0,a=0,o=n.length,u=Array(2*o);s<o;)u[a++]=Br(r,nn.factory.namedNode(fr),n[s]),u[a++]=Br(r,nn.factory.namedNode(dr),r=++s<o?Mr():nn.factory.namedNode(pr));return{entity:t,triples:xr(u,i)}}(s[c-1]);break;case 126:case 128:this.$=(h=s[c-1],{entity:l=Mr(),triples:h.map((function(e){return kr(Br(l),e)}))});break;case 129:case 131:this.$={entity:s[c],triples:[]};break;case 133:case 135:this.$=Jr(nn.factory.quad(s[c-4],s[c-3],s[c-2],Nr(s[c-6])));break;case 134:case 136:this.$=Jr(nn.factory.quad(s[c-3],s[c-2],s[c-1]));break;case 141:this.$=Mr(s[c].replace(/^(_:)/,""));break;case 142:this.$=Mr();break;case 143:this.$=nn.factory.namedNode(pr);break;case 144:case 146:case 151:case 155:this.$=Lr(s[c-1],s[c]);break;case 145:this.$=["||",s[c]];break;case 147:this.$=["&&",s[c]];break;case 149:this.$=Ar(s[c-1],[s[c-2],s[c]]);break;case 150:this.$=Ar(s[c-2]?"notin":"in",[s[c-3],s[c]]);break;case 152:case 156:this.$=[s[c-1],s[c]];break;case 153:this.$=["+",Lr(s[c-1],s[c])];break;case 154:var p=Cr(s[c-1].value.replace("-",""),s[c-1].datatype);this.$=["-",Lr(p,s[c])];break;case 158:this.$=Ar(s[c-1],[s[c]]);break;case 159:this.$=Ar("UMINUS",[s[c]]);break;case 168:this.$=Ar(Sr(s[c-1]));break;case 169:this.$=Ar(Sr(s[c-3]),[s[c-1]]);break;case 170:this.$=Ar(Sr(s[c-5]),[s[c-3],s[c-1]]);break;case 171:this.$=Ar(Sr(s[c-7]),[s[c-5],s[c-3],s[c-1]]);break;case 172:this.$=Ar(Sr(s[c-1]),s[c]);break;case 173:this.$=Ar("bound",[Nr(s[c-1])]);break;case 174:this.$=Ar(s[c-1],[]);break;case 175:this.$=Ar(s[c-3],[s[c-1]]);break;case 176:this.$=Ar(s[c-2]?"notexists":"exists",[Dr(s[c])]);break;case 177:case 178:this.$=Fr(s[c-1],{type:"aggregate",aggregation:Sr(s[c-4]),distinct:!!s[c-2]});break;case 179:this.$=Fr(s[c-2],{type:"aggregate",aggregation:Sr(s[c-5]),distinct:!!s[c-3],separator:s[c-1]||" "});break;case 181:this.$=Cr(s[c]);break;case 182:this.$=(o=s[c-1],u=Sr(s[c].substr(1)),nn.factory.literal(o,u));break;case 183:this.$=Cr(s[c-2],s[c]);break;case 184:case 197:this.$=Cr(s[c],gr);break;case 185:case 198:this.$=Cr(s[c],yr);break;case 186:case 199:this.$=Cr(Sr(s[c]),_r);break;case 189:this.$=Cr(s[c].toLowerCase(),mr);break;case 190:case 191:this.$=Wr(s[c],1);break;case 192:case 193:this.$=Wr(s[c],3);break;case 194:this.$=Cr(s[c].substr(1),gr);break;case 195:this.$=Cr(s[c].substr(1),yr);break;case 196:this.$=Cr(s[c].substr(1).toLowerCase(),_r);break;case 200:this.$=nn.factory.namedNode(jr(s[c]));break;case 201:var b=s[c].indexOf(":"),g=s[c].substr(0,b),y=nn.prefixes[g];if(!y)throw new Error("Unknown prefix: "+g);var _=jr(y+s[c].substr(b+1));this.$=nn.factory.namedNode(_);break;case 202:if(s[c]=s[c].substr(0,s[c].length-1),!(s[c]in nn.prefixes))throw new Error("Unknown prefix: "+s[c]);_=jr(nn.prefixes[s[c]]);this.$=nn.factory.namedNode(_);break;case 210:case 218:case 220:case 222:case 232:case 234:case 240:case 244:case 248:case 262:case 264:case 266:case 268:case 270:case 272:case 274:case 276:case 301:case 307:case 318:case 334:case 368:case 384:case 403:case 405:case 431:case 433:case 443:case 447:case 449:case 451:s[c-1].push(s[c]);break;case 221:case 239:case 261:case 263:case 265:case 271:case 275:case 402:case 404:this.$=[s[c]];break;case 278:s[c-3].push(s[c-2]);break;case 328:case 340:case 344:case 354:case 356:case 360:case 372:case 374:case 382:case 388:case 390:case 399:s[c-2].push(s[c-1])}},table:[e(t,n,{3:1,4:2,7:3}),{1:[3]},e(i,[2,277],{5:4,8:5,313:6,9:7,103:8,17:9,40:10,49:11,54:12,104:13,18:14,22:15,25:19,6:[2,203],28:s,41:[1,16],50:[1,17],55:[1,18]}),e([6,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],[2,2],{314:21,11:22,14:23,12:[1,24],15:[1,25]}),{6:[1,26]},{6:[2,205]},{6:[2,206]},{6:[2,215],10:27,89:28,90:a},{6:[2,204]},e(o,[2,211]),e(o,[2,212]),e(o,[2,213]),e(o,[2,214]),{105:30,107:[1,31],110:32,113:33,117:[1,34],120:[1,35],122:[1,36],123:[1,37],124:38,128:39,132:[2,302],133:[2,296],137:45,138:[1,46],322:[1,40],323:[1,41],324:[1,42],325:[1,43],326:[1,44]},e(u,[2,217],{19:47}),e(u,[2,219],{23:48}),e(h,[2,233],{42:49,44:50,46:[1,51]}),{13:l,16:c,26:[1,54],34:f,51:52,60:57,312:d,318:55,319:53},e(u,[2,247],{56:61}),{26:[1,62],27:63,33:64,34:p,35:b},e(g,[2,225],{29:67,315:68,316:[1,69],317:[1,70]}),e(t,[2,210]),e(t,[2,207]),e(t,[2,208]),{13:[1,71]},{16:[1,72]},{1:[2,1]},{6:[2,3]},{6:[2,216]},{34:[1,74],35:[1,76],91:73,93:[1,75]},{6:[2,279],106:77,191:[1,78]},e(y,[2,281],{108:79,321:[1,80]}),e(_,[2,287],{111:81,321:[1,82]}),e(m,[2,292],{114:83,321:[1,84]}),{118:85,119:[2,294],321:[1,86]},{46:w,121:87},{46:w,121:89},{46:w,121:90},{125:91,133:v},{129:93,132:E},e(S,[2,285]),e(S,[2,286]),e(T,[2,289]),e(T,[2,290]),e(T,[2,291]),{132:[2,303],133:[2,297]},{13:l,16:c,60:95,312:d},{20:96,45:x,46:k,57:97,58:R,61:98},{20:101,45:x,46:k,57:102,58:R,61:98},e(u,[2,231],{43:103}),{45:[1,104],57:105,58:R},e(j,[2,359],{179:106,180:107,181:108,48:[2,357]}),e(N,[2,243],{52:109}),e(N,[2,241],{60:57,318:110,13:l,16:c,34:f,312:d}),e(N,[2,242]),e(A,[2,239]),e(A,[2,237]),e(A,[2,238]),e(F,[2,200]),e(F,[2,201]),e(F,[2,202]),{20:111,45:x,46:k,57:112,58:R,61:98},e(u,[2,8]),e(u,[2,9],{33:113,34:p,35:b}),e(O,[2,221]),e(O,[2,13]),e(L,I,{36:114,39:115,247:116,251:118,255:119,259:120,267:121,271:122,219:P,231:D,273:C,334:B}),e(g,[2,10]),e(g,[2,226]),e(g,[2,223]),e(g,[2,224]),e(t,[2,4]),{13:[1,126]},e(M,[2,40]),{46:[1,127]},{46:[1,128]},{34:[1,130],95:129},{6:[2,49]},e(t,n,{7:3,4:131}),{13:l,16:c,60:132,312:d},e(y,[2,282]),{112:133,119:[1,134],141:[1,136],143:135,320:[1,137],327:[1,138]},e(_,[2,288]),e(y,U,{115:139,142:141,119:$,141:q}),e(m,[2,293]),{119:[1,143]},{119:[2,295]},e(G,[2,54]),e(j,z,{144:144,151:145,152:146,48:W,119:W}),e(G,[2,55]),e(G,[2,56]),e(Q,[2,298],{126:147,129:148,132:E}),{46:w,121:149},e(Q,[2,304],{130:150,125:151,133:v}),{46:w,121:152},e([132,133],[2,62]),e(H,V,{21:153,64:154,74:155,75:Z}),e(u,[2,218]),{46:Y,62:157},e(y,[2,249],{59:159,320:[1,160]}),{46:[2,252]},e(X,K,{24:161,63:162,67:163,68:J}),e(u,[2,220]),{20:165,45:x,46:k,57:166,58:R,61:98},{46:[1,167]},e(h,[2,234]),{48:[1,168]},{48:[2,358]},{13:l,16:c,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:169,183:170,185:171,226:ie,231:D,243:172,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(we,[2,245],{61:98,53:200,57:201,20:202,45:x,46:k,58:R}),e(A,[2,240]),e(X,K,{63:162,67:163,24:203,68:J}),e(u,[2,248]),e(O,[2,222]),{37:[1,204]},{37:[1,205]},e(ve,[2,430],{248:206}),{13:l,16:c,34:ee,39:209,60:178,87:re,93:ne,98:179,119:[1,207],231:D,236:208,243:210,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Ee,[2,432],{252:211}),e(Ee,[2,148],{256:212,257:213,258:[2,440],295:[1,214],335:[1,215],336:[1,216],337:[1,217],338:[1,218],339:[1,219],340:[1,220]}),e(Se,[2,442],{260:221}),e(Te,[2,450],{268:222}),{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:223,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:249,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{13:l,16:c,34:xe,35:ke,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:250,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(L,[2,455]),e(t,[2,5]),e(Ge,[2,267],{92:251}),e(ze,[2,269],{94:252}),{34:[1,254],38:[1,253]},e(We,[2,271]),e(i,[2,278],{6:[2,280]}),e(G,[2,283],{109:255,139:256,140:[1,257]}),e(G,[2,51]),{13:l,16:c,60:258,312:d},e(G,[2,67]),e(G,[2,312]),e(G,[2,313]),e(G,[2,314]),{116:[1,259]},e(Qe,[2,64]),{13:l,16:c,60:260,312:d},e(y,[2,311]),{13:l,16:c,60:261,312:d},e(He,[2,317],{145:262}),e(He,[2,316]),{13:l,16:c,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:263,183:170,185:171,226:ie,231:D,243:172,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Q,[2,300],{127:264}),e(Q,[2,299]),e([45,132,135],[2,60]),e(Q,[2,306],{131:265}),e(Q,[2,305]),e([45,133,135],[2,59]),e(o,[2,6]),e(Ve,[2,257],{65:266,77:267,78:[1,268]}),e(H,[2,256]),{13:l,16:c,35:ke,60:274,72:272,73:273,76:269,82:271,84:270,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e([6,48,68,75,78,86,88,90],[2,21]),e(j,Ze,{25:19,30:275,155:276,18:277,22:278,156:279,162:280,163:281,28:s,46:Ye,48:Ye,90:Ye,119:Ye,167:Ye,168:Ye,170:Ye,173:Ye,174:Ye}),{13:l,16:c,60:282,312:d},e(y,[2,250]),e(o,[2,7]),e(H,V,{64:154,74:155,21:283,75:Z}),e(X,[2,254]),{69:[1,284]},e(X,K,{63:162,67:163,24:285,68:J}),e(u,[2,232]),e(j,z,{152:146,47:286,151:287,48:[2,235]}),e(u,[2,92]),{48:[2,361],182:288,328:[1,289]},{13:l,16:c,34:Xe,60:294,184:290,188:291,193:292,195:Ke,312:d},e(Je,[2,365],{188:291,193:292,60:294,186:296,187:297,184:298,13:l,16:c,34:Xe,195:Ke,312:d}),e(et,[2,363]),e(et,[2,364]),{13:l,16:c,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:300,225:299,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{13:l,16:c,34:Xe,60:294,184:305,188:291,193:292,195:Ke,312:d},e(tt,[2,137]),e(tt,[2,138]),e(tt,[2,139]),e(tt,[2,140]),e(tt,[2,141]),e(tt,[2,142]),e(tt,[2,143]),e(rt,[2,181],{297:[1,306],298:[1,307]}),e(rt,[2,184]),e(rt,[2,185]),e(rt,[2,186]),e(rt,[2,187]),e(rt,[2,188]),e(rt,[2,189]),e(nt,[2,190]),e(nt,[2,191]),e(nt,[2,192]),e(nt,[2,193]),e(rt,[2,194]),e(rt,[2,195]),e(rt,[2,196]),e(rt,[2,197]),e(rt,[2,198]),e(rt,[2,199]),e(X,K,{63:162,67:163,24:308,68:J}),e(N,[2,244]),e(we,[2,246]),e(o,[2,19]),{34:[1,309]},{34:[1,310]},e([37,38,191,278],[2,144],{249:311,250:[1,312]}),{13:l,16:c,34:[1,314],60:315,232:313,312:d},{13:l,16:c,34:Xe,60:294,193:316,195:Ke,312:d},e(et,[2,416]),e(et,[2,417]),e(ve,[2,146],{253:317,254:[1,318]}),e(L,I,{259:120,267:121,271:122,255:319,219:P,273:C,334:B}),{258:[1,320]},e(it,[2,434]),e(it,[2,435]),e(it,[2,436]),e(it,[2,437]),e(it,[2,438]),e(it,[2,439]),{258:[2,441]},e([37,38,191,250,254,258,278,295,335,336,337,338,339,340],[2,151],{261:321,262:322,263:323,265:324,273:[1,326],306:pe,307:be,308:ge,309:ye,310:_e,311:me,334:[1,325]}),e(Se,[2,155],{269:327,270:328,26:st,331:at}),e(Te,[2,157]),e(Te,[2,160]),e(Te,[2,161]),e(Te,[2,162],{35:ot,93:ut}),e(Te,[2,163]),e(Te,[2,164]),e(Te,[2,165]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:333,219:P,273:C,334:B}),e(ht,[2,167]),{93:[1,334]},{35:[1,335]},{35:[1,336]},{35:[1,337]},{35:lt,93:ct,177:338},{35:[1,341]},{35:[1,343],93:[1,342]},{284:[1,344]},{35:[1,345]},{35:[1,346]},{35:[1,347]},e(ft,[2,456]),e(ft,[2,457]),e(ft,[2,458]),e(ft,[2,459]),e(ft,[2,460]),{284:[2,462]},e(Te,[2,158]),e(Te,[2,159]),{13:l,16:c,48:[1,348],60:350,87:re,97:349,98:351,99:352,100:dt,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{48:[1,355],93:[1,356]},{46:[1,357]},e(We,[2,272]),e(G,[2,50]),e(G,[2,284]),{119:[1,358]},e(G,[2,66]),e(y,U,{142:141,115:359,119:$,141:q}),e(Qe,[2,65]),e(G,[2,53]),{48:[1,360],119:[1,362],146:361},e(He,[2,329],{154:363,328:[1,364]}),{45:[1,365],134:366,135:bt},{45:[1,368],134:369,135:bt},e(gt,[2,259],{66:370,85:371,86:[1,372],88:[1,373]}),e(Ve,[2,258]),{69:[1,374]},e(H,[2,30],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:375,13:l,16:c,35:ke,275:Re,276:je,277:Ne,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(yt,[2,263]),e(_t,[2,85]),e(_t,[2,86]),e(_t,[2,87]),{35:ot,93:ut},{48:[1,376]},{48:[1,377]},{20:378,45:x,46:k,61:98},{20:379,45:x,46:k,61:98},e(mt,[2,333],{157:380}),e(mt,[2,332]),{13:l,16:c,34:ee,35:wt,39:385,60:178,87:re,93:ne,98:179,164:381,201:382,203:383,226:vt,231:D,243:384,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(N,[2,20]),e(gt,[2,22]),{13:l,16:c,34:Et,35:St,60:274,70:388,71:389,72:390,73:391,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(o,[2,16]),{48:[1,394]},{48:[2,236]},{48:[2,93]},e(j,[2,360],{48:[2,362]}),e(Je,[2,94]),e(Tt,[2,367],{189:395}),e(j,[2,371],{194:396,196:397}),e(j,[2,100]),e(j,[2,101]),e(j,[2,102]),e(Je,[2,95]),e(Je,[2,96]),e(Je,[2,366]),{13:l,16:c,34:ee,35:te,38:[1,398],39:304,60:178,87:re,93:ne,98:179,185:302,197:399,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,402]),e(kt,[2,129]),e(kt,[2,130]),e(kt,[2,406]),e(kt,[2,407]),{227:[1,400]},e(rt,[2,182]),{13:l,16:c,60:401,312:d},e(o,[2,18]),{38:[1,402]},{38:[1,403]},e(ve,[2,431]),e(L,I,{251:118,255:119,259:120,267:121,271:122,247:404,219:P,273:C,334:B}),{46:[1,405]},{46:[2,410]},{46:[2,411]},{13:l,16:c,34:ee,39:407,60:178,87:re,93:ne,98:179,231:D,237:406,243:408,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Ee,[2,433]),e(L,I,{255:119,259:120,267:121,271:122,251:409,219:P,273:C,334:B}),e(Ee,[2,149]),{35:lt,93:ct,177:410},e(Se,[2,443]),e(L,I,{267:121,271:122,259:411,219:P,273:C,334:B}),e(Te,[2,446],{264:412}),e(Te,[2,448],{266:413}),e(it,[2,444]),e(it,[2,445]),e(Te,[2,451]),e(L,I,{271:122,267:414,219:P,273:C,334:B}),e(it,[2,452]),e(it,[2,453]),e(ht,[2,88]),e(it,[2,351],{175:415,316:[1,416]}),{38:[1,417]},e(ht,[2,168]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:418,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:419,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:420,219:P,273:C,334:B}),e(ht,[2,172]),e(ht,[2,90]),e(it,[2,355],{178:421}),{34:[1,422]},e(ht,[2,174]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:423,219:P,273:C,334:B}),{46:Y,62:424},e(Rt,[2,463],{286:425,316:[1,426]}),e(it,[2,467],{289:427,316:[1,428]}),e(it,[2,469],{291:429,316:[1,430]}),e(M,[2,41]),e(Ge,[2,268]),e(jt,[2,44]),e(jt,[2,45]),e(jt,[2,46]),e(jt,[2,47]),{13:l,16:c,60:178,87:re,93:ne,98:179,99:433,119:[1,431],231:pt,241:432,244:434,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(M,[2,42]),e(ze,[2,270]),e(Nt,[2,273],{96:435}),{13:l,16:c,60:436,312:d},e(G,[2,52]),e([6,45,132,133,135,191],[2,68]),e(He,[2,318]),{13:l,16:c,34:[1,438],60:439,147:437,312:d},e(He,[2,70]),e(j,[2,328],{48:At,119:At}),{46:Y,62:440},e(Q,[2,301]),e(y,[2,308],{136:441,320:[1,442]}),{46:Y,62:443},e(Q,[2,307]),e(gt,[2,23]),e(gt,[2,260]),{87:[1,444]},{87:[1,445]},{13:l,16:c,34:Ft,35:ke,60:274,72:272,73:273,79:446,80:447,81:Ot,82:271,83:Lt,84:450,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},e(yt,[2,264]),e(It,[2,71]),e(It,[2,72]),e(H,V,{64:154,74:155,21:452,75:Z}),e(X,K,{63:162,67:163,24:453,68:J}),{46:[2,343],48:[2,73],89:463,90:a,119:[1,459],158:454,159:455,166:456,167:[1,457],168:[1,458],170:[1,460],173:[1,461],174:[1,462]},e(mt,[2,341],{165:464,328:[1,465]}),e(Pt,Dt,{202:466,205:467,210:468,211:470,34:Ct}),e(Bt,[2,377],{205:467,210:468,211:470,204:471,202:472,13:Dt,16:Dt,35:Dt,195:Dt,219:Dt,224:Dt,312:Dt,34:Ct}),e(Mt,[2,375]),e(Mt,[2,376]),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:474,203:476,226:vt,228:473,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Pt,Dt,{205:467,210:468,211:470,202:479,34:Ct}),e(X,[2,24],{274:231,280:236,283:239,60:274,72:390,73:391,71:480,13:l,16:c,34:Et,35:St,275:Re,276:je,277:Ne,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(Ut,[2,261]),e(Ut,[2,25]),e(Ut,[2,26]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:481,219:P,273:C,334:B}),e(Ut,[2,29]),e(X,K,{63:162,67:163,24:482,68:J}),e([48,119,227,328],[2,97],{190:483,191:[1,484]}),e(Tt,[2,99]),{13:l,16:c,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:485,226:ie,229:301,231:D,243:303,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e($t,[2,125]),e(xt,[2,403]),e($t,[2,126]),e(rt,[2,183]),e(O,[2,14]),e(O,[2,15]),e(ve,[2,145]),{13:l,16:c,34:ee,39:487,60:178,87:re,93:ne,98:179,231:D,233:486,243:488,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{235:[1,489]},{235:[2,418]},{235:[2,419]},e(Ee,[2,147]),e(Ee,[2,150]),e(Se,[2,152]),e(Se,[2,153],{270:328,269:490,26:st,331:at}),e(Se,[2,154],{270:328,269:491,26:st,331:at}),e(Te,[2,156]),e(it,[2,353],{176:492}),e(it,[2,352]),e([6,13,16,26,34,35,37,38,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],[2,166]),{38:[1,493]},{278:[1,494]},{278:[1,495]},e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:496,219:P,273:C,334:B}),{38:[1,497]},{38:[1,498]},e(ht,[2,176]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,287:499,36:501,26:[1,500],219:P,273:C,334:B}),e(Rt,[2,464]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:502,219:P,273:C,334:B}),e(it,[2,468]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:503,219:P,273:C,334:B}),e(it,[2,470]),{13:l,16:c,34:[1,505],60:506,238:504,312:d},{13:l,16:c,34:Xe,60:294,193:507,195:Ke,312:d},e(et,[2,426]),e(et,[2,427]),{35:[1,510],48:[1,508],101:509},e(G,[2,63]),{46:[1,511]},{46:[2,319]},{46:[2,320]},e(G,[2,57]),{13:l,16:c,60:512,312:d},e(y,[2,309]),e(G,[2,58]),e(gt,[2,36],{88:[1,513]}),e(gt,[2,37],{86:[1,514]}),e(Ve,[2,31],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:450,80:515,13:l,16:c,34:Ft,35:ke,81:Ot,83:Lt,275:Re,276:je,277:Ne,279:Ae,281:Fe,282:Oe,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe}),e(qt,[2,265]),{35:ke,82:516},{35:ke,82:517},e(qt,[2,34]),e(qt,[2,35]),{31:518,48:[2,227],89:519,90:a},{32:520,48:[2,229],89:521,90:a},e(mt,[2,334]),e(Gt,[2,335],{160:522,328:[1,523]}),{46:Y,62:524},{46:Y,62:525},{46:Y,62:526},{13:l,16:c,34:[1,528],60:529,169:527,312:d},e(zt,[2,347],{171:530,321:[1,531]}),{13:l,16:c,35:ke,60:274,72:272,73:273,82:271,84:532,274:231,275:Re,276:je,277:Ne,279:Ae,280:236,281:Fe,282:Oe,283:239,284:Le,285:Ie,288:Pe,290:De,312:d,340:Ce,341:Be,342:Me,343:Ue,344:$e,345:qe},{35:[1,533]},e(Wt,[2,84]),e(mt,[2,75]),e(j,[2,340],{46:Qt,48:Qt,90:Qt,119:Qt,167:Qt,168:Qt,170:Qt,173:Qt,174:Qt}),e(Bt,[2,105]),e(j,[2,381],{206:534}),e(j,[2,379]),e(j,[2,380]),e(Pt,[2,389],{212:535,213:536}),e(Bt,[2,106]),e(Bt,[2,378]),{13:l,16:c,34:ee,35:wt,38:[1,537],39:478,60:178,87:re,93:ne,98:179,200:538,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,404]),e(Ht,[2,131]),e(Ht,[2,132]),e(Ht,[2,408]),e(Ht,[2,409]),{227:[1,539]},e(Ut,[2,262]),{37:[1,541],38:[1,540]},e(o,[2,17]),e(Tt,[2,368]),e(Tt,[2,369],{193:292,60:294,192:542,188:543,13:l,16:c,34:Xe,195:Ke,312:d}),e(Tt,[2,103],{278:[1,544]}),{13:l,16:c,34:Xe,60:294,193:545,195:Ke,312:d},e(et,[2,412]),e(et,[2,413]),e(Vt,[2,134]),e(Te,[2,447]),e(Te,[2,449]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:546,219:P,273:C,334:B}),e(ht,[2,169]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:547,219:P,273:C,334:B}),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:548,219:P,273:C,334:B}),{38:[1,549],278:[1,550]},e(ht,[2,173]),e(ht,[2,175]),{38:[1,551]},{38:[2,465]},{38:[2,466]},{38:[1,552]},{38:[2,471],191:[1,555],292:553,293:554},{46:[1,556]},{46:[2,420]},{46:[2,421]},{13:l,16:c,60:178,87:re,93:ne,98:179,99:558,231:pt,242:557,244:559,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(M,[2,43]),e(Nt,[2,274]),{13:l,16:c,60:350,87:re,97:561,98:351,99:352,100:dt,102:560,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(j,z,{152:146,148:562,151:563,48:[2,321]}),e(Q,[2,61]),{87:[1,564]},{87:[1,565]},e(qt,[2,266]),e(qt,[2,32]),e(qt,[2,33]),{48:[2,11]},{48:[2,228]},{48:[2,12]},{48:[2,230]},e(j,Ze,{163:281,161:566,162:567,46:Zt,48:Zt,90:Zt,119:Zt,167:Zt,168:Zt,170:Zt,173:Zt,174:Zt}),e(Gt,[2,336]),e(Wt,[2,76],{329:[1,568]}),e(Wt,[2,77]),e(Wt,[2,78]),{46:Y,62:569},{46:[2,345]},{46:[2,346]},{13:l,16:c,34:[1,571],60:572,172:570,312:d},e(zt,[2,348]),e(Wt,[2,81]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:573,39:574,219:P,231:D,273:C,334:B}),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:575,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(xt,[2,110],{330:[1,576]}),e(Yt,[2,396],{214:577,218:578,224:[1,579]}),e(Xt,[2,127]),e(xt,[2,405]),e(Xt,[2,128]),e(Ut,[2,27]),{34:[1,580]},e(Tt,[2,98]),e(Tt,[2,370]),e(j,[2,372]),{13:l,16:c,34:ee,39:582,60:178,87:re,93:ne,98:179,231:D,234:581,243:583,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{38:[1,584],278:[1,585]},{38:[1,586]},{278:[1,587]},e(ht,[2,91]),e(it,[2,356]),e(ht,[2,177]),e(ht,[2,178]),{38:[1,588]},{38:[2,472]},{294:[1,589]},{13:l,16:c,60:178,87:re,93:ne,98:179,99:591,231:pt,239:590,244:592,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{235:[1,593]},{235:[2,428]},{235:[2,429]},{13:l,16:c,38:[1,594],60:350,87:re,97:595,98:351,99:352,100:dt,231:pt,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(Kt,[2,275]),{48:[1,596]},{48:[2,322]},e(gt,[2,38]),e(gt,[2,39]),e(mt,[2,74]),e(mt,[2,338]),{46:[2,344]},e(Wt,[2,79]),{46:Y,62:597},{46:[2,349]},{46:[2,350]},{37:[1,598]},{37:[1,599]},e(Jt,[2,383],{207:600,278:[1,601]}),e(Pt,[2,388]),e([13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330],[2,111],{331:[1,602]}),{13:l,16:c,35:[1,608],60:605,195:[1,606],215:603,216:604,219:[1,607],312:d},e(Yt,[2,397]),{38:[1,609]},{48:[1,610]},{48:[2,414]},{48:[2,415]},e(ht,[2,89]),e(it,[2,354]),e(ht,[2,170]),e(L,I,{247:116,251:118,255:119,259:120,267:121,271:122,36:611,219:P,273:C,334:B}),e(ht,[2,179]),{295:[1,612]},{13:l,16:c,34:Xe,60:294,193:613,195:Ke,312:d},e(et,[2,422]),e(et,[2,423]),e(er,[2,136]),e(Nt,[2,48]),e(Kt,[2,276]),e(tr,[2,323],{149:614,328:[1,615]}),e(Wt,[2,80]),{34:[1,616]},{34:[1,617]},e([46,48,90,119,167,168,170,173,174,227,328],[2,107],{208:618,191:[1,619]}),e(j,[2,382]),e(Pt,[2,390]),e(rr,[2,113]),e(rr,[2,394],{217:620,332:621,26:[1,623],333:[1,622],334:[1,624]}),e(nr,[2,114]),e(nr,[2,115]),{13:l,16:c,35:[1,628],60:629,93:[1,627],195:ir,220:625,221:626,224:sr,312:d},e(Pt,Dt,{211:470,210:632}),e(Ut,[2,28]),{235:[1,633]},{38:[1,634]},{296:635,302:le,303:ce,304:fe,305:de},{13:l,16:c,60:178,87:re,93:ne,98:179,99:637,231:pt,240:636,244:638,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},e(j,z,{152:146,150:639,151:640,48:ar,119:ar}),e(tr,[2,324]),{38:[1,641]},{38:[1,642]},e(Jt,[2,384]),e(Jt,[2,108],{211:470,209:643,210:644,13:Dt,16:Dt,35:Dt,195:Dt,219:Dt,224:Dt,312:Dt,34:[1,645]}),e(rr,[2,112]),e(rr,[2,395]),e(rr,[2,391]),e(rr,[2,392]),e(rr,[2,393]),e(nr,[2,116]),e(nr,[2,118]),e(nr,[2,119]),e(or,[2,398],{222:646}),e(nr,[2,121]),e(nr,[2,122]),{13:l,16:c,60:647,195:[1,648],312:d},{38:[1,649]},e(Vt,[2,133]),e(ht,[2,171]),{38:[2,180]},{48:[1,650]},{48:[2,424]},{48:[2,425]},e(He,[2,69]),e(He,[2,326]),e(Wt,[2,82]),e(Wt,[2,83]),e(j,[2,373],{198:651,199:652}),e(j,[2,385]),e(j,[2,386]),{13:l,16:c,38:[2,400],60:629,195:ir,221:654,223:653,224:sr,312:d},e(nr,[2,123]),e(nr,[2,124]),e(nr,[2,117]),{235:[1,655]},e(Jt,[2,109]),{13:l,16:c,34:ee,35:wt,39:478,60:178,87:re,93:ne,98:179,200:656,203:476,226:vt,230:475,231:D,243:477,244:177,245:se,246:ae,263:187,265:188,296:183,299:oe,300:ue,301:he,302:le,303:ce,304:fe,305:de,306:pe,307:be,308:ge,309:ye,310:_e,311:me,312:d},{38:[1,657]},{38:[2,401],330:[1,658]},e(er,[2,135]),e(Jt,[2,104],{278:[1,659]}),e(nr,[2,120]),e(or,[2,399]),e(j,[2,374])],defaultActions:{5:[2,205],6:[2,206],8:[2,204],26:[2,1],27:[2,3],28:[2,216],77:[2,49],86:[2,295],100:[2,252],107:[2,358],220:[2,441],248:[2,462],287:[2,236],288:[2,93],314:[2,410],315:[2,411],407:[2,418],408:[2,419],438:[2,319],439:[2,320],500:[2,465],501:[2,466],505:[2,420],506:[2,421],518:[2,11],519:[2,228],520:[2,12],521:[2,230],528:[2,345],529:[2,346],554:[2,472],558:[2,428],559:[2,429],563:[2,322],568:[2,344],571:[2,349],572:[2,350],582:[2,414],583:[2,415],635:[2,180],637:[2,424],638:[2,425]},parseError:function(e,t){if(!t.recoverable){var r=new Error(e);throw r.hash=t,r}this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],i=[],s=this.table,a="",o=0,u=0,h=0,l=2,c=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(p.yy[b]=this.yy[b]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;i.push(g);var y=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,m,w,v,E,S,T,x,k,R=function(){var e;return"number"!=typeof(e=d.lex()||c)&&(e=t.symbols_[e]||e),e},j={};;){if(w=r[r.length-1],this.defaultActions[w]?v=this.defaultActions[w]:(null==_&&(_=R()),v=s[w]&&s[w][_]),void 0===v||!v.length||!v[0]){var N="";for(S in k=[],s[w])this.terminals_[S]&&S>l&&k.push("'"+this.terminals_[S]+"'");N=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(_==c?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:g,expected:k})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(v[0]){case 1:r.push(_),n.push(d.yytext),i.push(d.yylloc),r.push(v[1]),_=null,m?(_=m,m=null):(u=d.yyleng,a=d.yytext,o=d.yylineno,g=d.yylloc,h>0&&h--);break;case 2:if(T=this.productions_[v[1]][1],j.$=n[n.length-T],j._$={first_line:i[i.length-(T||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(T||1)].first_column,last_column:i[i.length-1].last_column},y&&(j._$.range=[i[i.length-(T||1)].range[0],i[i.length-1].range[1]]),void 0!==(E=this.performAction.apply(j,[a,u,o,p.yy,v[1],n,i].concat(f))))return E;T&&(r=r.slice(0,-1*T*2),n=n.slice(0,-1*T),i=i.slice(0,-1*T)),r.push(this.productions_[v[1]][0]),n.push(j.$),i.push(j._$),x=s[r[r.length-2]][r[r.length-1]],r.push(x);break;case 3:return!0}}return!0}},hr=r(1348).R,lr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=lr+"type",fr=lr+"first",dr=lr+"rest",pr=lr+"nil",br="http://www.w3.org/2001/XMLSchema#",gr=br+"integer",yr=br+"decimal",_r=br+"double",mr=br+"boolean",wr="",vr="",Er="";function Sr(e){return e.toLowerCase()}function Tr(e,t){return e.push(t),e}function xr(e,t){return e.push.apply(e,t),e}function kr(e){e||(e={});for(var t,r=1,n=arguments.length;r<n&&(t=arguments[r]||{});r++)for(var i in t)e[i]=t[i];return e}function Rr(){for(var e=[],t=0,r=arguments.length;t<r;t++)e=e.concat.apply(e,arguments[t]);return e}function jr(e){if("<"===e[0]&&(e=e.substring(1,e.length-1)),/^[a-z]+:/i.test(e))return e;if(!nn.base)throw new Error("Cannot resolve relative IRI "+e+" because no base IRI was set.");switch(wr!==nn.base&&(wr=nn.base,vr=wr.replace(/[^\/:]*$/,""),Er=wr.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),e[0]){case void 0:return wr;case"#":return wr+e;case"?":return wr.replace(/(?:\?.*)?$/,e);case"/":return Er+e;default:return vr+e}}function Nr(e){if(e){var t=e[0];if("?"===t||"$"===t)return nn.factory.variable(e.substr(1))}return e}function Ar(e,t){return{type:"operation",operator:e,args:t||[]}}function Fr(e,t){var r={expression:"*"===e?new hr:e};if(t)for(var n in t)r[n]=t[n];return r}function Or(e,t){return{type:"path",pathType:e,items:t}}function Lr(e,t){for(var r,n=0,i=t.length;n<i&&(r=t[n]);n++)e=Ar(r[0],[e,r[1]]);return e}function Ir(e,t){var r,n=[],i=[],s=e.length,a={};if(!s)return null;for(var o=0;o<s&&(r=e[o]);o++)(r.named?i:n).push(r.iri);return a[t||"from"]={default:n,named:i},a}function Pr(e){return parseInt(e,10)}function Dr(e){return"group"===e.type&&1===e.patterns.length?e.patterns[0]:e}function Cr(e,t){return t&&"NamedNode"!==t.termType&&(t=nn.factory.namedNode(t)),nn.factory.literal(e,t)}function Br(e,t,r){var n={};return null!=e&&(n.subject=e),null!=t&&(n.predicate=t),null!=r&&(n.object=r),n}function Mr(e){return"string"==typeof e?e.startsWith("e_")?nn.factory.blankNode(e):nn.factory.blankNode("e_"+e):nn.factory.blankNode("g_"+Ur++)}var Ur=0;nn._resetBlanks=function(){Ur=0};var $r=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,qr={"\\":"\\","'":"'",'"':'"',t:"\t",b:"\b",n:"\n",r:"\r",f:"\f"},Gr=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,zr=String.fromCharCode;function Wr(e,t){e=e.substring(t,e.length-t);try{e=e.replace($r,(function(e,t,r,n){var i;if(t){if(i=parseInt(t,16),isNaN(i))throw new Error;return zr(i)}if(r){if(i=parseInt(r,16),isNaN(i))throw new Error;return i<65535?zr(i):zr(55296+((i-=65536)>>10),56320+(1023&i))}var s=qr[n];if(!s)throw new Error;return s}))}catch(e){return""}if(Gr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function Qr(e,t,r){var n=[],i=[];return t.forEach((function(t){n.push(Br(null,e,t.entity)),xr(i,t.triples)})),Rr(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Vr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Vr(r));return t}return[]}function Zr(e){const t=new Set,r=function(e){e&&("Variable"===e.termType?t.add(e):"operation"===e.type&&e.args.forEach(r))};return r(e),t}function Yr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Yr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Kr(e){if(e.triples){const t=[];for(const r of e.triples)Xr(r.subject)&&t.push(r.subject.value),Xr(r.predicate)&&t.push(r.predicate.value),Xr(r.object)&&t.push(r.object.value);return t}if(e.patterns){const t=[];for(const r of e.patterns)t.push(...Kr(r));return t}return[]}function Jr(e){if(!nn.sparqlStar)throw new Error("SPARQL* support is not enabled");return e}function en(e){for(const t of e){if("graph"===t.type&&"Variable"===t.name.termType)throw new Error("Detected illegal variable in GRAPH");if("bgp"===t.type||"graph"===t.type)for(const e of t.triples)if("Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType)throw new Error("Detected illegal variable in BGP")}return e}function tn(e){for(const t of e)if("bgp"===t.type)for(const e of t.triples)if("BlankNode"===e.subject.termType||"BlankNode"===e.predicate.termType||"BlankNode"===e.object.termType)throw new Error("Detected illegal blank node in BGP");return e}var rn={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 15;case 3:return 28;case 4:return 316;case 5:return 317;case 6:return 35;case 7:return 37;case 8:return 38;case 9:return 26;case 10:return 41;case 11:return 45;case 12:return 46;case 13:return 48;case 14:return 50;case 15:return 55;case 16:return 58;case 17:return 320;case 18:return 68;case 19:return 69;case 20:return 75;case 21:return 78;case 22:return 81;case 23:return 83;case 24:return 86;case 25:return 88;case 26:return 90;case 27:return 191;case 28:return 107;case 29:return 321;case 30:return 140;case 31:return 322;case 32:return 323;case 33:return 117;case 34:return 324;case 35:return 116;case 36:return 325;case 37:return 326;case 38:return 120;case 39:return 122;case 40:return 123;case 41:return 138;case 42:return 132;case 43:return 133;case 44:return 135;case 45:return 141;case 46:return 119;case 47:return 327;case 48:return 328;case 49:return 167;case 50:return 170;case 51:return 174;case 52:return 100;case 53:return 168;case 54:return 329;case 55:return 173;case 56:return 231;case 57:return 235;case 58:return 278;case 59:return 195;case 60:return 330;case 61:return 331;case 62:return 224;case 63:return 333;case 64:return 334;case 65:return 219;case 66:return 226;case 67:return 227;case 68:return 250;case 69:return 254;case 70:return 295;case 71:return 335;case 72:return 336;case 73:return 337;case 74:return 338;case 75:return 339;case 76:return 258;case 77:return 340;case 78:return 273;case 79:return 281;case 80:return 282;case 81:return 275;case 82:return 276;case 83:return 277;case 84:return 341;case 85:return 342;case 86:return 279;case 87:return 344;case 88:return 343;case 89:return 345;case 90:return 284;case 91:return 285;case 92:return 288;case 93:return 290;case 94:return 294;case 95:return 298;case 96:return 301;case 97:return 13;case 98:return 16;case 99:return 312;case 100:return 245;case 101:return 34;case 102:return 297;case 103:return 87;case 104:return 299;case 105:return 300;case 106:return 306;case 107:return 307;case 108:return 308;case 109:return 309;case 110:return 310;case 111:return 311;case 112:return"EXPONENT";case 113:return 302;case 114:return 303;case 115:return 304;case 116:return 305;case 117:return 93;case 118:return 246;case 119:return 6;case 120:return"INVALID";case 121:console.log(t.yytext)}},rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i,/^(?:FROM)/i,/^(?:NAMED)/i,/^(?:GROUP)/i,/^(?:BY)/i,/^(?:HAVING)/i,/^(?:ORDER)/i,/^(?:ASC)/i,/^(?:DESC)/i,/^(?:LIMIT)/i,/^(?:OFFSET)/i,/^(?:VALUES)/i,/^(?:;)/i,/^(?:LOAD)/i,/^(?:SILENT)/i,/^(?:INTO)/i,/^(?:CLEAR)/i,/^(?:DROP)/i,/^(?:CREATE)/i,/^(?:ADD)/i,/^(?:TO)/i,/^(?:MOVE)/i,/^(?:COPY)/i,/^(?:INSERT((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)WHERE)/i,/^(?:WITH)/i,/^(?:DELETE)/i,/^(?:INSERT)/i,/^(?:USING)/i,/^(?:DEFAULT)/i,/^(?:GRAPH)/i,/^(?:ALL)/i,/^(?:\.)/i,/^(?:OPTIONAL)/i,/^(?:SERVICE)/i,/^(?:BIND)/i,/^(?:UNDEF)/i,/^(?:MINUS)/i,/^(?:UNION)/i,/^(?:FILTER)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:,)/i,/^(?:a)/i,/^(?:\|)/i,/^(?:\/)/i,/^(?:\^)/i,/^(?:\?)/i,/^(?:\+)/i,/^(?:!)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\|\|)/i,/^(?:&&)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:<)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:>=)/i,/^(?:IN)/i,/^(?:NOT)/i,/^(?:-)/i,/^(?:BOUND)/i,/^(?:BNODE)/i,/^(?:(RAND|NOW|UUID|STRUUID))/i,/^(?:(LANG|DATATYPE|IRI|URI|ABS|CEIL|FLOOR|ROUND|STRLEN|STR|UCASE|LCASE|ENCODE_FOR_URI|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],inclusive:!0}}};function nn(){this.yy={}}return ur.lexer=rn,nn.prototype=ur,ur.Parser=nn,new nn}();t.parser=n,t.Parser=n.Parser,t.parse=function(){return n.parse.apply(n,arguments)},t.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),process.exit(1));var n=r(9270).readFileSync(r(8080).normalize(e[1]),"utf8");return t.parser.parse(n)},r.c[r.s]===e&&t.main(process.argv.slice(1))},1348:e=>{class Wildcard{constructor(){return t||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(Wildcard.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(Wildcard.prototype,"termType",{enumerable:!0,value:"Wildcard"});var t=new Wildcard;e.exports.R=Wildcard},9619:(e,t,r)=>{var n=r(7107).Parser,i=r(4404),s=r(1348).R,{DataFactory:a}=r(1640);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:s,skipUngroupedVariableCheck:o}={}){var u={};for(var h in e||{})u[h]=e[h];var l=new n;return l.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new a,n.sparqlStar=Boolean(i),n.skipValidation=Boolean(s)||Boolean(o),n.prototype.parse.apply(l,arguments)},l._resetBlanks=n._resetBlanks,l},Generator:i,Wildcard:s}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=h,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},9650:e=>{var t=Object.prototype.toString;e.exports=function(e){switch(t.call(e)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array"}return null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}},1666:(e,t)=>{var r,n,i,s=void 0,a=(r=Object.prototype.toString,n=Object.prototype.hasOwnProperty,{Class:function(e){return r.call(e).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return n.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}),o=Math.LN2,u=Math.abs,h=Math.floor,l=Math.log,c=Math.min,f=Math.pow,d=Math.round;function p(e){if(b&&i){var t,r=b(e);for(t=0;t<r.length;t+=1)i(e,r[t],{value:e[r[t]],writable:!1,enumerable:!1,configurable:!1})}}i=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return a.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),a.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),a.HasProperty(r,"value")&&(e[t]=r.value),e};var b=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t,r=[];for(t in e)a.HasOwnProperty(e,t)&&r.push(t);return r};function g(e){if(i){if(e.length>1e5)throw new RangeError("Array too large for polyfill");var t;for(t=0;t<e.length;t+=1)r(t)}function r(t){i(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:!0,configurable:!1})}}function y(e,t){var r=32-t;return e<<r>>r}function _(e,t){var r=32-t;return e<<r>>>r}function m(e){return[255&e]}function w(e){return y(e[0],8)}function v(e){return[255&e]}function E(e){return _(e[0],8)}function S(e){return[(e=d(Number(e)))<0?0:e>255?255:255&e]}function T(e){return[e>>8&255,255&e]}function x(e){return y(e[0]<<8|e[1],16)}function k(e){return[e>>8&255,255&e]}function R(e){return _(e[0]<<8|e[1],16)}function j(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function N(e){return y(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function A(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function F(e){return _(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function O(e,t,r){var n,i,s,a,d,p,b,g=(1<<t-1)-1;function y(e){var t=h(e),r=e-t;return r<.5?t:r>.5||t%2?t+1:t}for(e!=e?(i=(1<<t)-1,s=f(2,r-1),n=0):e===1/0||e===-1/0?(i=(1<<t)-1,s=0,n=e<0?1:0):0===e?(i=0,s=0,n=1/e==-1/0?1:0):(n=e<0,(e=u(e))>=f(2,1-g)?(i=c(h(l(e)/o),1023),(s=y(e/f(2,i)*f(2,r)))/f(2,r)>=2&&(i+=1,s=1),i>g?(i=(1<<t)-1,s=0):(i+=g,s-=f(2,r))):(i=0,s=y(e/f(2,1-g-r)))),d=[],a=r;a;a-=1)d.push(s%2?1:0),s=h(s/2);for(a=t;a;a-=1)d.push(i%2?1:0),i=h(i/2);for(d.push(n?1:0),d.reverse(),p=d.join(""),b=[];p.length;)b.push(parseInt(p.substring(0,8),2)),p=p.substring(8);return b}function L(e,t,r){var n,i,s,a,o,u,h,l,c=[];for(n=e.length;n;n-=1)for(s=e[n-1],i=8;i;i-=1)c.push(s%2?1:0),s>>=1;return c.reverse(),a=c.join(""),o=(1<<t-1)-1,u=parseInt(a.substring(0,1),2)?-1:1,h=parseInt(a.substring(1,1+t),2),l=parseInt(a.substring(1+t),2),h===(1<<t)-1?0!==l?NaN:u*(1/0):h>0?u*f(2,h-o)*(1+l/f(2,r)):0!==l?u*f(2,-(o-1))*(l/f(2,r)):u<0?-0:0}function I(e){return L(e,11,52)}function P(e){return O(e,11,52)}function D(e){return L(e,8,23)}function C(e){return O(e,8,23)}!function(){var e=function(e){if((e=a.ToInt32(e))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var t;for(this.byteLength=e,this._bytes=[],this._bytes.length=e,t=0;t<this.byteLength;t+=1)this._bytes[t]=0;p(this)};t.eT=t.eT||e;var r=function(){};function n(t,n,i){var o;return o=function(t,r,n){var i,s,u,h;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===o)for(i=arguments[0],this.length=i.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)this._setter(u,i._getter(u));else if("object"!=typeof arguments[0]||(arguments[0]instanceof e||"ArrayBuffer"===a.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof e||"ArrayBuffer"===a.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=t,this.byteOffset=a.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=a.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(s=arguments[0],this.length=a.ToUint32(s.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)h=s[u],this._setter(u,Number(h));else{if(this.length=a.ToInt32(arguments[0]),n<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}this.constructor=o,p(this),g(this)},o.prototype=new r,o.prototype.BYTES_PER_ELEMENT=t,o.prototype._pack=n,o.prototype._unpack=i,o.BYTES_PER_ELEMENT=t,o.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if((e=a.ToUint32(e))>=this.length)return s;var t,r,n=[];for(t=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;t<this.BYTES_PER_ELEMENT;t+=1,r+=1)n.push(this.buffer._bytes[r]);return this._unpack(n)},o.prototype.get=o.prototype._getter,o.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if((e=a.ToUint32(e))>=this.length)return s;var r,n,i=this._pack(t);for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,n+=1)this.buffer._bytes[n]=i[r]},o.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var r,n,i,s,o,u,h,l,c,f;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(r=arguments[0],(i=a.ToUint32(arguments[1]))+r.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(l=this.byteOffset+i*this.BYTES_PER_ELEMENT,c=r.length*this.BYTES_PER_ELEMENT,r.buffer===this.buffer){for(f=[],o=0,u=r.byteOffset;o<c;o+=1,u+=1)f[o]=r.buffer._bytes[u];for(o=0,h=l;o<c;o+=1,h+=1)this.buffer._bytes[h]=f[o]}else for(o=0,u=r.byteOffset,h=l;o<c;o+=1,u+=1,h+=1)this.buffer._bytes[h]=r.buffer._bytes[u]}else{if("object"!=typeof arguments[0]||void 0===arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(n=arguments[0],s=a.ToUint32(n.length),(i=a.ToUint32(arguments[1]))+s>this.length)throw new RangeError("Offset plus length of array is out of range");for(o=0;o<s;o+=1)u=n[o],this._setter(i+o,Number(u))}},o.prototype.subarray=function(e,t){function r(e,t,r){return e<t?t:e>r?r:e}e=a.ToInt32(e),t=a.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=r(e,0,this.length);var n=(t=r(t,0,this.length))-e;return n<0&&(n=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,n)},o}var i=n(1,m,w),o=n(1,v,E),u=n(1,S,E),h=n(2,T,x),l=n(2,k,R),c=n(4,j,N),f=n(4,A,F),d=n(4,C,D),b=n(8,P,I);t.iq=t.iq||i,t.U2=t.U2||o,t.we=t.we||u,t.M2=t.M2||h,t.HA=t.HA||l,t.ZV=t.ZV||c,t._R=t._R||f,t.$L=t.$L||d,t.I=t.I||b}(),function(){function e(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var r,n=(r=new t.HA([4660]),18===e(new t.U2(r.buffer),0)),i=function(e,r,n){if(0===arguments.length)e=new t.eT(0);else if(!(e instanceof t.eT||"ArrayBuffer"===a.Class(e)))throw new TypeError("TypeError");if(this.buffer=e||new t.eT(0),this.byteOffset=a.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteLength=arguments.length<3?this.buffer.byteLength-this.byteOffset:a.ToUint32(n),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");p(this)};function s(r){return function(i,s){if((i=a.ToUint32(i))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");i+=this.byteOffset;var o,u=new t.U2(this.buffer,i,r.BYTES_PER_ELEMENT),h=[];for(o=0;o<r.BYTES_PER_ELEMENT;o+=1)h.push(e(u,o));return Boolean(s)===Boolean(n)&&h.reverse(),e(new r(new t.U2(h).buffer),0)}}function o(r){return function(i,s,o){if((i=a.ToUint32(i))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var u,h=new r([s]),l=new t.U2(h.buffer),c=[];for(u=0;u<r.BYTES_PER_ELEMENT;u+=1)c.push(e(l,u));Boolean(o)===Boolean(n)&&c.reverse(),new t.U2(this.buffer,i,r.BYTES_PER_ELEMENT).set(c)}}i.prototype.getUint8=s(t.U2),i.prototype.getInt8=s(t.iq),i.prototype.getUint16=s(t.HA),i.prototype.getInt16=s(t.M2),i.prototype.getUint32=s(t._R),i.prototype.getInt32=s(t.ZV),i.prototype.getFloat32=s(t.$L),i.prototype.getFloat64=s(t.I),i.prototype.setUint8=o(t.U2),i.prototype.setInt8=o(t.iq),i.prototype.setUint16=o(t.HA),i.prototype.setInt16=o(t.M2),i.prototype.setUint32=o(t._R),i.prototype.setInt32=o(t.ZV),i.prototype.setFloat32=o(t.$L),i.prototype.setFloat64=o(t.I),t.VO=t.VO||i}()},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},0:t=>{"use strict";t.exports=e},3081:()=>{},8906:()=>{},6965:()=>{},147:()=>{},2361:()=>{},4616:()=>{},6028:()=>{},7298:()=>{},9270:()=>{},8080:()=>{}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.c=r,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(n.s=8635)})()}));
3
3
  //# sourceMappingURL=openhps-rdf.sparql.min.js.map